[PATCH] drivers/scsi:fix memory leak

2016-05-15 Thread Heloise
In function ahc_handle_en_lun, variable lstate has not been freed before return, which can cause memory leak, fix it. Signed-off-by: Heloise --- drivers/scsi/aic7xxx/aic7xxx_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx

[PATCH] fs:efs:fix return value

2016-05-16 Thread Heloise
When the function sb_bread() fails, the return value should be -EIO, fix it. Signed-off-by: Heloise --- fs/efs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/efs/super.c b/fs/efs/super.c index cb68dac..368f7dd 100644 --- a/fs/efs/super.c +++ b/fs/efs/super.c

[PATCH] drivers:block:mtip32xx:mtip32xx:change the order of null-pointer dereference validation

2017-04-25 Thread Heloise
Signed-off-by: Heloise mtip_async_complete() uses the variable port 'port->dd'at the begining, then validates null-pointer dereference of port 'unlikely(!port)'. Change the order of validation. --- drivers/block/mtip32xx/mtip32xx.c | 5 - 1 file changed, 4 insertions(

[PATCH] mpt3sas_base:fix memory leak in _base_request_irq

2017-04-25 Thread Heloise
Signed-off-by: Heloise In function _base_request_irq, variable reply_q applies for memory space 'reply_q=kzalloc()', but does not release it before the function returns, fix it. --- drivers/scsi/mpt3sas/mpt3sas_base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/sc

[PATCH] fs:affs:fix sb_bread() return value

2017-04-26 Thread Heloise
When the function sb_bread() fails, the return value should be -EIO, fix it. Signed-off-by: Heloise --- fs/affs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/affs/super.c b/fs/affs/super.c index c2c27a8..df1f4fe 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c

[PATCH] drbd:fix null pointer deref in _drbd_md_sync_page_io

2017-04-26 Thread Heloise
The return value of bio_alloc_drbd can be NULL and is used without validation, which may cause null-pointer dereference, fix it. Signed-off-by: Heloise --- drivers/block/drbd/drbd_actlog.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block

[PATCH] drivers:block:drbd:drbd_state:fix null-pointer dereference

2017-04-24 Thread Heloise
Signed-off-by: Heloise In is_valid_state(), there is NULL validation for the variable nc "if (nc)". However,the code will continue to execute when nc is NULL. nc->verify_alg[0] is used in subsequent code, which may cause null-pointer dereference, fix it. --- drivers/block/drbd/drb

[PATCH] fix return value error

2015-10-14 Thread Heloise NH
Signed-off-by: Heloise NH --- drivers/infiniband/hw/ipath/ipath_fs.c | 2 +- drivers/infiniband/hw/qib/qib_fs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 25422a3..da753bc

[PATCH] fix return value error

2015-10-14 Thread Heloise NH
Signed-off-by: Heloise NH --- drivers/infiniband/hw/ipath/ipath_fs.c | 2 +- drivers/infiniband/hw/qib/qib_fs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 25422a3..da753bc

[PATCH] ALSA: hda: fix kstrdup return value

2015-07-16 Thread Heloise NH
From: kernelpatch_update In kstrdup we should return -ENOMEM when it reports an memory allocation failure, while the -ENODEV is referred to a failure in finding the cpu node in the device tree. Signed-off-by: Heloise NH --- sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] gpu:drm:radeon:fix array out fo bouds

2016-05-15 Thread Heloise NH
From: tom will When the initial value of i is greater than zero, it may cause endless loop, resulting in array out of bouds, fix it. Signed-off-by: tom will --- drivers/gpu/drm/radeon/kv_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b

[PATCH 1/1] trace-event-python.c used malloc without checking ptr if NULL

2015-09-29 Thread Heloise NH
Signed-off-by: Heloise NH --- tools/perf/util/scripting-engines/trace-event-python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index cff58ae..14d8e73 100644