[PATCH v2] fusion-mptbase: handle failed allocation for workqueue

2016-02-17 Thread Insu Yun
the failure of ioc->reset_work_q is checked, but not ioc->fw_event_q. Signed-off-by: Insu Yun --- drivers/message/fusion/mptbase.c | 44 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/m

[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 --- 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 100644 --- a/net/rose/af_rose.c

[PATCH] nes: handling failed allocation when creating workqueue

2016-02-17 Thread Insu Yun
Since create_singlethread_workqueue uses kzalloc internally, it can be failed in memory pressure, so need to handle it. Signed-off-by: Insu Yun --- drivers/infiniband/hw/nes/nes_cm.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/nes

[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 --- 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/link.c @@ -1973,8 +1973,10

[PATCH] fusion-mptbase: handle failed allocation for workqueue

2016-02-15 Thread Insu Yun
the failure of ioc->reset_work_q is checked, but not ioc->fw_event_q. Signed-off-by: Insu Yun --- drivers/message/fusion/mptbase.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 5dcc031..d4907a1 100644

[PATCH] s5p_mfc: handling failed allocation for workqueue

2016-02-15 Thread Insu Yun
create_singlethread_workqueue() can be failed in memory pressure. Signed-off-by: Insu Yun --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 927ab49

[PATCH] bcm590xx: correctly handle return value of i2c_new_dummy()

2016-02-15 Thread Insu Yun
i2c_new_dummy() returns NULL when failed, not an error code. Signed-off-by: Insu Yun --- drivers/mfd/bcm590xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c index 320aaef..7aaf622 100644 --- a/drivers/mfd/bcm590xx.c +++ b

[PATCH] rc: correctly handling failed allocation

2016-02-15 Thread Insu Yun
Since rc_allocate_device() uses kmalloc, it can returns NULL, so need to check, otherwise, NULL derefenrece can be happened. Signed-off-by: Insu Yun --- drivers/media/rc/igorplugusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc

[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 --- 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 +2946,7 @@ static void

[PATCH] drbd: correctly handling failed crypto_alloc_hash

2016-02-15 Thread Insu Yun
crypto_alloc_hash returns an error code, not NULL. Signed-off-by: Insu Yun --- drivers/block/drbd/drbd_receiver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 1957fe8..9063462 100644 --- a

[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 --- drivers/net/ethernet/agere/et131x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/agere/et131x.c b/drivers/net/ethernet/agere/et1

[PATCH] gpio-mcp23s08: correctly handling failed allocation

2016-02-15 Thread Insu Yun
Since devm_kzalloc can be failed in memory pressure, it needs to check and return -ENOMEM Signed-off-by: Insu Yun --- drivers/gpio/gpio-mcp23s08.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index c767879..ed51dcf 100644

[PATCH] qxl: handling failed allocation

2016-02-04 Thread Insu Yun
Since kmalloc can be failed in memory pressure, check and return error code otherwise NULL deference could be happened Signed-off-by: Insu Yun --- drivers/gpu/drm/qxl/qxl_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c

[PATCH] pvrusb2: correctly handling failed thread run

2016-02-04 Thread Insu Yun
Since kthread_run returns -ENOMEM if failed, it needs to be checked whether it is error, not whether it is null. Signed-off-by: Insu Yun --- drivers/media/usb/pvrusb2/pvrusb2-context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2

[PATCH] affs: add kunmap in error path

2016-02-01 Thread Insu Yun
When error occurs, it needs to unmap page. Signed-off-by: Insu Yun --- fs/affs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/affs/file.c b/fs/affs/file.c index 0548c53..fa4f24e 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c @@ -520,8 +520,10

[PATCH] cifs: fix potential overflow in cifs_compose_mount_options

2016-02-01 Thread Insu Yun
In worst case, "ip=" + sb_mountdata + ipv6 can be copied into mountdata. Therefore, for safe, it is better to add more size when allocating memory. Signed-off-by: Insu Yun --- fs/cifs/cifs_dfs_ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/cifs_dfs_

[PATCH] drm: fix missing reference counting decrease

2016-02-01 Thread Insu Yun
In drm_dp_mst_allocate_vcpi, it returns true in two paths, but in one path, there is no reference couting decrease. Signed-off-by: Insu Yun --- drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH] usbvision: fix locking error

2016-02-01 Thread Insu Yun
When remove_pending is non-zero, v4l2_lock is never unlocked. Signed-off-by: Insu Yun --- drivers/media/usb/usbvision/usbvision-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision

[PATCH] aoe: remove unnecessary check for failing kthread creation

2016-02-01 Thread Insu Yun
When kthread_run fails, it returns ERR, not NULL. Therefore, NULL checking is redundant. (https://www.kernel.org/doc/htmldocs/device-drivers/API-kthread-run.html) Signed-off-by: Insu Yun --- drivers/block/aoe/aoecmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] clk: unlock for handling unregisterd clock

2016-01-30 Thread Insu Yun
If clock is already unregistered, it returns with holding lock. It needs to be unlocked. Signed-off-by: Insu Yun --- drivers/clk/clk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index b4db67a..9cc2d08 100644 --- a/drivers/clk/clk.c +++ b/drivers

[PATCH v2] emu10k1: correctly handling failed thread creation

2016-01-29 Thread Insu Yun
Since kthread_create can be failed, it needs to check whether error occurred and return error code. Signed-off-by: Insu Yun --- sound/pci/emu10k1/emu10k1_main.c | 8 1 file changed, 8 insertions(+) diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index

[PATCH] nouveau: need to handle failed allocation

2016-01-28 Thread Insu Yun
drm_property_create_range can be failed in memory pressure. So, it needs to be handled. Signed-off-by: Insu Yun --- drivers/gpu/drm/nouveau/nouveau_display.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau

[PATCH] gma500: handling failed allocation

2016-01-28 Thread Insu Yun
Since drm_property_create_range can be failed in memory pressure, it needs to be handled. Signed-off-by: Insu Yun --- drivers/gpu/drm/gma500/framebuffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index

[PATCH] ch7006: correctly handling failed allocation

2016-01-28 Thread Insu Yun
Since drm_property_create_range can be failed in memory pressure, it needs to be checked and return -ENOMEM. Signed-off-by: Insu Yun --- drivers/gpu/drm/i2c/ch7006_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c

[PATCH] emu10k1: correctly handling failed thread creation

2016-01-28 Thread Insu Yun
Since kthread_create can be failed, it needs to check whether error occurred and return error code. Signed-off-by: Insu Yun --- sound/pci/emu10k1/emu10k1_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index

[PATCH] vt: correctly check return value of class_create

2016-01-23 Thread Insu Yun
Since class_create can be failed in memory pressure, its return value should be checked and correctly handled. Signed-off-by: Insu Yun --- drivers/tty/vt/vc_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index 14a2b5f

[PATCH] hotplug: unlock in error path in acpiphp_enable_slot

2016-01-23 Thread Insu Yun
In acpiphp_enable_slot, there is a missing unlock path when error occurred. It needs to be unlocked before returning an error. Signed-off-by: Insu Yun --- drivers/pci/hotplug/acpiphp_glue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/acpiphp_glue.c

[PATCH] ext4: fix potential integer overflow

2016-01-20 Thread Insu Yun
Since sizeof(ext_new_group_data) > sizeof(ext_new_flex_group_data), integer overflow could be happened. Therefore, need to fix integer overflow sanitization. Signed-off-by: Insu Yun --- fs/ext4/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/resize.c b

[PATCH v3] ipr: fix out-of-bounds null overwrite

2016-01-06 Thread Insu Yun
does not need to put additional null byte. Signed-off-by: Insu Yun --- drivers/scsi/ipr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 536cd5a..1c3759b 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4003,13

[PATCH v2] ipr: fix out-of-bounds null overwrite

2016-01-06 Thread Insu Yun
does not need to put additional null byte. Signed-off-by: Insu Yun --- drivers/scsi/ipr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 536cd5a..caf63f9 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4003,13

[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 --- net/bluetooth/rfcomm/sock.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c in

[PATCH] ipr: fix out-of-bounds null overwrite

2016-01-05 Thread Insu Yun
does not need to put additional null byte. Signed-off-by: Insu Yun --- drivers/scsi/ipr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 536cd5a..b7c3b1a 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4009,7 +4009,6 @@ static ssize_t

[PATCH v2] i915: correctly handling failed allocation

2015-12-30 Thread Insu Yun
Since devm_kzalloc can be failed, it needs to be checked if not, NULL dereference could be happened. Signed-off-by: Insu Yun --- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915

[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 --- drivers/net/wireless/mwifiex/sdio.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers

[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 --- drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c b

[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 --- 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/drivers/net/ethernet/intel/ixgbe

[PATCH] usbtv: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Since kzalloc can be failed, if not properly handled, NULL dereference could be happened. Signed-off-by: Insu Yun --- drivers/media/usb/usbtv/usbtv-video.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c

[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 --- 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 100644 --- a/drivers/isdn/mISDN

[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 --- 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/mISDN/hfcsusb.c index

[PATCH] ata: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Since kzalloc can be failed in memory pressure, return error when failed. Signed-off-by: Insu Yun --- drivers/ata/sata_sx4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index fab504f..48301cb 100644 --- a/drivers/ata/sata_sx4.c +++ b

[PATCH] mwifiex: correctly handling kzalloc

2015-12-29 Thread Insu Yun
Signed-off-by: Insu Yun --- 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/sdio.c +++ b/drivers/net

[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 --- 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_ctx.c b/drivers/net

[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 --- drivers/net/wireless/mwifiex/sdio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index

[PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args

2015-12-29 Thread Insu Yun
Signed-off-by: Insu Yun --- 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 100644 --- a/drivers/net

[PATCH] qxl: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Since kmalloc can be failed in memory pressure, when fails, return error code. Signed-off-by: Insu Yun --- drivers/gpu/drm/qxl/qxl_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index b2977a1..2e99854 100644 --- a

[PATCH] i915: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Signed-off-by: Insu Yun --- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c index a5e99ac..4e279dd 100644 --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c

[PATCH] cx231xx: correctly handling failed allocation

2015-12-29 Thread Insu Yun
Since kmalloc can be failed in memory pressure, if not properly handled, NULL dereference can be happend Signed-off-by: Insu Yun --- drivers/media/usb/cx231xx/cx231xx-417.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb

[PATCH] mtd: fixing memory leak and handling failed kmalloc

2015-12-29 Thread Insu Yun
kmalloc needs to be handled when failing in memory pressure. Also, it has memory leak in error routine. Signed-off-by: Insu Yun --- drivers/mtd/chips/cfi_cmdset_0001.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd

[PATCH] m5602: correctly check failed thread creation

2015-11-17 Thread Insu Yun
Signed-off-by: Insu Yun --- drivers/media/usb/gspca/m5602/m5602_s5k83a.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c index bf6b215..84b2961 100644 --- a/drivers/media/usb/gspca/m5602

[PATCH] gspca: correctly checked failed allocation

2015-10-19 Thread Insu Yun
create_singlethread_workqueue can be failed in memory pressue. So, check return value and return -ENOMEM Signed-off-by: Insu Yun --- drivers/media/usb/gspca/sq905.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c index

[PATCH] drm: correctly check failed allocation

2015-10-19 Thread Insu Yun
drm_property_create_range can be failed in memory pressure Therefore, check return value and handle an error Signed-off-by: Insu Yun --- drivers/gpu/drm/drm_crtc.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm

[PATCH] adc: correctly check return value

2015-10-19 Thread Insu Yun
Since devm_regulator_get returns address or error, not NULL, it needs to be checked with IS_ERR, not IS_ERR_OR_NULL. Signed-off-by: Insu Yun --- drivers/iio/adc/ad7266.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c index

[PATCH] xen: check return value of xenbus_printf

2015-10-19 Thread Insu Yun
Signed-off-by: Insu Yun --- drivers/input/misc/xen-kbdfront.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 23d0549..0a9ad2cf 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers

[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 --- 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..15e681f 100644 --- a/net

[PATCH] m5602: correctly check failed thread creation

2015-10-19 Thread Insu Yun
Since thread creation can be failed, check return value of kthread_create and handle an error. Signed-off-by: Insu Yun --- drivers/media/usb/gspca/m5602/m5602_s5k83a.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b

[PATCH] devfreq: correctly check failed allocation

2015-10-19 Thread Insu Yun
Since devm_kzalloc can be failed in memory pressure, check return value and handle error. Signed-off-by: Insu Yun --- drivers/devfreq/devfreq.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index ca1b362..814089f 100644

[PATCH] xen: check return value of xenbus_printf

2015-10-19 Thread Insu Yun
Internally, xenbus_printf uses memory allocation, so it can be failed in memory pressure.Therefore, xenbus_printf's return should be checked and properly handled. Signed-off-by: Insu Yun --- drivers/input/misc/xen-kbdfront.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

[PATCH] hsi: correctly handle return value of kzalloc

2015-10-17 Thread Insu Yun
Since kzalloc can be failed in memory pressure, its return value should be checked and handled. Signed-off-by: Insu Yun --- drivers/hsi/hsi.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c index fe93712..bda4c26 100644

[PATCH] usnix: correctly handle kzalloc return value

2015-10-17 Thread Insu Yun
Since kzalloc returns memory address, not error code, it should be checked whether it is null or not. Signed-off-by: Insu Yun --- drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/usnic

[PATCH] keys: change member variable name

2015-10-15 Thread Insu Yun
key->description and key->index_key.description are same because they are unioned. But, for readability, using same name for duplication and validation seems better. Signed-off-by: Insu Yun --- security/keys/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/se

[PATCH] usnic: correctly check failed allocation

2015-10-15 Thread Insu Yun
Since ib_alloc_device returns allocated memory address, not error, it should be checked as IS_NULL, not IS_ERR_OR_NULL. Signed-off-by: Insu Yun --- drivers/infiniband/hw/usnic/usnic_ib_main.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw

[PATCH] mxl111sf: missing return values validation

2015-10-15 Thread Insu Yun
Return values of mxl111sf_enable_usb_output and mxl1x1sf_top_master_ctrl are not validated. Signed-off-by: Insu Yun --- drivers/media/usb/dvb-usb-v2/mxl111sf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb

[PATCH] xen: check return value of xenbus_printf

2015-10-15 Thread Insu Yun
Signed-off-by: Insu Yun --- drivers/input/misc/xen-kbdfront.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 23d0549..9d465d7 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers

[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 --- 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-netback/xenbus.c index 929a6e7

[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 --- drivers/isdn/mISDN/layer2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/isdn/mISDN/layer2

[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 --- 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 index 18accb0..e74f847

[PATCH] usnic: corretly check failed allocation

2015-10-15 Thread Insu Yun
Since ib_alloc_device returns allocated memory address, not error, it should be checked as IS_NULL, not IS_ERR_OR_NULL. Signed-off-by: Insu Yun --- drivers/infiniband/hw/usnic/usnic_ib_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/usnic

[PATCH] xen: check return value of xenbus_printf

2015-10-15 Thread Insu Yun
Internally, xenbus_printf uses memory allocation, so it can be failed in memory pressure.Therefore, xenbus_printf's return should be checked and properly handled. Signed-off-by: Insu Yun --- drivers/input/misc/xen-kbdfront.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

[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 --- 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-netback/xenbus.c index

[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 --- drivers/net/ethernet/mellanox/mlx4/mr.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] keys: correctly check failed allocation for kmemdup

2015-10-15 Thread Insu Yun
kmemdup return value is saved in 'key->index_key.description', not 'key->descrption' and kmemdup can be failed in memory pressure. Therefore, key->index_key.description should be checked. Signed-off-by: Insu Yun --- security/keys/key.c | 2 +- 1 file changed, 1 inse

[PATCH] acpi:correctly check failed allocation

2015-10-15 Thread Insu Yun
Since kobject_create_and_add can be failed in memory pressure, return value need to be checked and return ENOMEM. Signed-off-by: Insu Yun --- drivers/acpi/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 40a4265..e712a7b 100644

[PATCH] fmc: correctly handle failed allocation

2015-10-15 Thread Insu Yun
Since kmemdup can be failed in memory pressure, return value should be checked and return -ENOMEM. Signed-off-by: Insu Yun --- drivers/fmc/fmc-fakedev.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/fmc/fmc-fakedev.c b/drivers/fmc/fmc-fakedev.c index 941d093..0515909