summaryrefslogtreecommitdiff
path: root/drivers/staging/bcm
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-11-16 10:44:50 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-16 10:44:50 -0800
commit491acf0032c08a74a4c88032ca1c03b498bfec37 (patch)
treeb7194d3afb144fa007d0ca6a11c96297f36d42f8 /drivers/staging/bcm
parent06fc8846a2c0ddcc51e6666a78fc29a8e749ca3b (diff)
parente53beacd23d9cb47590da6a7a7f6d417b941a994 (diff)
Staging: Merge 2.6.37-rc2 into staging-next
This was necessary in order to resolve some conflicts that happened between -rc1 and -rc2 with the following files: drivers/staging/bcm/Bcmchar.c drivers/staging/intel_sst/intel_sst_app_interface.c All should be resolved now. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r--drivers/staging/bcm/Bcmchar.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 8089d19e6c1b..31674ea1cd48 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -908,13 +908,15 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
break;
}
case IOCTL_BE_BUCKET_SIZE:
- Adapter->BEBucketSize = *(PULONG)arg;
- Status = STATUS_SUCCESS;
+ Status = 0;
+ if (get_user(Adapter->BEBucketSize, (unsigned long __user *)arg))
+ Status = -EFAULT;
break;
case IOCTL_RTPS_BUCKET_SIZE:
- Adapter->rtPSBucketSize = *(PULONG)arg;
- Status = STATUS_SUCCESS;
+ Status = 0;
+ if (get_user(Adapter->rtPSBucketSize, (unsigned long __user *)arg))
+ Status = -EFAULT;
break;
case IOCTL_CHIP_RESET:
{
@@ -935,11 +937,15 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
case IOCTL_QOS_THRESHOLD:
{
USHORT uiLoopIndex;
- for(uiLoopIndex = 0 ; uiLoopIndex < NO_OF_QUEUES ; uiLoopIndex++)
- {
- Adapter->PackInfo[uiLoopIndex].uiThreshold = *(PULONG)arg;
+
+ Status = 0;
+ for (uiLoopIndex = 0; uiLoopIndex < NO_OF_QUEUES; uiLoopIndex++) {
+ if (get_user(Adapter->PackInfo[uiLoopIndex].uiThreshold,
+ (unsigned long __user *)arg)) {
+ Status = -EFAULT;
+ break;
+ }
}
- Status = STATUS_SUCCESS;
break;
}
@@ -997,7 +1003,10 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
Status = -EFAULT;
break;
}
-
+ if (IoBuffer.OutputLength != sizeof(link_state)) {
+ Status = -EINVAL;
+ break;
+ }
memset(&link_state, 0, sizeof(link_state));
link_state.bIdleMode = Adapter->IdleMode;