diff options
Diffstat (limited to 'drivers/firewire/fw-device-cdev.c')
-rw-r--r-- | drivers/firewire/fw-device-cdev.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index 5c876188677f..33fe5768a078 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c | |||
@@ -416,6 +416,12 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg) | |||
416 | if (request.channel > 63) | 416 | if (request.channel > 63) |
417 | return -EINVAL; | 417 | return -EINVAL; |
418 | 418 | ||
419 | if (request.sync > 15) | ||
420 | return -EINVAL; | ||
421 | |||
422 | if (request.tags == 0 || request.tags > 15) | ||
423 | return -EINVAL; | ||
424 | |||
419 | if (request.speed > SCODE_3200) | 425 | if (request.speed > SCODE_3200) |
420 | return -EINVAL; | 426 | return -EINVAL; |
421 | 427 | ||
@@ -424,6 +430,8 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg) | |||
424 | request.channel, | 430 | request.channel, |
425 | request.speed, | 431 | request.speed, |
426 | request.header_size, | 432 | request.header_size, |
433 | request.sync, | ||
434 | request.tags, | ||
427 | iso_callback, client); | 435 | iso_callback, client); |
428 | if (IS_ERR(client->iso_context)) | 436 | if (IS_ERR(client->iso_context)) |
429 | return PTR_ERR(client->iso_context); | 437 | return PTR_ERR(client->iso_context); |
@@ -495,7 +503,7 @@ static int ioctl_queue_iso(struct client *client, void __user *arg) | |||
495 | if (__copy_from_user | 503 | if (__copy_from_user |
496 | (u.packet.header, p->header, header_length)) | 504 | (u.packet.header, p->header, header_length)) |
497 | return -EFAULT; | 505 | return -EFAULT; |
498 | if (u.packet.skip && | 506 | if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT && |
499 | u.packet.header_length + u.packet.payload_length > 0) | 507 | u.packet.header_length + u.packet.payload_length > 0) |
500 | return -EINVAL; | 508 | return -EINVAL; |
501 | if (payload + u.packet.payload_length > payload_end) | 509 | if (payload + u.packet.payload_length > payload_end) |