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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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_
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(-)
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
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
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
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
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
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
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
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
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
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
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(-)
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
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
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
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
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
73 matches
Mail list logo