Re: memory leak in r8712_init_recv_priv

From: Nikita Zhandarovich
Date: Tue May 28 2024 - 09:31:10 EST


Hi,

I am pretty sure this issue is close to obsolete.
Original error, I imagine, has been fixed in some other commit,
while the latest bug iteration refers to a similar but technically
different issue [1] with a trace:

BUG: memory leak
unreferenced object 0xffff88810891f000 (size 4096):
comm "kworker/0:4", pid 5084, jiffies 4294944455
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 0):
[<ffffffff8166d8d2>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff8166d8d2>] slab_post_alloc_hook mm/slub.c:3944 [inline]
[<ffffffff8166d8d2>] slab_alloc_node mm/slub.c:4000 [inline]
[<ffffffff8166d8d2>] kmalloc_trace_noprof+0x282/0x320 mm/slub.c:4147
[<ffffffff84171382>] kmalloc_noprof include/linux/slab.h:660 [inline]
[<ffffffff84171382>] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130
[<ffffffff8416bb57>] r8712_init_drv_sw+0xc7/0x2a0 drivers/staging/rtl8712/os_intfs.c:311
[<ffffffff8416a6d6>] r871xu_drv_init+0x1c6/0x930 drivers/staging/rtl8712/usb_intf.c:386
[<ffffffff836c72bf>] usb_probe_interface+0x16f/0x3f0 drivers/usb/core/driver.c:399
[<ffffffff82fafe8c>] call_driver_probe drivers/base/dd.c:578 [inline]
[<ffffffff82fafe8c>] really_probe+0x12c/0x430 drivers/base/dd.c:656
[<ffffffff82fb0263>] __driver_probe_device+0xc3/0x1a0 drivers/base/dd.c:79

[1] Other issue in question can be found here:
Link: https://syzkaller.appspot.com/bug?extid=83763e624cfec6b462cb

Patch to fix the error in [1] was sent by
Nam Cao <namcao@xxxxxxxxxxxxx>.
Link: https://lore.kernel.org/all/20240525073229.4144612-1-namcao@xxxxxxxxxxxxx/T/

Once that change is pushed, this issue should most likely be closed,
since none of the old or newer reproducers trigger original bug.

Regards,
Nikita