Re: [PATCH V2] scsi: iscsi_tcp: Fix use-after-free when do get_host_param

2021-03-22 Thread Wu Bo
On 2021/3/22 4:21, michael.chris...@oracle.com wrote: On 3/21/21 1:47 AM, Wu Bo wrote: From: Wu Bo iscsid(cpu1): Logout of iscsi session, will do destroy session, tcp_sw_host->session is not set to NULL before release the iscsi session. in the iscsi_sw_tcp_session_destroy(). iscsadm(c

Re: [PATCH] pci: fix memory leak when virtio pci hotplug

2021-03-21 Thread Wu Bo
ontinue; } + pci_dev_put(dev); } } Reviewed-by: Wu Bo

[PATCH V2] scsi: iscsi_tcp: Fix use-after-free when do get_host_param

2021-03-20 Thread Wu Bo
From: Wu Bo iscsid(cpu1): Logout of iscsi session, will do destroy session, tcp_sw_host->session is not set to NULL before release the iscsi session. in the iscsi_sw_tcp_session_destroy(). iscsadm(cpu2): Get host parameters access to tcp_sw_host->session in the iscsi_sw_tcp_host_get

Re: [PATCH] scsi: iscsi_tcp: Fix use-after-free when do get_host_param

2021-03-20 Thread Wu Bo
On 2021/3/20 17:08, Wu Bo wrote: When logout of iscsi session, to do destroy session process, tcp_sw_host->session is not set to NULL. Get host parameters access to tcp_sw_host->session at the same time, but the session has been released at this time. [29844.848044] sd 2:0:0:1

[PATCH] scsi: iscsi_tcp: Fix use-after-free when do get_host_param

2021-03-20 Thread Wu Bo
iscsi_tcp: use iscsi_conn_get_addr_param libiscsi function") Signed-off-by: Wu Bo Signed-off-by: WenChao Hao --- drivers/scsi/iscsi_tcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index dd33ce0..98d782d 100644 --- a/drivers/scs

[RFC PATCH] ata: add lun validity check on ata_sas_queuecmd

2021-03-18 Thread Wu Bo
3:0]diskATA /dev/sdd [1:0:4:0]diskATA /dev/sde Signed-off-by: Wu Bo --- drivers/ata/libata-sata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c index c16423e..e30a412 100644 --- a/drivers/ata/libata-s

Re: [Openipmi-developer] [PATCH] x86: Fix MCE error handing when kdump is enabled

2020-09-23 Thread Wu Bo
errupts interfering with the panic handling, As a result, IPMI panic hangs for more than 3000 seconds. After I has patched and tested this patch, the problem of IPMI hangs has disappeared. It should be a solution to the problem. Thanks, Wu Bo arch/x86/kernel/cpu/mce/core.c | 67 +

Re: [RFC PATCH V2] ipmi: ssif: Fix out of bounds in write_next_byte()

2020-09-23 Thread Wu Bo
On 2020/9/23 0:13, Corey Minyard wrote: On Tue, Sep 22, 2020 at 08:31:44AM -0500, Corey Minyard wrote: On Mon, Sep 21, 2020 at 10:00:08PM +0800, Wu Bo wrote: In my virtual machine (have 4 cpus), Use mce_inject to inject errors into the system. After mce-inject injects an uncorrectable error

[RFC PATCH V2] ipmi: ssif: Fix out of bounds in write_next_byte()

2020-09-21 Thread Wu Bo
procedure") Signed-off-by: Feilong Lin Signed-off-by: Wu Bo --- drivers/char/ipmi/ipmi_si_intf.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 77b8d55..44ba9b6 100644 --- a/d

Re: [RFC PATCH] mce: don't not enable IRQ in wait_for_panic()

2020-09-21 Thread Wu Bo
On 2020/9/17 18:37, Wu Bo wrote: In my virtual machine (have 4 cpus), Use mce_inject to inject errors into the system. After mce-inject injects an uncorrectable error, there is a probability that the virtual machine is not reset immediately, but hangs for more than 3000 seconds, and appeared

[RFC PATCH] mce: don't not enable IRQ in wait_for_panic()

2020-09-17 Thread Wu Bo
956000e7 Signed-off-by: Feilong Lin Signed-off-by: Wu Bo --- arch/x86/kernel/cpu/mce/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index f43a78b..738f582 100644 --- a/arch/x86/kernel/cpu/mce/core.c ++

[PATCH] blkcg:Fix memory leaks in blkg_conf_prep()

