[PATCH] rose: correct integer overflow check

2016-02-17 Thread Insu Yun
Since rose_ndevs is signed integer type, it can be overflowed when it is negative. Signed-off-by: Insu Yun <wuni...@gmail.com> --- net/rose/af_rose.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 129d357..4f37fae

[PATCH] tipc: unlock in error path

2016-02-17 Thread Insu Yun
tipc_bcast_unlock need to be unlocked in error path. Signed-off-by: Insu Yun <wuni...@gmail.com> --- net/tipc/link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 0c2944f..347cdc9 100644 --- a/net/tipc/link.c +++ b/net/tipc/

[PATCH] tcp: correctly crypto_alloc_hash return check

2016-02-15 Thread Insu Yun
crypto_alloc_hash never returns NULL Signed-off-by: Insu Yun <wuni...@gmail.com> --- net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index fd17eec..a95aac1 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2946,7 +

[PATCH] et131x: check return value of dma_alloc_coherent

2016-02-15 Thread Insu Yun
For error handling, dma_alloc_coherent's return value needs to be checked, not argument. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/ethernet/agere/et131x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/agere/et131x.c b/drive

[PATCH] rfcomm: fix information leak in rfcomm_sock_bind

2016-01-05 Thread Insu Yun
if addr_len < sizeof(sa), sa.rc_bdaddr(4bytes) can be leaked by using rfcomm_sock_getname() Signed-off-by: Insu Yun <wuni...@gmail.com> --- net/bluetooth/rfcomm/sock.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetoo

[PATCH v2] mwifiex: correctly handling kzalloc

2015-12-30 Thread Insu Yun
Since kzalloc can be failed in memory pressure, it needs to be handled, otherwise NULL dereference could be happened Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/wireless/mwifiex/sdio.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/m

[PATCH] mISDN: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Since kzalloc can be failed in memory pressure, NULL dereference might be happened. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/isdn/hardware/mISDN/hfcsusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware

[PATCH] cxgb4: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Since t4_alloc_mem can be failed in memory pressure, if not properly handled, NULL dereference could be happened. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/c

[PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args

2015-12-29 Thread Insu Yun
Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c index a5f422f..a9a2c33

[PATCH] mISDN: correctly handling failed allocation in fsm

2015-12-29 Thread Insu Yun
Since kzalloc can be failed in memory pressure, NULL dereference can be happened. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/isdn/mISDN/fsm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/isdn/mISDN/fsm.c b/drivers/isdn/mISDN/fsm.c index 26477d4..3c3ffb0

[PATCH] ixgbe: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Since kzalloc can be failed in memory pressure, NULL derefence could be happened. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drive

[PATCH] mwifiex: correctly handling kzalloc

2015-12-29 Thread Insu Yun
Since kzalloc can be failed in memory pressure, it needs to be handled as above kzalloc. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/wireless/mwifiex/sdio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wi

[PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args

2015-12-29 Thread Insu Yun
Since qlcnic_alloc_mbx_args can be failed, return value should be checked. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ct

[PATCH] mwifiex: correctly handling kzalloc

2015-12-29 Thread Insu Yun
Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/wireless/mwifiex/sdio.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index 78a8474..a8af72d 100644 --- a/drivers/net/wireless/mwifiex/

[PATCH] nfc: free skb buffer using skb_free_datagram

2015-10-19 Thread Insu Yun
Freeing sk_buff genereated by skb_recv_datagram is always by skb_free_datagram, not kfree_skb. Signed-off-by: Insu Yun <wuni...@gmail.com> --- net/nfc/llcp_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c index b7de0da..1

[PATCH] mlx4: corretly check failed allocation

2015-10-15 Thread Insu Yun
When allocation fails, mlx4_alloc_cmd_mailbox returns -ENOMEM. Since there is no case that mlx4_alloc_cmd_mailbox returns NULL, it needs to be checked by IS_ERR, not IS_ERR_OR_NULL Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/ethernet/mellanox/mlx4/mr.c | 2 +- 1 file chan

[PATCH] xen-netback: corretly check failed allocation

2015-10-15 Thread Insu Yun
Since vzalloc can be failed in memory pressure, return value should be checked and return ENOMEM. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/xen-netback/xenbus.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-n

[PATCH 1/2] isdn: correctly check failed allocation

2015-10-15 Thread Insu Yun
Since skb_clone can be failed in memory pressure, return value of skb_clone needs to be checked. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/isdn/hisax/isdnl2.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c

[PATCH 2/2] isdn: correctly check failed allocation

2015-10-15 Thread Insu Yun
Since skb_clone is memory allocation, it could be failed when lack of resource. Therefore, return value of skb_clone needs to be checked and handle error. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/isdn/mISDN/layer2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/d

[PATCH] xen-netback: correctly check failed allocation

2015-10-15 Thread Insu Yun
Since vzalloc can be failed in memory pressure, writes -ENOMEM to xenstore to indicate error. Signed-off-by: Insu Yun <wuni...@gmail.com> --- drivers/net/xen-netback/xenbus.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-n