Luis Henriques
310efc95c7
virtiofs: fix memory leak in virtio_fs_probe()
commit c79c5e0178922a9e092ec8fed026750f39dcaef4 upstream.
When accidentally passing twice the same tag to qemu, kmemleak ended up
reporting a memory leak in virtiofs. Also, looking at the log I saw the
following error (that's when I realised the duplicated tag):
virtiofs: probe of virtio5 failed with error -17
Here's the kmemleak log for reference:
unreferenced object 0xffff888103d47800 (size 1024):
comm "systemd-udevd", pid 118, jiffies 4294893780 (age 18.340s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ff ff ff ff ff ff 80 90 02 a0 ff ff ff ff ................
backtrace:
[<000000000ebb87c1>] virtio_fs_probe+0x171/0x7ae [virtiofs]
[<00000000f8aca419>] virtio_dev_probe+0x15f/0x210
[<000000004d6baf3c>] really_probe+0xea/0x430
[<00000000a6ceeac8>] device_driver_attach+0xa8/0xb0
[<00000000196f47a7>] __driver_attach+0x98/0x140
[<000000000b20601d>] bus_for_each_dev+0x7b/0xc0
[<00000000399c7b7f>] bus_add_driver+0x11b/0x1f0
[<0000000032b09ba7>] driver_register+0x8f/0xe0
[<00000000cdd55998>] 0xffffffffa002c013
[<000000000ea196a2>] do_one_initcall+0x64/0x2e0
[<0000000008f727ce>] do_init_module+0x5c/0x260
[<000000003cdedab6>] __do_sys_finit_module+0xb5/0x120
[<00000000ad2f48c6>] do_syscall_64+0x33/0x40
[<00000000809526b5>] entry_SYSCALL_64_after_hwframe+0x44/0xae
Cc: stable@vger.kernel.org
Signed-off-by: Luis Henriques <lhenriques@suse.de>
Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesystem")
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-11 14:04:14 +02:00
..
2020-11-05 11:43:34 +01:00
2019-07-19 11:33:22 -07:00
2021-03-04 10:26:48 +01:00
2021-03-24 11:26:37 +01:00
2019-10-25 00:03:11 -04:00
2019-08-30 07:27:17 -07:00
2021-01-06 14:48:39 +01:00
2021-05-11 14:04:14 +02:00
2020-11-05 11:43:36 +01:00
2020-12-30 11:51:40 +01:00
2021-05-11 14:04:04 +02:00
2019-09-19 09:42:37 -07:00
2021-03-17 17:03:56 +01:00
2019-11-23 21:44:49 -05:00
2021-01-06 14:48:35 +01:00
2021-03-04 10:26:10 +01:00
2019-09-03 09:30:56 -04:00
2020-10-29 09:58:03 +01:00
2021-05-11 14:04:02 +02:00
2020-12-02 08:49:53 +01:00
2019-08-30 07:27:17 -07:00
2021-05-11 14:04:02 +02:00
2019-11-10 11:56:05 -05:00
2020-09-09 19:12:30 +02:00
2021-04-07 14:47:40 +02:00
2021-03-07 12:20:46 +01:00
2020-06-17 16:40:36 +02:00
2019-08-30 07:27:17 -07:00
2019-07-10 18:43:43 -07:00
2021-05-11 14:04:14 +02:00
2021-04-16 11:46:37 +02:00
2019-05-21 10:50:46 +02:00
2020-04-17 10:50:22 +02:00
2021-04-14 08:24:14 +02:00
2019-08-30 08:11:25 -07:00
2021-03-30 14:35:19 +02:00
2021-04-07 14:47:38 +02:00
2021-03-04 10:26:30 +01:00
2020-11-18 19:20:30 +01:00
2021-03-04 10:26:25 +01:00
2021-03-07 12:20:41 +01:00
2020-08-19 08:16:12 +02:00
2020-12-30 11:51:16 +01:00
2020-08-21 13:05:37 +02:00
2021-03-30 14:35:23 +02:00
2020-12-30 11:51:22 +01:00
2021-04-07 14:47:39 +02:00
2020-06-17 16:40:29 +02:00
2019-05-21 10:50:46 +02:00
2020-06-17 16:40:24 +02:00
2021-02-26 10:10:27 +01:00
2021-04-14 08:24:10 +02:00
2019-08-30 08:11:25 -07:00
2019-07-19 10:42:02 -07:00
2020-08-21 13:05:29 +02:00
2021-05-07 10:51:38 +02:00
2021-01-12 20:16:10 +01:00
2021-03-04 10:26:45 +01:00
2019-08-30 07:27:17 -07:00
2019-08-30 07:27:17 -07:00
2021-03-04 10:26:26 +01:00
2020-10-29 09:57:53 +01:00
2021-04-07 14:47:43 +02:00
2020-08-26 10:40:51 +02:00
2021-03-30 14:35:23 +02:00
2021-03-07 12:20:48 +01:00
2019-08-30 07:27:18 -07:00
2019-10-12 20:49:07 -04:00
2021-03-04 10:26:26 +01:00
2021-03-17 17:03:41 +01:00
2020-08-21 13:05:37 +02:00
2019-09-17 11:48:24 -04:00
2019-08-12 19:33:50 -07:00
2021-03-07 12:20:42 +01:00
2020-06-17 16:40:24 +02:00
2019-07-19 10:42:02 -07:00
2020-02-11 04:35:12 -08:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2020-06-03 08:21:27 +02:00
2019-05-21 10:50:45 +02:00
2020-09-03 11:26:39 +02:00
2021-03-17 17:03:57 +01:00
2019-05-21 10:50:45 +02:00
2021-04-16 11:46:38 +02:00
2020-11-05 11:43:24 +01:00
2020-01-14 20:08:18 +01:00
2019-05-30 11:29:21 -07:00
2020-01-09 10:20:05 +01:00
2019-06-19 17:09:55 +02:00
2020-12-11 13:23:30 +01:00
2020-10-29 09:57:45 +01:00
2021-02-26 10:10:28 +01:00
2020-10-01 13:17:19 +02:00
2019-05-21 10:50:45 +02:00
2021-04-14 08:24:11 +02:00
2020-01-12 12:21:37 +01:00
2020-02-11 04:35:37 -08:00
2020-10-07 08:01:31 +02:00
2021-01-09 13:44:55 +01:00
2021-01-06 14:48:39 +01:00
2019-08-07 21:51:47 -04:00
2019-08-19 11:00:39 -04:00
2020-05-27 17:46:12 +02:00
2020-04-17 10:50:21 +02: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
2019-05-21 10:50:45 +02:00
2021-01-30 13:54:11 +01:00
2019-07-19 10:42:02 -07:00
2020-03-25 08:25:58 +01:00
2020-01-17 19:48:21 +01:00
2021-01-30 13:54:10 +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
2020-11-24 13:29:19 +01:00
2020-03-25 08:25:41 +01:00
2019-09-18 16:59:14 -07:00
2019-05-21 10:50:45 +02:00
2019-07-16 22:52:37 -04:00
2020-01-17 19:48:21 +01:00
2020-03-05 16:43:48 +01:00
2021-01-06 14:48:40 +01:00
2019-05-30 11:26:32 -07:00
2019-05-25 18:00:06 -04:00
2020-03-18 07:17:51 +01:00
2019-05-25 18:00:07 -04:00
2020-05-02 08:48:44 +02:00
2021-03-17 17:03:33 +01:00
2019-05-21 10:50:45 +02:00
2019-09-06 21:28:49 +02:00
2020-02-11 04:35:23 -08:00
2021-04-21 12:56:16 +02:00
2021-03-24 11:26:44 +01:00
2019-08-13 16:06:52 -07:00
2020-08-26 10:40:58 +02:00
2019-12-17 19:56:52 +01:00
2019-05-21 10:50:45 +02:00
2019-10-03 14:21:35 -07:00
2020-11-24 13:29:01 +01:00
2019-05-14 09:47:50 -07: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
2020-08-11 15:33:39 +02:00