diff options
author | Todd Poynor <tpoynor@mvista.com> | 2005-07-11 22:34:39 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-07-12 18:58:44 -0400 |
commit | a98a5d04f400ad112e59cadd739dbabf89417e60 (patch) | |
tree | 5eeb7f45c0090de40c7523e2b9dfd5e86b22169e /drivers/ieee1394/raw1394.c | |
parent | 751382dd5cb2702368d281a50b55c2d6c4e8fbfc (diff) | |
parent | 7ac3db59fd4410405ce55e2a25c397aec440d8da (diff) |
Merge with rsync://fileserver/linux
Diffstat (limited to 'drivers/ieee1394/raw1394.c')
-rw-r--r-- | drivers/ieee1394/raw1394.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 7419af450bd1..b4fa14793fe5 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
@@ -98,7 +98,7 @@ static struct hpsb_address_ops arm_ops = { | |||
98 | 98 | ||
99 | static void queue_complete_cb(struct pending_request *req); | 99 | static void queue_complete_cb(struct pending_request *req); |
100 | 100 | ||
101 | static struct pending_request *__alloc_pending_request(int flags) | 101 | static struct pending_request *__alloc_pending_request(unsigned int __nocast flags) |
102 | { | 102 | { |
103 | struct pending_request *req; | 103 | struct pending_request *req; |
104 | 104 | ||
@@ -2506,9 +2506,12 @@ static int raw1394_iso_send_packets(struct file_info *fi, void __user * uaddr) | |||
2506 | if (copy_from_user(&upackets, uaddr, sizeof(upackets))) | 2506 | if (copy_from_user(&upackets, uaddr, sizeof(upackets))) |
2507 | return -EFAULT; | 2507 | return -EFAULT; |
2508 | 2508 | ||
2509 | if (upackets.n_packets > hpsb_iso_n_ready(fi->iso_handle)) | 2509 | if (upackets.n_packets >= fi->iso_handle->buf_packets) |
2510 | return -EINVAL; | 2510 | return -EINVAL; |
2511 | 2511 | ||
2512 | if (upackets.n_packets >= hpsb_iso_n_ready(fi->iso_handle)) | ||
2513 | return -EAGAIN; | ||
2514 | |||
2512 | /* ensure user-supplied buffer is accessible and big enough */ | 2515 | /* ensure user-supplied buffer is accessible and big enough */ |
2513 | if (!access_ok(VERIFY_READ, upackets.infos, | 2516 | if (!access_ok(VERIFY_READ, upackets.infos, |
2514 | upackets.n_packets * | 2517 | upackets.n_packets * |