Zqiang
64677f10e5
udlfb: Fix memory leak in dlfb_usb_probe
...
commit 5c0e4110f751934e748a66887c61f8e73805f0f9 upstream.
The dlfb_alloc_urb_list function is called in dlfb_usb_probe function,
after that if an error occurs, the dlfb_free_urb_list function need to
be called.
BUG: memory leak
unreferenced object 0xffff88810adde100 (size 32):
comm "kworker/1:0", pid 17, jiffies 4294947788 (age 19.520s)
hex dump (first 32 bytes):
10 30 c3 0d 81 88 ff ff c0 fa 63 12 81 88 ff ff .0........c.....
00 30 c3 0d 81 88 ff ff 80 d1 3a 08 81 88 ff ff .0........:.....
backtrace:
[<0000000019512953>] kmalloc include/linux/slab.h:552 [inline]
[<0000000019512953>] kzalloc include/linux/slab.h:664 [inline]
[<0000000019512953>] dlfb_alloc_urb_list drivers/video/fbdev/udlfb.c:1892 [inline]
[<0000000019512953>] dlfb_usb_probe.cold+0x289/0x988 drivers/video/fbdev/udlfb.c:1704
[<0000000072160152>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
[<00000000a8d6726f>] really_probe+0x159/0x480 drivers/base/dd.c:554
[<00000000c3ce4b0e>] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
[<00000000e942e01c>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844
[<00000000de0a5a5c>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
[<00000000463fbcb4>] __device_attach+0x122/0x250 drivers/base/dd.c:912
[<00000000b881a711>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
[<00000000364bbda5>] device_add+0x5ac/0xc30 drivers/base/core.c:2936
[<00000000eecca418>] usb_set_configuration+0x9de/0xb90 drivers/usb/core/message.c:2159
[<00000000edfeca2d>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238
[<000000001830872b>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293
[<00000000a8d6726f>] really_probe+0x159/0x480 drivers/base/dd.c:554
[<00000000c3ce4b0e>] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
[<00000000e942e01c>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844
[<00000000de0a5a5c>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
Reported-by: syzbot+c9e365d7f450e8aa615d@syzkaller.appspotmail.com
Signed-off-by: Zqiang <qiang.zhang@windriver.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215063022.16746-1-qiang.zhang@windriver.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-07 12:20:42 +01:00
..
2020-10-29 09:57:38 +01:00
2020-10-29 09:58:08 +01:00
2019-05-30 11:26:32 -07:00
2019-06-28 12:30:08 +02:00
2019-05-21 10:50:46 +02:00
2019-06-14 14:21:11 -06:00
2019-07-09 09:55:45 -07:00
2019-06-28 12:30:08 +02:00
2019-08-19 15:52:28 +02:00
2019-07-23 17:16:48 +02:00
2019-08-09 19:51:52 -05:00
2020-09-03 11:26:45 +02:00
2019-06-28 12:30:08 +02:00
2020-08-19 08:16:00 +02:00
2020-10-29 09:57:38 +01:00
2019-05-24 17:36:46 +02:00
2019-08-19 15:52:28 +02:00
2019-08-20 19:44:01 -05:00
2019-06-19 17:09:55 +02:00
2019-07-26 16:32:28 +02:00
2019-06-28 12:30:08 +02:00
2018-10-08 12:57:37 +02:00
2019-06-28 12:30:08 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2019-08-19 13:24:10 +02:00
2020-12-30 11:51:08 +01:00
2019-06-03 16:00:08 +02:00
2019-06-03 16:00:08 +02:00
2019-07-23 17:14:55 +02:00
2019-05-21 10:50:45 +02:00
2019-11-04 10:48:14 +01:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-06-28 12:30:08 +02:00
2019-06-28 12:30:08 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:39 +02:00
2019-06-21 15:13:14 +02:00
2019-05-30 11:26:32 -07:00
2019-07-09 09:55:45 -07:00
2019-06-19 17:09:55 +02:00
2019-08-26 17:54:00 +05:30
2019-05-21 10:50:45 +02:00
2020-08-26 10:41:04 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2019-06-07 14:38:07 +02:00
2019-06-05 17:36:37 +02:00
2019-06-28 12:30:08 +02:00
2019-06-28 12:30:08 +02:00
2019-04-01 17:46:58 +02:00
2019-05-21 10:50:45 +02:00
2021-01-12 20:16:17 +01:00
2019-06-28 12:30:08 +02:00
2019-06-28 12:30:08 +02:00
2019-07-05 17:42:13 +02:00
2021-03-04 10:26:18 +01:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:25:16 -07:00
2019-09-22 09:30:30 -07:00
2018-07-24 19:11:26 +02:00
2019-06-19 17:09:55 +02:00
2020-08-19 08:16:00 +02:00
2019-02-08 19:24:46 +01:00
2019-05-21 10:50:45 +02:00
2019-06-28 12:30:08 +02:00
2018-07-24 19:11:28 +02:00
2019-06-28 12:30:08 +02:00
2019-06-28 12:30:08 +02:00
2019-06-28 12:30:08 +02:00
2020-09-03 11:27:09 +02:00
2020-11-05 11:43:15 +01:00
2019-05-24 17:36:45 +02:00
2020-02-24 08:36:25 +01:00
2020-08-19 08:16:06 +02:00
2019-08-26 10:02:02 +02:00
2019-05-06 15:57:47 +02:00
2019-07-09 09:55:45 -07:00
2019-06-28 12:30:08 +02:00
2019-08-26 10:02:02 +02:00
2019-08-26 10:02:02 +02:00
2018-10-08 12:57:36 +02:00
2019-06-14 14:21:11 -06:00
2019-08-19 15:52:26 +02:00
2019-06-12 20:28:11 +02:00
2019-06-05 17:36:37 +02:00
2019-08-02 13:22:37 +02:00
2019-04-01 17:46:59 +02:00
2020-08-19 08:16:06 +02:00
2019-06-28 12:30:08 +02:00
2019-07-23 17:26:56 +02:00
2019-05-21 10:50:45 +02:00
2018-09-26 18:50:54 +02:00
2019-06-28 12:30:08 +02:00
2019-06-28 12:30:08 +02:00
2019-06-28 12:30:08 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-06-28 12:30:08 +02:00
2019-05-30 11:26:41 -07:00
2019-05-21 10:50:45 +02:00
2021-03-07 12:20:42 +01:00
2019-05-21 10:50:45 +02:00
2019-01-22 10:21:45 +01:00
2019-05-30 11:26:32 -07:00
2019-05-21 10:50:45 +02:00
2020-10-29 09:57:38 +01:00
2020-06-17 16:40:33 +02:00
2019-06-05 17:36:37 +02:00
2019-06-28 12:30:08 +02:00
2020-06-17 16:40:33 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-08-02 13:20:22 +02:00
2019-06-05 17:36:37 +02:00
2019-04-01 17:46:57 +02:00