Quanyang Wang
c533cf50fd
ubifs: Fix memory leak from c->sup_node
...
commit ff90bdfb20
upstream.
The c->sup_node is allocated in function ubifs_read_sb_node but
is not freed. This will cause memory leak as below:
unreferenced object 0xbc9ce000 (size 4096):
comm "mount", pid 500, jiffies 4294952946 (age 315.820s)
hex dump (first 32 bytes):
31 18 10 06 06 7b f1 11 02 00 00 00 00 00 00 00 1....{..........
00 10 00 00 06 00 00 00 00 00 00 00 08 00 00 00 ................
backtrace:
[<d1c503cd>] ubifs_read_superblock+0x48/0xebc
[<a20e14bd>] ubifs_mount+0x974/0x1420
[<8589ecc3>] legacy_get_tree+0x2c/0x50
[<5f1fb889>] vfs_get_tree+0x28/0xfc
[<bbfc7939>] do_mount+0x4f8/0x748
[<4151f538>] ksys_mount+0x78/0xa0
[<d59910a9>] ret_fast_syscall+0x0/0x54
[<1cc40005>] 0x7ea02790
Free it in ubifs_umount and in the error path of mount_ubifs.
Fixes: fd6150051b
("ubifs: Store read superblock node")
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com >
Signed-off-by: Richard Weinberger <richard@nod.at >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-02-11 04:35:48 -08:00
..
2019-09-27 15:10:34 -07:00
2019-07-19 11:33:22 -07:00
2020-01-17 19:48:50 +01:00
2020-01-29 16:45:24 +01:00
2019-10-25 00:03:11 -04:00
2019-08-30 07:27:17 -07:00
2019-08-30 07:27:17 -07:00
2020-02-11 04:35:34 -08:00
2020-01-29 16:45:24 +01:00
2020-02-05 21:22:39 +00:00
2019-09-19 09:42:37 -07:00
2020-02-11 04:35:12 -08:00
2019-11-23 21:44:49 -05:00
2020-02-11 04:35:20 -08:00
2020-02-01 09:34:35 +00:00
2019-09-03 09:30:56 -04:00
2019-07-12 17:37:53 -07:00
2019-11-10 11:57:45 -05:00
2019-07-19 10:42:02 -07:00
2019-08-30 07:27:17 -07:00
2020-02-11 04:35:23 -08:00
2019-11-10 11:56:05 -05:00
2020-02-11 04:35:45 -08:00
2020-02-11 04:35:32 -08:00
2020-02-11 04:35:25 -08:00
2019-09-25 17:51:40 -07:00
2019-08-30 07:27:17 -07:00
2019-07-10 18:43:43 -07:00
2020-02-11 04:35:43 -08:00
2020-02-11 04:35:35 -08:00
2019-07-16 19:23:23 -07:00
2019-08-30 08:11:25 -07:00
2020-01-04 19:19:19 +01:00
2020-01-04 19:17:31 +01:00
2019-09-19 09:42:37 -07:00
2020-02-11 04:35:32 -08:00
2019-12-04 22:31:06 +01:00
2019-09-19 09:42:37 -07:00
2019-12-13 08:42:53 +01:00
2019-07-03 17:52:09 -04:00
2019-08-30 07:27:17 -07:00
2020-02-11 04:35:32 -08:00
2020-02-11 04:35:47 -08:00
2019-07-01 08:25:34 -07:00
2020-01-12 12:21:38 +01:00
2020-02-11 04:35:12 -08:00
2020-02-11 04:35:42 -08:00
2019-08-30 08:11:25 -07:00
2019-07-19 10:42:02 -07:00
2019-09-19 10:21:35 -07:00
2020-02-11 04:35:24 -08:00
2019-10-19 06:32:32 -04:00
2020-01-14 20:08:28 +01:00
2019-08-30 07:27:17 -07:00
2019-08-30 07:27:17 -07:00
2020-01-12 12:21:37 +01:00
2019-09-12 21:05:34 -04:00
2020-02-05 21:22:40 +00:00
2019-09-19 10:06:57 -07:00
2019-09-19 10:06:57 -07:00
2019-07-19 10:42:02 -07:00
2019-08-30 07:27:18 -07:00
2019-10-12 20:49:07 -04:00
2020-02-11 04:35:48 -08:00
2019-09-04 18:19:43 +02:00
2019-09-19 09:42:37 -07:00
2019-09-17 11:48:24 -04:00
2019-08-12 19:33:50 -07:00
2020-01-26 10:00:59 +01:00
2020-02-11 04:35:37 -08:00
2019-07-19 10:42:02 -07:00
2020-02-11 04:35:12 -08:00
2019-10-06 13:53:27 -07:00
2019-07-16 19:23:22 -07:00
2019-07-19 10:42:02 -07:00
2019-12-13 08:43:19 +01:00
2020-01-17 19:48:21 +01:00
2020-01-14 20:08:18 +01:00
2020-01-09 10:20:05 +01:00
2019-08-03 07:02:01 -07:00
2019-08-30 19:31:09 -04:00
2019-10-22 22:53:02 -07:00
2019-07-20 09:15:51 -07:00
2019-10-14 15:04:01 -07:00
2020-01-12 12:21:37 +01:00
2020-02-11 04:35:37 -08:00
2019-08-21 00:20:40 +02:00
2019-11-29 10:10:10 +01:00
2019-08-07 21:51:47 -04:00
2019-08-19 11:00:39 -04:00
2019-09-06 21:28:49 +02:00
2019-09-12 21:06:14 -04:00
2019-07-16 22:52:37 -04:00
2020-02-11 04:35:11 -08:00
2019-07-19 10:42:02 -07:00
2020-01-12 12:21:37 +01:00
2020-01-17 19:48:21 +01:00
2020-01-29 16:45:24 +01:00
2019-12-17 19:55:30 +01:00
2019-09-18 16:59:14 -07:00
2019-06-24 09:16:47 +10:00
2019-10-14 15:04:01 -07:00
2020-01-09 10:19:57 +01:00
2019-09-18 16:59:14 -07:00
2019-07-16 22:52:37 -04:00
2020-01-17 19:48:21 +01:00
2020-02-05 21:22:39 +00:00
2019-10-16 23:15:09 -04:00
2019-09-26 10:10:30 -07:00
2019-09-06 21:28:49 +02:00
2020-02-11 04:35:23 -08:00
2020-01-29 16:45:31 +01:00
2019-07-16 19:23:25 -07:00
2019-08-13 16:06:52 -07:00
2019-12-17 19:56:52 +01:00
2019-10-03 14:21:35 -07:00
2020-01-12 12:21:38 +01:00
2019-08-01 20:51:23 +02:00
2020-01-04 19:18:32 +01:00
2020-02-11 04:35:12 -08:00