Fabian Frederick
edf15aa180
ext4: fix memory leak in ext4_insert_range()
Running xfstests generic/013 with kmemleak gives the following:
unreferenced object 0xffff8801d3d27de0 (size 96):
comm "fsstress", pid 4941, jiffies 4294860168 (age 53.485s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff818eaaf3>] kmemleak_alloc+0x23/0x40
[<ffffffff81179805>] __kmalloc+0xf5/0x1d0
[<ffffffff8122ef5c>] ext4_find_extent+0x1ec/0x2f0
[<ffffffff8123530c>] ext4_insert_range+0x34c/0x4a0
[<ffffffff81235942>] ext4_fallocate+0x4e2/0x8b0
[<ffffffff81181334>] vfs_fallocate+0x134/0x210
[<ffffffff8118203f>] SyS_fallocate+0x3f/0x60
[<ffffffff818efa9b>] entry_SYSCALL_64_fastpath+0x13/0x8f
[<ffffffffffffffff>] 0xffffffffffffffff
Problem seems mitigated by dropping refs and freeing path
when there's no path[depth].p_ext
Cc: stable@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-15 11:39:52 -04:00
..
2016-03-31 00:30:15 -04:00
2014-01-25 23:58:19 -05:00
2016-07-26 18:35:55 -07:00
2015-04-02 23:47:42 -04:00
2015-10-17 16:16:04 -04:00
2016-07-10 14:01:03 -04:00
2016-03-09 23:49:05 -05:00
2015-10-17 22:57:06 -04:00
2016-06-26 18:24:01 -04:00
2016-09-05 23:11:58 -04:00
2016-04-27 01:11:21 -04:00
2015-09-23 12:46:17 -04:00
2016-09-15 11:39:52 -04:00
2016-07-26 19:55:54 -07:00
2016-09-05 23:21:43 -04:00
2015-04-02 23:47:42 -04:00
2016-09-05 23:11:58 -04:00
2016-05-13 00:44:16 -04:00
2016-07-10 14:01:03 -04:00
2016-09-15 11:32:46 -04:00
2016-09-05 23:11:58 -04:00
2016-07-10 14:01:03 -04:00
2016-07-10 14:01:03 -04:00
2016-07-28 12:59:05 -07:00
2016-03-13 17:18:12 -04:00
2016-03-09 23:49:05 -05:00
2016-06-07 13:41:38 -06:00
2016-08-29 15:45:11 -04:00
2016-07-26 18:35:55 -07:00
2016-07-26 18:35:55 -07:00
2016-07-26 19:55:54 -07:00
2016-04-27 01:11:21 -04:00
2016-09-05 23:38:36 -04:00
2016-07-10 14:01:03 -04:00
2016-05-29 19:08:00 -04:00
2015-12-07 14:28:03 -05:00
2016-05-27 15:39:43 -04:00
2016-05-27 15:39:43 -04:00
2016-05-27 15:39:43 -04:00
2016-08-29 15:44:11 -04:00
2016-07-31 23:38:36 -04:00