summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/raw1394.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-07-13 15:25:59 +0100
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-07-13 15:25:59 +0100
commit30beab1491f0b96b2f23d3fb68af01fd921a16d8 (patch)
treec580bdc0846269fbb10feeda901ecec1a48ee2ef /drivers/ieee1394/raw1394.c
parent21af6c4f2aa5f63138871b4ddd77d7ebf2588c9d (diff)
parentc32511e2718618f0b53479eb36e07439aa363a74 (diff)
downloadop-kernel-dev-30beab1491f0b96b2f23d3fb68af01fd921a16d8.zip
op-kernel-dev-30beab1491f0b96b2f23d3fb68af01fd921a16d8.tar.gz
Merge with /shiny/git/linux-2.6/.git
Diffstat (limited to 'drivers/ieee1394/raw1394.c')
-rw-r--r--drivers/ieee1394/raw1394.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index 7419af4..b4fa147 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -98,7 +98,7 @@ static struct hpsb_address_ops arm_ops = {
static void queue_complete_cb(struct pending_request *req);
-static struct pending_request *__alloc_pending_request(int flags)
+static struct pending_request *__alloc_pending_request(unsigned int __nocast flags)
{
struct pending_request *req;
@@ -2506,9 +2506,12 @@ static int raw1394_iso_send_packets(struct file_info *fi, void __user * uaddr)
if (copy_from_user(&upackets, uaddr, sizeof(upackets)))
return -EFAULT;
- if (upackets.n_packets > hpsb_iso_n_ready(fi->iso_handle))
+ if (upackets.n_packets >= fi->iso_handle->buf_packets)
return -EINVAL;
+ if (upackets.n_packets >= hpsb_iso_n_ready(fi->iso_handle))
+ return -EAGAIN;
+
/* ensure user-supplied buffer is accessible and big enough */
if (!access_ok(VERIFY_READ, upackets.infos,
upackets.n_packets *
OpenPOWER on IntegriCloud