Zqiang
5c0e4110f7
udlfb: Fix memory leak in dlfb_usb_probe
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
2020-12-15 13:44:14 +01:00
..
2020-11-30 19:29:19 +01:00
2020-12-08 18:31:56 +01:00
2020-11-22 22:58:55 +01:00
2020-05-06 19:29:10 +02:00
2020-01-30 08:04:01 -08:00
2020-09-08 13:33:31 +02:00
2020-10-27 07:56:19 +01:00
2020-04-08 12:09:15 +02:00
2020-12-08 18:34:25 +01:00
2020-11-30 20:21:54 +01:00
2020-08-23 17:36:59 -05:00
2020-12-08 18:33:28 +01:00
2020-11-30 20:04:36 +01:00
2020-09-08 13:33:15 +02:00
2020-12-08 18:36:52 +01:00
2020-01-06 09:45:59 +01:00
2020-11-30 20:04:24 +01:00
2020-01-03 14:27:43 +01:00
2020-08-23 17:36:59 -05:00
2020-09-30 16:37:39 +02:00
2020-07-10 16:17:20 +02:00
2020-08-23 17:36:59 -05:00
2020-09-08 13:33:20 +02:00
2020-10-28 19:40:11 +01:00
2020-11-17 08:47:15 +01:00
2020-12-08 18:34:08 +01:00
2020-03-09 11:12:19 +01:00
2020-01-30 08:04:01 -08:00
2020-12-08 18:34:08 +01:00
2020-12-08 18:34:08 +01:00
2020-01-15 17:31:50 +01:00
2020-12-05 21:16:02 +01:00
2020-12-08 18:36:36 +01:00
2020-09-08 13:33:16 +02:00
2020-07-10 16:17:28 +02:00
2020-12-08 18:36:03 +01:00
2020-07-20 11:47:29 +02:00
2020-12-08 18:34:08 +01:00
2020-10-17 08:23:14 +02:00
2020-02-19 10:58:22 -08:00
2020-12-08 18:35:24 +01:00
2020-12-08 18:34:50 +01:00
2020-07-20 11:47:29 +02:00
2020-08-23 17:36:59 -05:00
2020-12-08 18:31:11 +01:00
2020-06-09 09:39:13 -07:00
2020-06-17 10:57:41 -07:00
2020-11-23 15:29:03 -08:00
2020-09-08 13:33:17 +02:00
2020-04-17 15:50:07 +02:00
2020-11-27 16:14:02 +01:00
2020-12-08 18:34:08 +01:00
2020-07-20 11:47:29 +02:00
2020-10-15 10:46:16 -07:00
2020-07-20 11:47:29 +02:00
2020-11-30 20:04:56 +01:00
2020-11-30 20:21:08 +01:00
2020-01-03 14:27:49 +01:00
2020-08-23 17:36:59 -05:00
2020-12-08 18:34:08 +01:00
2020-11-30 20:04:43 +01:00
2020-07-16 12:35:15 -07:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2020-08-04 07:37:23 +02:00
2020-08-05 19:47:22 +02:00
2020-03-18 12:27:03 +01:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-06-09 09:39:13 -07:00
2020-11-29 22:51:07 +01:00
2020-08-20 17:48:12 +02:00
2020-08-20 17:48:12 +02:00
2020-12-05 21:01:04 +01:00
2020-09-08 13:33:19 +02:00
2020-08-23 17:36:59 -05:00
2020-04-17 15:50:11 +02:00
2020-09-25 16:34:50 +02:00
2020-01-30 08:04:01 -08:00
2020-11-01 10:29:04 +01:00
2020-08-23 17:36:59 -05:00
2020-09-08 13:33:02 +02:00
2020-09-08 13:33:03 +02:00
2020-11-30 20:04:59 +01:00
2020-10-15 08:12:59 +02:00
2020-08-23 17:36:59 -05:00
2020-12-08 18:34:08 +01:00
2020-11-30 20:04:30 +01:00
2020-11-30 20:04:50 +01:00
2020-01-30 08:04:01 -08:00
2020-12-15 13:44:14 +01:00
2020-12-08 18:33:48 +01:00
2020-05-06 21:04:45 +02:00
2020-04-17 15:50:14 +02:00
2020-09-14 18:11:40 +02:00
2020-04-17 15:50:08 +02:00
2020-09-08 13:33:18 +02:00
2020-05-06 20:22:25 +02:00
2020-03-02 16:32:04 +01:00
2020-12-08 18:34:36 +01:00
2020-08-23 17:36:59 -05:00