diff options
Diffstat (limited to 'drivers/net/wireless/prism54/isl_ioctl.c')
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 8d1190c0f062..236e37526d07 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -2751,14 +2751,9 @@ prism54_hostapd(struct net_device *ndev, struct iw_point *p) | |||
2751 | p->length > PRISM2_HOSTAPD_MAX_BUF_SIZE || !p->pointer) | 2751 | p->length > PRISM2_HOSTAPD_MAX_BUF_SIZE || !p->pointer) |
2752 | return -EINVAL; | 2752 | return -EINVAL; |
2753 | 2753 | ||
2754 | param = kmalloc(p->length, GFP_KERNEL); | 2754 | param = memdup_user(p->pointer, p->length); |
2755 | if (param == NULL) | 2755 | if (IS_ERR(param)) |
2756 | return -ENOMEM; | 2756 | return PTR_ERR(param); |
2757 | |||
2758 | if (copy_from_user(param, p->pointer, p->length)) { | ||
2759 | kfree(param); | ||
2760 | return -EFAULT; | ||
2761 | } | ||
2762 | 2757 | ||
2763 | switch (param->cmd) { | 2758 | switch (param->cmd) { |
2764 | case PRISM2_SET_ENCRYPTION: | 2759 | case PRISM2_SET_ENCRYPTION: |