Re: [PATCH 1/1] fix memory leak during adapter release by destroying gid_pn_req

"Martin K. Petersen" <[email protected]>
Newsgroups gmane.linux.scsi
Message-ID <[email protected]>
On Mon, 20 Jul 2026 09:27:36 +0200, Nihar Panda wrote:

> When releasing an adapter we don't free the mempool `gid_pn_req` that is
> allocated during the enqueue. This leaks memory:
> 
>   unreferenced object 0xd8d29297de700 (size 256):
>     comm "(udev-worker)", pid 2105, jiffies 4294945794
>     hex dump (first 32 bytes):
>       00 00 00 00 de ad 4e ad ff ff ff ff 00 00 00 00  ......N.........
>       ff ff ff ff ff ff ff ff 00 0d c4 5f 67 9d 99 e0  ..........._g...
>     backtrace (crc 4a5b5da2):
>       [<000dc45f64da418c>] kmemleak_alloc+0x6c/0xa0
>       [<000dc45f62b430aa>] __kmalloc_cache_node_noprof+0x36a/0x4d0
>       [<000dc45f629a535a>] mempool_create_node_noprof+0xaa/0x150
>       [<000dc45ee2c065e6>] zfcp_allocate_low_mem_buffers+0x96/0x370 [zfcp]
>       [<000dc45ee2c070f8>] zfcp_adapter_enqueue+0x598/0xd40 [zfcp]
>       [<000dc45ee2c08eb0>] zfcp_ccw_set_online+0x160/0x210 [zfcp]
>       [<000dc45f643d4762>] ccw_device_set_online+0x232/0xd80
>       [<000dc45f643d53d4>] online_store_recog_and_online+0x124/0x390
>       [<000dc45f643d8238>] online_store+0x298/0x5b0
>       [<000dc45f62eb0a04>] kernfs_fop_write_iter+0x2c4/0x480
>       [<000dc45f62c81150>] new_sync_write+0x370/0x4b0
>       [<000dc45f62c87abe>] vfs_write+0x43e/0x5b0
>       [<000dc45f62c87ff4>] ksys_write+0x114/0x1f0
>       [<000dc45f621c4a16>] do_syscall+0x2f6/0x430
>       [<000dc45f64d9d5d8>] __do_syscall+0xc8/0x1c0
>       [<000dc45f64dc2224>] system_call+0x74/0xa0
> 
> [...]

Applied to 7.2/scsi-fixes, thanks!

[1/1] fix memory leak during adapter release by destroying gid_pn_req
      https://git.kernel.org/mkp/scsi/c/b601fa590e66

-- 
Martin K. Petersen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.