Bharat Potnuri
58668d153b
iser-target: avoid reinitializing rdma contexts for isert commands
[ Upstream commit 66f53e6f54 ]
isert commands that failed during isert_rdma_rw_ctx_post() are queued to
Queue-Full(QF) queue and are scheduled to be reposted during queue-full
queue processing. During this reposting, the rdma contexts are initialised
again in isert_rdma_rw_ctx_post(), which is leaking significant memory.
unreferenced object 0xffff8830201d9640 (size 64):
comm "kworker/0:2", pid 195, jiffies 4295374851 (age 4528.436s)
hex dump (first 32 bytes):
00 60 8b cb 2e 00 00 00 00 10 00 00 00 00 00 00 .`..............
00 90 e3 cb 2e 00 00 00 00 10 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8170711e>] kmemleak_alloc+0x4e/0xb0
[<ffffffff811f8ba5>] __kmalloc+0x125/0x2b0
[<ffffffffa046b24f>] rdma_rw_ctx_init+0x15f/0x6f0 [ib_core]
[<ffffffffa07ab644>] isert_rdma_rw_ctx_post+0xc4/0x3c0 [ib_isert]
[<ffffffffa07ad972>] isert_put_datain+0x112/0x1c0 [ib_isert]
[<ffffffffa07dddce>] lio_queue_data_in+0x2e/0x30 [iscsi_target_mod]
[<ffffffffa076c322>] target_qf_do_work+0x2b2/0x4b0 [target_core_mod]
[<ffffffff81080c3b>] process_one_work+0x1db/0x5d0
[<ffffffff8108107d>] worker_thread+0x4d/0x3e0
[<ffffffff81088667>] kthread+0x117/0x150
[<ffffffff81713fa7>] ret_from_fork+0x27/0x40
[<ffffffffffffffff>] 0xffffffffffffffff
Here is patch to use the older rdma contexts while reposting
the isert commands intead of reinitialising them.
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24 11:01:25 +01:00
..
2017-11-02 11:10:55 +01:00
2018-03-08 22:41:26 -08:00
2017-11-02 11:10:55 +01:00
2018-02-25 11:07:52 +01:00
2018-02-16 20:22:59 +01:00
2017-12-14 09:53:13 +01:00
2018-02-07 11:12:20 -08:00
2018-03-19 08:42:47 +01:00
2017-11-02 11:10:55 +01:00
2018-03-15 10:54:32 +01:00
2018-03-24 11:01:21 +01:00
2018-01-10 09:31:19 +01:00
2017-11-02 11:10:55 +01:00
2018-03-24 11:01:24 +01:00
2018-03-19 08:42:52 +01:00
2018-02-16 20:23:09 +01:00
2018-03-24 11:01:21 +01:00
2017-12-25 14:26:30 +01:00
2018-03-19 08:42:55 +01:00
2017-12-20 10:10:34 +01:00
2018-02-22 15:42:16 +01:00
2017-11-02 11:10:55 +01:00
2018-03-24 11:01:23 +01:00
2018-03-19 08:42:47 +01:00
2018-03-08 22:41:20 -08:00
2017-11-02 11:10:55 +01:00
2018-02-28 10:19:39 +01:00
2017-11-02 11:10:55 +01:00
2018-02-16 20:22:56 +01:00
2017-11-02 11:10:55 +01:00
2018-02-07 11:12:26 -08:00
2017-08-28 17:15:16 +02:00
2018-02-25 11:07:56 +01:00
2018-03-24 11:01:24 +01:00
2018-03-19 08:42:47 +01:00
2017-11-02 11:10:55 +01:00
2017-12-25 14:26:20 +01:00
2018-02-22 15:42:24 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-28 10:19:39 +01:00
2017-12-17 15:08:00 +01:00
2017-11-04 15:01:50 +01:00
2018-03-19 08:42:51 +01:00
2018-03-24 11:01:25 +01:00
2018-03-15 10:54:32 +01:00
2018-01-10 09:31:21 +01:00
2018-03-21 12:06:44 +01:00
2017-11-02 11:10:55 +01:00
2018-03-19 08:42:50 +01:00
2017-12-20 10:10:38 +01:00
2017-11-02 11:10:55 +01:00
2017-12-14 09:53:12 +01:00
2017-11-02 11:10:55 +01:00
2018-03-19 08:42:54 +01:00
2018-03-24 11:01:24 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:46 +01:00
2018-02-25 11:08:04 +01:00
2018-03-24 11:01:24 +01:00
2018-03-19 08:42:50 +01:00
2018-01-17 09:45:27 +01:00
2018-03-24 11:01:24 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:49 +01:00
2018-03-08 22:41:26 -08:00
2017-11-02 11:10:55 +01:00
2018-03-03 10:24:37 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:47 +01:00
2017-11-02 11:10:55 +01:00
2018-03-15 10:54:32 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-03 10:24:22 +01:00
2018-03-19 08:42:52 +01:00
2018-03-24 11:01:23 +01:00
2017-11-02 11:10:55 +01:00
2018-03-19 08:42:50 +01:00
2017-09-08 18:26:51 -07:00
2017-11-02 11:10:55 +01:00
2018-03-19 08:42:51 +01:00
2017-12-14 09:53:08 +01:00
2017-11-02 11:10:55 +01:00
2018-03-15 10:54:28 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-20 10:10:29 +01:00
2018-03-24 11:01:24 +01:00
2018-03-08 22:41:20 -08:00
2017-11-02 11:10:55 +01:00
2018-03-24 11:01:21 +01:00
2017-11-02 11:10:55 +01:00
2018-02-25 11:07:56 +01:00
2018-03-24 11:01:22 +01:00
2017-08-28 13:52:22 +02:00
2017-11-02 11:10:55 +01:00
2018-03-24 11:01:21 +01:00
2018-02-22 15:42:29 +01:00
2017-12-25 14:26:24 +01:00
2017-12-25 14:26:31 +01:00
2017-12-20 10:10:24 +01:00
2018-03-24 11:01:23 +01:00
2017-11-02 11:10:55 +01:00
2018-03-21 12:06:45 +01:00
2017-11-02 11:10:55 +01:00
2018-03-08 22:41:06 -08:00
2018-02-25 11:07:45 +01:00
2018-03-19 08:42:47 +01:00
2017-08-29 08:52:51 -05:00
2018-03-15 10:54:32 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-24 11:01:23 +01:00
2018-03-03 10:24:37 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-25 11:07:53 +01:00