aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/raw1394.c
diff options
context:
space:
mode:
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 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
99static void queue_complete_cb(struct pending_request *req); 99static void queue_complete_cb(struct pending_request *req);
100 100
101static struct pending_request *__alloc_pending_request(int flags) 101static 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 *