Re: KASAN: invalid-free in p9_client_create (2)

2021-01-28 Thread wanghai (M)
在 2021/1/28 3:31, Linus Torvalds 写道: [ Participants list changed - syzbot thought this was networking and p9, but it really looks entirely like a slub internal bug. I left the innocent people on the list just to let them know they are innocent ] On Wed, Jan 27, 2021 at 6:27 AM syzbot wrote:

Re: [PATCH] staging: greybus: audio: Add missing unlock in gbaudio_dapm_free_controls()

2020-12-05 Thread wanghai (M)
在 2020/12/5 2:02, Vaibhav Agarwal 写道: On Fri, Dec 4, 2020 at 2:10 PM Johan Hovold wrote: On Fri, Dec 04, 2020 at 10:13:50AM +0800, Wang Hai wrote: Add the missing unlock before return from function gbaudio_dapm_free_controls() in the error handling case. Fixes: 510e340efe0c ("staging:

Re: [PATCH] staging: greybus: audio: Add missing unlock in gbaudio_dapm_free_controls()

2020-12-04 Thread wanghai (M)
在 2020/12/4 16:40, Johan Hovold 写道: On Fri, Dec 04, 2020 at 10:13:50AM +0800, Wang Hai wrote: Add the missing unlock before return from function gbaudio_dapm_free_controls() in the error handling case. Fixes: 510e340efe0c ("staging: greybus: audio: Add helper APIs for dynamic audio module")

Re: [PATCH net] net: bridge: Fix a warning when del bridge sysfs

2020-12-03 Thread wanghai (M)
在 2020/12/3 18:34, Nikolay Aleksandrov 写道: On 03/12/2020 03:03, Jakub Kicinski wrote: On Tue, 1 Dec 2020 22:01:14 +0800 Wang Hai wrote: If adding bridge sysfs fails, br->ifobj will be NULL, there is no need to delete its non-existent sysfs when deleting the bridge device, otherwise, it will

Re: [PATCH net] ipv6: addrlabel: fix possible memory leak in ip6addrlbl_net_init

2020-11-23 Thread wanghai (M)
在 2020/11/24 9:22, Jakub Kicinski 写道: On Sun, 22 Nov 2020 10:34:56 +0800 Wang Hai wrote: kmemleak report a memory leak as follows: unreferenced object 0x8880059c6a00 (size 64): comm "ip", pid 23696, jiffies 4296590183 (age 1755.384s) hex dump (first 32 bytes): 20 01 00 10 00

Re: [PATCH net] ipvs: fix possible memory leak in ip_vs_control_net_init

2020-11-20 Thread wanghai (M)
在 2020/11/20 2:22, Julian Anastasov 写道: Hello, On Thu, 19 Nov 2020, Wang Hai wrote: kmemleak report a memory leak as follows: BUG: memory leak unreferenced object 0x8880759ea000 (size 256): comm "syz-executor.3", pid 6484, jiffies 4297476946 (age 48.546s) hex dump (first 32

Re: [PATCH] android/ion: fix error return code in opensocket()

2020-11-18 Thread wanghai (M)
There is a syntax problem with this patch, please ignore it! 在 2020/11/18 18:39, Wang Hai 写道: Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 47a18c42d992 ("android/ion: userspace test utility for ion buffer sharing")

Re: [PATCH] PCI: dwc: fix error return code in dw_pcie_host_init()

2020-11-16 Thread wanghai (M)
在 2020/11/17 9:49, Jisheng Zhang 写道: On Mon, 16 Nov 2020 21:50:23 +0800 Wang Hai wrote: Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. good catch. Fixes: 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume")

Re: [PATCH net] devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()

2020-11-13 Thread wanghai (M)
在 2020/11/13 1:51, Jakub Kicinski 写道: On Wed, 11 Nov 2020 21:58:53 +0800 Wang Hai wrote: If sb_occ_port_pool_get() failed in devlink_nl_sb_port_pool_fill(), msg should be canceled by genlmsg_cancel(). +++ b/net/core/devlink.c @@ -1447,8 +1447,10 @@ static int

Re: [PATCH v2 bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-10 Thread wanghai (M)
在 2020/11/10 12:33, John Fastabend 写道: Wang Hai wrote: progfd is created by prog_parse_fd(), before 'bpftool net attach' exit, it should be closed. Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on interface") Signed-off-by: Wang Hai --- v1->v2: use cleanup tag

Re: [PATCH bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-09 Thread wanghai (M)
在 2020/11/9 18:51, Michal Rostecki 写道: On 11/9/20 8:04 AM, Wang Hai wrote: progfd is created by prog_parse_fd(), before 'bpftool net attach' exit, it should be closed. Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on interface") Signed-off-by: Wang Hai ---  

Re: [PATCH net-next 0/3] Fix some kernel-doc warnings for e1000/e1000e

2020-09-10 Thread wanghai (M)
在 2020/9/11 3:38, Jakub Kicinski 写道: On Thu, 10 Sep 2020 12:38:00 -0700 Jakub Kicinski wrote: On Thu, 10 Sep 2020 23:04:26 +0800 Wang Hai wrote: Wang Hai (3): e1000e: Fix some kernel-doc warnings in ich8lan.c e1000e: Fix some kernel-doc warnings in netdev.c e1000: Fix a bunch of

Re: [PATCH net-next] net/packet: Remove unused macro BLOCK_PRIV

2020-09-04 Thread wanghai (M)
在 2020/9/4 21:26, Willem de Bruijn 写道: On Fri, Sep 4, 2020 at 3:09 PM Wang Hai wrote: BPDU_TYPE_TCN is never used after it was introduced. So better to remove it. This comment does not cover the patch contents. Otherwise the patch looks good to me. Thanks for your review, I will revise

Re: [PATCH net] net: gemini: Fix missing free_netdev() in error path of gemini_ethernet_port_probe()

2020-08-18 Thread wanghai (M)
在 2020/8/19 3:54, David Miller 写道: From: Wang Hai Date: Tue, 18 Aug 2020 21:44:04 +0800 Fix the missing free_netdev() before return from gemini_ethernet_port_probe() in the error handling case. Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet") Reported-by:

Re: [PATCH net] net: qcom/emac: Fix missing clk_disable_unprepare() in error path of emac_probe

2020-08-09 Thread wanghai (M)
在 2020/8/7 21:38, Timur Tabi 写道: On 8/6/20 8:54 PM, wanghai (M) wrote: Thanks for your suggestion. May I fix it like this? Yes, this is what I had in mind.  Thanks. Acked-by: Timur Tabi . Thanks for your ack. I just sent a new patch. "[PATCH net] net: qcom/emac: add m

Re: [PATCH net] net: qcom/emac: Fix missing clk_disable_unprepare() in error path of emac_probe

2020-08-06 Thread wanghai (M)
在 2020/8/6 22:23, Timur Tabi 写道: On 8/6/20 9:06 AM, Wang Hai wrote: In emac_clks_phase1_init() of emac_probe(), there may be a situation in which some clk_prepare_enable() succeed and others fail. If emac_clks_phase1_init() fails, goto err_undo_clocks to clean up the clk that was successfully

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-30 Thread wanghai (M)
在 2020/7/28 23:54, Joe Perches 写道: On Tue, 2020-07-28 at 21:38 +0800, wanghai (M) wrote: Thanks for your explanation. I got it. Can it be modified like this? [] +++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.c @@ -1152,11 +1152,8 @@ octeon_register_dispatch_fn(struct

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread wanghai (M)
在 2020/7/28 17:11, Joe Perches 写道: On Tue, 2020-07-28 at 16:42 +0800, wanghai (M) wrote: 在 2020/7/25 5:29, Joe Perches 写道: On Fri, 2020-07-24 at 21:00 +0800, Wang Hai wrote: Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/net/ethernet

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread wanghai (M)
在 2020/7/25 5:29, Joe Perches 写道: On Fri, 2020-07-24 at 21:00 +0800, Wang Hai wrote: Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/net/ethernet/cavium/liquidio/octeon_device.c:1155:14-36: WARNING: casting value returned by memory

Re: [PATCH net-next v2] net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range

2020-07-20 Thread wanghai (M)
在 2020/7/20 11:15, Joe Perches 写道: On Mon, 2020-07-20 at 10:53 +0800, Wang Hai wrote: Fix sparse build warning: drivers/net/ethernet/amazon/ena/ena_netdev.c:2193:34: warning: Using plain integer as NULL pointer [] diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c

Re: [PATCH -next] net: ena: use NULL instead of zero

2020-07-19 Thread wanghai (M)
在 2020/7/18 23:06, Joe Perches 写道: On Sat, 2020-07-18 at 19:56 +0800, Wang Hai wrote: Fix sparse build warning: drivers/net/ethernet/amazon/ena/ena_netdev.c:2193:34: warning: Using plain integer as NULL pointer Better to remove the initialization altogether and move the declaration into

Re: [PATCH] net: dsa: felix: Make some symbols static

2020-07-18 Thread wanghai (M)
Thanks for reminding me, I'll do it. 在 2020/7/18 18:40, Vladimir Oltean 写道: On Sat, Jul 18, 2020 at 06:01:58PM +0800, Wang Hai wrote: Fix sparse build warning: drivers/net/dsa/ocelot/felix_vsc9959.c:560:19: warning: symbol 'vsc9959_vcap_is2_keys' was not declared. Should it be static?

Re: [PATCH] net: cxgb3: add missed destroy_workqueue in cxgb3 probe failure

2020-07-18 Thread wanghai (M)
在 2020/7/18 9:39, David Miller 写道: From: Wang Hai Date: Fri, 17 Jul 2020 14:21:17 +0800 The driver forgets to call destroy_workqueue when cxgb3 probe fails. Add the missed calls to fix it. Fixes: 4d22de3e6cc4 ("Add support for the latest 1G/10G Chelsio adapter, T3.") Reported-by: Hulk

Re: [PATCH] net: cxgb3: add missed destroy_workqueue in nci_register_device

2020-07-17 Thread wanghai (M)
subject msg was wrong. "net: cxgb3:" should be "nfc: nci:".  v2 patch has been sent. ("[PATCH v2] nfc: nci: add missed destroy_workqueue in nci_register_device") 在 2020/7/17 14:18, Wang Hai 写道: When nfc_register_device fails in nci_register_device, destroy_workqueue() shouled be called to

Re: [PATCH v2] 9p/trans_fd: Fix concurrency del of req_list in p9_fd_cancelled/p9_read_work

2020-06-12 Thread wanghai (M)
在 2020/6/12 17:10, Dominique Martinet 写道: Wang Hai wrote on Fri, Jun 12, 2020: p9_read_work and p9_fd_cancelled may be called concurrently. In some cases, req->req_list may be deleted by both p9_read_work and p9_fd_cancelled. We can fix it by ignoring replies associated with a cancelled

Re: [PATCH] cxl: Fix kobject memleak

2020-06-03 Thread wanghai (M)
在 2020/6/3 19:33, Andrew Donnellan 写道: On 2/6/20 10:07 pm, Wang Hai wrote: Currently the error return path from kobject_init_and_add() is not followed by a call to kobject_put() - which means we are leaking the kobject. Fix it by adding a call to kobject_put() in the error path of

Re: [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr()

2020-06-03 Thread wanghai (M)
在 2020/6/3 14:50, Greg Kroah-Hartman 写道: On Wed, Jun 03, 2020 at 02:34:07PM +0800, wanghai (M) wrote: 在 2020/6/3 14:14, Greg Kroah-Hartman 写道: On Wed, Jun 03, 2020 at 09:42:41AM +0800, wanghai (M) wrote: 在 2020/6/3 1:20, Markus Elfring 写道: Fix it by adding a call to kobject_put

Re: [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr()

2020-06-03 Thread wanghai (M)
在 2020/6/3 14:14, Greg Kroah-Hartman 写道: On Wed, Jun 03, 2020 at 09:42:41AM +0800, wanghai (M) wrote: 在 2020/6/3 1:20, Markus Elfring 写道: Fix it by adding a call to kobject_put() in the error path of kobject_init_and_add(). Thanks for another completion of the exception handling. Would

Re: [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr()

2020-06-02 Thread wanghai (M)
在 2020/6/3 1:20, Markus Elfring 写道: Fix it by adding a call to kobject_put() in the error path of kobject_init_and_add(). Thanks for another completion of the exception handling. Would an other patch subject be a bit nicer? Thanks for the guidance, I will perfect this description and send a