Benjamin Block
b601fa590e
scsi: zfcp: Fix memory leak during adapter release by destroying gid_pn_req
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
Fix this by destroying the mempool during the adapter's release.
Fixes: 799b76d09a ("[SCSI] zfcp: Decouple gid_pn requests from erp")
Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Tested-by: M Nikhil <nikh1092@linux.ibm.com>
Acked-by: M Nikhil <nikh1092@linux.ibm.com>
Reviewed-by: Chinmaya Kajagar <chinmayk@linux.ibm.com>
Reviewed-by: Nihar Panda <niharp@linux.ibm.com>
Link: https://patch.msgid.link/20260720072736.3381816-2-niharp@linux.ibm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2026-07-28 21:52:09 -04:00
..
2026-06-26 17:03:48 -07:00
2026-06-26 13:00:10 -07:00
2026-06-18 08:12:50 -07:00
2026-06-16 08:53:53 -07:00
2026-06-26 10:47:26 -07:00
2026-06-26 16:15:53 -07:00
2026-06-11 14:24:42 -04:00
2026-06-22 12:20:21 -07:00
2026-06-17 11:54:57 -07:00
2026-06-25 09:00:53 -07:00
2026-06-25 12:48:57 -07:00
2026-06-15 13:57:13 +05:30
2026-06-08 21:26:09 +02:00
2026-06-18 20:53:00 -07:00
2026-06-23 14:00:29 +02:00
2026-06-24 12:48:43 -07:00
2026-06-12 13:47:53 -07:00
2026-06-19 10:14:34 -07:00
2026-06-24 12:48:43 -07:00
2026-06-17 10:21:00 +01:00
2026-06-13 13:24:34 -07:00
2026-06-13 11:10:23 +09:00
2026-06-22 12:20:21 -07:00
2026-06-23 10:44:29 +02:00
2026-06-26 17:03:48 -07:00
2026-06-18 20:53:00 -07:00
2026-06-22 08:06:13 -07:00
2026-06-23 08:31:33 -07:00
2026-06-08 21:51:12 -05:00
2026-06-22 12:20:21 -07:00
2026-06-23 17:53:08 +02:00
2026-06-16 23:19:45 +02:00
2026-06-15 15:08:14 +05:30
2026-06-22 12:20:21 -07:00
2026-06-18 08:16:21 -07:00
2026-06-26 22:42:56 -07:00
2026-06-25 12:48:57 -07:00
2026-06-22 08:06:13 -07:00
2026-06-23 16:02:03 -07:00
2026-06-18 14:45:08 -07:00
2026-06-02 21:27:25 +02:00
2026-06-20 21:18:39 -05:00
2026-06-25 09:56:47 -07:00
2026-06-18 17:21:54 -07:00
2026-06-17 11:21:40 -07:00
2026-06-18 14:26:29 -07:00
2026-06-24 12:48:43 -07:00
2026-06-16 13:02:47 +05:30
2026-06-21 12:25:17 -07:00
2026-06-25 12:25:36 -07:00
2026-06-11 20:24:47 +02:00
2026-06-28 07:46:12 -07:00
2026-06-18 16:27:58 -07:00
2026-06-25 09:56:47 -07:00
2026-06-05 17:18:58 +02:00
2026-06-24 07:56:55 -05:00
2026-06-24 12:48:43 -07:00
2026-06-03 20:50:24 +01:00
2026-06-23 15:41:48 -07:00
2026-06-18 15:03:21 -07:00
2026-06-27 11:00:18 -07:00
2026-06-15 21:12:35 +02:00
2026-06-25 09:20:26 -07:00
2026-06-17 11:38:38 +01:00
2026-06-27 13:48:12 -07:00
2026-06-21 13:20:19 -07:00
2026-06-16 05:31:01 +05:30
2026-06-26 11:07:26 -07:00
2026-06-08 21:53:51 -05:00
2026-06-16 05:18:04 +05:30
2026-06-20 23:31:15 -07:00
2026-06-27 11:00:18 -07:00
2026-07-28 21:52:09 -04:00
2026-07-28 21:52:08 -04:00
2026-06-05 17:19:51 +02:00
2026-06-17 11:21:40 -07:00
2026-06-27 12:15:23 -07:00
2026-06-26 11:18:49 -07:00
2026-06-22 12:43:16 -07:00
2026-07-28 21:52:08 -04:00
2026-06-17 11:21:40 -07:00
2026-06-26 13:24:59 -07:00
2026-06-22 12:09:47 -07:00
2026-06-22 11:51:49 -07:00
2026-07-28 21:52:09 -04:00
2026-06-22 12:09:47 -07:00
2026-06-10 02:17:00 -04:00
2026-06-10 14:33:05 -06:00
2026-06-21 13:20:19 -07:00
2026-06-26 15:12:45 +02:00
2026-06-22 12:20:21 -07:00
2026-06-17 11:49:00 -07:00
2026-06-08 21:37:56 +02:00
2026-06-16 08:04:24 +05:30
2026-07-08 21:21:52 -04:00