[PATCH v2 17/35] net/wireless: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/net/wireless/ath/ath6kl/wmi.c | 6 ++ drivers/net/wireless/st/cw1200/queue.c | 3 +-- drivers/net/wireless/ti/wlcore/main.c

[PATCH v2 15/35] net/ethernet: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ether

[PATCH v2 16/35] net/wimax: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/net/wimax/i2400m/usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wimax/i2400m/usb.c b/driv

[PATCH v2] atm: iphase: Avoid copying pointers to user space.

2019-05-14 Thread Fuqian Huang
Remove the MEMDUMP_DEV case in ia_ioctl to avoid copy pointers to user space. Signed-off-by: Fuqian Huang --- drivers/atm/iphase.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 5278c57dce73..302cf0ba1600 100644 --- a/drivers/atm

[PATCH] atm: iphase: Avoid copying pointers to user space.

2019-05-14 Thread Fuqian Huang
When ia_cmds.sub_cmd is MEMDUMP_DEV in ia_ioctl, nullify the pointer fields of iadev before copying the whole structure to user space. Signed-off-by: Fuqian Huang --- drivers/atm/iphase.c | 73 +--- 1 file changed, 70 insertions(+), 3 deletions