Shetty, Harshini X (EXT-Sony Mobile)
75fa601934
dm verity fec: fix memory leak in verity_fec_dtr
Fix below kmemleak detected in verity_fec_ctr. output_pool is
allocated for each dm-verity-fec device. But it is not freed when
dm-table for the verity target is removed. Hence free the output
mempool in destructor function verity_fec_dtr.
unreferenced object 0xffffffffa574d000 (size 4096):
comm "init", pid 1667, jiffies 4294894890 (age 307.168s)
hex dump (first 32 bytes):
8e 36 00 98 66 a8 0b 9b 00 00 00 00 00 00 00 00 .6..f...........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<0000000060e82407>] __kmalloc+0x2b4/0x340
[<00000000dd99488f>] mempool_kmalloc+0x18/0x20
[<000000002560172b>] mempool_init_node+0x98/0x118
[<000000006c3574d2>] mempool_init+0x14/0x20
[<0000000008cb266e>] verity_fec_ctr+0x388/0x3b0
[<000000000887261b>] verity_ctr+0x87c/0x8d0
[<000000002b1e1c62>] dm_table_add_target+0x174/0x348
[<000000002ad89eda>] table_load+0xe4/0x328
[<000000001f06f5e9>] dm_ctl_ioctl+0x3b4/0x5a0
[<00000000bee5fbb7>] do_vfs_ioctl+0x5dc/0x928
[<00000000b475b8f5>] __arm64_sys_ioctl+0x70/0x98
[<000000005361e2e8>] el0_svc_common+0xa0/0x158
[<000000001374818f>] el0_svc_handler+0x6c/0x88
[<000000003364e9f4>] el0_svc+0x8/0xc
[<000000009d84cec9>] 0xffffffffffffffff
Fixes: a739ff3f54 ("dm verity: add support for forward error correction")
Depends-on: 6f1c819c21 ("dm: convert to bioset_init()/mempool_init()")
Cc: stable@vger.kernel.org
Signed-off-by: Harshini Shetty <harshini.x.shetty@sony.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2020-03-24 12:00:29 -04:00
..
2020-03-02 20:01:32 -07:00
2020-01-14 20:15:53 -05:00
2019-11-05 14:53:03 -05:00
2017-06-09 09:27:32 -06:00
2020-01-07 12:07:08 -05:00
2017-03-07 11:30:16 -05:00
2020-03-03 10:02:46 -05:00
2019-09-13 17:00:21 -04:00
2017-11-02 11:10:55 +01:00
2018-04-30 15:40:40 -04:00
2017-03-07 13:28:31 -05:00
2016-12-16 00:13:41 +02:00
2019-04-18 16:18:25 -04:00
2017-03-07 13:28:31 -05:00
2017-03-07 13:28:31 -05:00
2018-10-16 14:34:59 -04:00
2017-03-07 13:28:31 -05:00
2020-03-03 11:10:21 -05:00
2019-12-05 15:27:54 -05:00
2019-12-05 15:27:54 -05:00
2019-12-05 17:05:23 -05:00
2019-04-04 15:33:59 -04:00
2020-03-24 11:17:33 -04:00
2019-04-26 11:29:32 -04:00
2020-01-07 11:43:36 -05:00
2019-05-21 10:50:45 +02:00
2015-11-04 21:19:53 -08:00
2019-05-16 15:55:48 -07:00
2019-11-12 19:12:07 -07:00
2019-07-15 11:03:01 -03:00
2020-03-24 11:25:11 -04:00
2018-06-05 08:47:43 -06:00
2019-09-16 10:18:01 -04:00
2019-08-15 15:57:39 -04:00
2019-11-12 19:12:07 -07:00
2018-05-30 15:33:32 -06:00
2019-07-09 14:13:33 -04:00
2016-11-01 09:43:26 -06:00
2020-03-03 11:10:21 -05:00
2016-02-22 22:34:42 -05:00
2018-01-29 13:44:58 -05:00
2019-08-26 11:05:32 -04:00
2020-01-07 11:43:37 -05:00
2018-06-12 18:28:00 -07:00
2017-02-17 00:54:09 -05:00
2019-09-05 19:52:34 -06:00
2019-03-05 14:48:50 -05:00
2018-01-29 13:44:58 -05:00
2020-01-15 21:43:09 -07:00
2016-01-08 20:03:05 -05:00
2020-01-07 12:07:17 -05:00
2019-09-04 09:39:22 -04:00
2017-11-02 11:10:55 +01:00
2019-11-05 14:09:59 -05:00
2019-03-05 14:48:51 -05:00
2018-10-11 11:36:09 -04:00
2019-12-03 08:51:25 -07:00
2019-04-25 15:38:52 -04:00
2020-02-27 12:00:53 -05:00
2019-12-05 17:05:24 -05:00
2020-01-14 20:23:13 -05:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2018-12-18 09:02:26 -05:00
2020-03-24 12:00:29 -04:00
2019-05-30 11:26:32 -07:00
2020-03-03 11:10:21 -05:00
2019-08-23 10:13:14 -04:00
2019-08-23 10:13:14 -04:00
2019-08-23 10:13:14 -04:00
2020-03-24 11:55:09 -04:00
2017-06-09 09:27:32 -06:00
2020-01-07 11:43:38 -05:00
2019-11-07 10:08:36 -05:00
2020-03-03 11:10:21 -05:00
2019-11-07 10:08:36 -05:00
2020-03-03 11:10:20 -05:00
2019-08-23 10:13:12 -04:00
2019-11-20 10:35:31 -05:00
2019-09-12 09:32:31 -04:00
2020-02-08 13:04:49 -08:00
2018-08-01 15:49:39 -07:00
2019-05-24 17:27:12 +02:00
2018-10-18 09:36:35 -07:00
2019-05-24 17:27:13 +02:00
2019-10-24 15:22:40 -07:00
2017-11-14 16:07:26 -08:00
2019-10-24 15:22:40 -07:00
2018-05-30 15:33:32 -06:00
2020-02-04 03:05:26 +00:00
2020-01-13 11:44:10 -08:00
2020-01-15 21:43:09 -07:00
2019-09-13 13:10:05 -07:00
2019-06-15 01:37:35 -06:00
2020-01-13 11:44:10 -08:00
2018-05-30 15:33:32 -06:00
2019-06-05 17:36:37 +02:00
2019-03-12 10:15:18 -07:00
2019-12-09 10:36:44 -08:00
2020-01-13 11:44:09 -08:00
2019-09-13 13:14:43 -07:00
2019-11-11 16:47:39 -08:00
2018-05-30 15:33:32 -06:00