Shetty, Harshini X (EXT-Sony Mobile)
9276066747
dm verity fec: fix memory leak in verity_fec_dtr
commit 75fa601934 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-17 10:48:50 +02:00
..
2020-02-24 08:34:53 +01:00
2020-02-11 04:34:03 -08:00
2018-06-08 11:53:14 -04:00
2017-06-09 09:27:32 -06:00
2018-06-08 11:53:14 -04:00
2017-03-07 11:30:16 -05:00
2020-03-25 08:06:07 +01:00
2019-08-29 08:28:49 +02: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-05-25 18:23:38 +02:00
2017-03-07 13:28:31 -05:00
2017-03-07 13:28:31 -05:00
2018-06-12 16:19:22 -07:00
2014-01-16 13:44:11 -05:00
2017-03-07 13:28:31 -05:00
2020-03-11 14:15:05 +01:00
2019-08-25 10:48:01 +02:00
2020-02-11 04:34:04 -08:00
2019-05-25 18:23:39 +02:00
2018-04-03 15:04:10 -04:00
2015-11-04 21:19:53 -08:00
2016-01-08 20:03:05 -05:00
2019-12-05 09:20:36 +01:00
2020-03-25 08:06:07 +01:00
2018-06-05 08:47:43 -06:00
2018-11-13 11:08:49 -08:00
2019-08-29 08:28:55 +02:00
2019-01-26 09:32:42 +01:00
2018-05-30 15:33:32 -06:00
2015-04-15 12:10:20 -04:00
2019-07-03 13:14:45 +02:00
2016-11-01 09:43:26 -06:00
2019-12-21 10:57:40 +01:00
2011-10-31 19:31:18 -04:00
2016-02-22 22:34:42 -05:00
2018-01-29 13:44:58 -05:00
2019-01-26 09:32:42 +01:00
2019-12-05 09:20:37 +01:00
2018-06-12 18:28:00 -07:00
2017-02-17 00:54:09 -05:00
2019-10-05 13:10:03 +02:00
2017-08-28 10:23:28 -04:00
2018-01-29 13:44:58 -05:00
2020-01-23 08:21:29 +01:00
2016-01-08 20:03:05 -05:00
2019-11-06 13:05:11 +01:00
2018-06-12 16:19:22 -07:00
2017-11-02 11:10:55 +01:00
2018-05-22 23:18:31 -07:00
2018-06-12 16:19:22 -07:00
2016-06-10 15:15:44 -04:00
2019-08-29 08:28:56 +02:00
2019-09-16 08:22:12 +02:00
2019-09-16 08:22:21 +02:00
2019-01-31 08:14:38 +01:00
2019-04-05 22:32:59 +02:00
2011-10-31 19:31:19 -04:00
2019-01-26 09:32:42 +01:00
2020-04-17 10:48:50 +02:00
2018-05-30 15:33:32 -06:00
2019-07-21 09:03:08 +02:00
2018-04-03 15:04:29 -04:00
2020-04-17 10:48:50 +02:00
2017-06-09 09:27:32 -06:00
2020-02-11 04:34:03 -08:00
2019-12-17 20:34:53 +01:00
2019-12-17 20:34:53 +01:00
2019-12-17 20:34:53 +01:00
2020-03-11 14:15:05 +01:00
2018-01-17 09:16:06 -05:00
2018-06-08 11:59:51 -04:00
2018-06-08 11:59:51 -04:00
2019-12-31 16:35:25 +01:00
2018-08-01 15:49:39 -07:00
2018-08-31 17:38:10 -07:00
2017-11-02 11:10:55 +01:00
2018-05-30 15:33:32 -06:00
2019-12-17 20:34:55 +01:00
2017-11-14 16:07:26 -08:00
2019-12-17 20:34:55 +01:00
2018-05-30 15:33:32 -06:00
2020-04-17 10:48:42 +02:00
2019-12-17 20:34:55 +01:00
2020-01-23 08:21:29 +01:00
2019-10-05 13:10:12 +02:00
2017-11-02 11:10:55 +01:00
2020-01-09 10:18:57 +01:00
2018-05-30 15:33:32 -06:00
2019-02-06 17:30:16 +01:00
2018-08-31 17:38:09 -07:00
2018-05-30 15:33:32 -06:00
2019-12-17 20:36:00 +01:00
2018-06-09 12:01:36 -07:00
2019-12-17 20:34:55 +01:00
2018-05-30 15:33:32 -06:00