2020-05-18 Thread Wu Bo
From: Wu Bo If a call of the function blkg_lookup_check() failed, we should be release the previously allocated block group before jumping to the lable 'fail_unlock' in the implementation of the function blkg_conf_prep(). Suggested-by: Markus Elfring Signed-off-by: Wu Bo --- V2

Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep()

2020-05-18 Thread Wu Bo
”. Thanks for your suggestion. omit the source code quotation from the description is more friendly. I will modify the description in V2 patch. Thanks, Wu Bo Would you like to add the tag “Fixes” to the commit message? Regards, Markus

[PATCH] blkcg:fixes memory leaks in blkg_conf_prep()

2020-05-15 Thread Wu Bo
fail_unlock in blkg_conf_prep() function. Signed-off-by: Wu Bo --- block/blk-cgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 930212c..afeb769 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -682,6 +682,7 @@ int blkg_conf_prep

[RESENT PATCH V2] nvme/core:disable streams when get stream params failed

2020-05-13 Thread Wu Bo
After enable nvme streams, then if get stream params failed, We should disable streams before return error in nvme_configure_directives() function. Signed-off-by: Wu Bo --- drivers/nvme/host/core.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/host

[PATCH V2] nvme/core:disable streams when get stream params failed

2020-05-13 Thread Wu Bo
After enable nvme streams, then if get stream params failed, We should disable streams before return error in nvme_configure_directives() function. Signed-off-by: Wu Bo --- drivers/nvme/host/core.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/nvme

Re: [PATCH] nvme/core:disable streams when get stream params failed

2020-05-12 Thread Wu Bo
On 2020/5/13 0:06, Christoph Hellwig wrote: On Wed, May 06, 2020 at 04:37:01PM +0800, Wu Bo wrote: After enable nvme streams, then if get stream params failed, We should disable streams before return error in nvme_configure_directives() function. Signed-off-by: Wu Bo --- drivers/nvme/host

[PATCH] nvme/core:disable streams when get stream params failed

2020-05-06 Thread Wu Bo
After enable nvme streams, then if get stream params failed, We should disable streams before return error in nvme_configure_directives() function. Signed-off-by: Wu Bo --- drivers/nvme/host/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c

[PATCH V3] fs/ceph:fix double unlock in handle_cap_export()

2020-04-29 Thread Wu Bo
lock(&session->s_mutex) to the IS_ERR(tsession) block. - Modify the comment more clearly. v1 -> v2: - add spin_lock(&ci->i_ceph_lock) before goto out_unlock lable Signed-off-by: Wu Bo --- fs/ceph/caps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/caps.c

Re: [PATCH] sound:hdmi:fix without unlocked before return

2020-04-29 Thread Wu Bo
On 2020/4/29 15:27, Takashi Iwai wrote: On Sun, 26 Apr 2020 15:17:22 +0200, Wu Bo wrote: Fix the following coccicheck warning: sound/pci/hda/patch_hdmi.c:1852:2-8: preceding lock on line 1846 After add sanity check to pass klockwork check, The spdif_mutex should be unlock before return true

Re: [PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-29 Thread Wu Bo
On 2020/4/30 10:50, Yan, Zheng wrote: On Wed, Apr 29, 2020 at 8:49 AM Wu Bo wrote: On 2020/4/28 22:48, Jeff Layton wrote: On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote: if the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock

[PATCH] fs/ceph:fix speical error code in ceph_try_get_caps()

2020-04-28 Thread Wu Bo
There are 3 speical error codes: -EAGAIN/-EFBIG/-ESTALE. After call try_get_cap_refs function, judge the same error code -EAGAIN twice. So corrected the error code of judgment from -EAGAIN to -ESTAE. Signed-off-by: Wu Bo --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-28 Thread Wu Bo
On 2020/4/28 22:48, Jeff Layton wrote: On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote: if the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock will be released at the retry or out_unlock tag. The problem looks real, but

Re: [PATCH] fs/ceph:fix double unlock in handle_cap_export()

2020-04-28 Thread Wu Bo
On 2020/4/28 21:41, Yan, Zheng wrote: On Tue, Apr 28, 2020 at 8:50 PM Wu Bo wrote: If the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock will be released at the retry or out_unlock tag. at retry label, i_ceph_lock get

[PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-28 Thread Wu Bo
if the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock will be released at the retry or out_unlock tag. -- v1 -> v2: add spin_lock(&ci->i_ceph_lock) before goto out_unlock tag. Signed-off-by: Wu Bo --- fs/ceph/c

[PATCH] fs/ceph:fix double unlock in handle_cap_export()

2020-04-28 Thread Wu Bo
If the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock will be released at the retry or out_unlock tag. Signed-off-by: Wu Bo --- fs/ceph/caps.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions