<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/video/fbdev/udlfb.c, branch linux-5.11.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-03-07T11:35:44+00:00</updated>
<entry>
<title>udlfb: Fix memory leak in dlfb_usb_probe</title>
<updated>2021-03-07T11:35:44+00:00</updated>
<author>
<name>Zqiang</name>
<email>qiang.zhang@windriver.com</email>
</author>
<published>2020-12-15T06:30:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd540b2b5603bbbbd1be9edc9bb9d1d69298e1ba'/>
<id>urn:sha1:cd540b2b5603bbbbd1be9edc9bb9d1d69298e1ba</id>
<content type='text'>
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:
    [&lt;0000000019512953&gt;] kmalloc include/linux/slab.h:552 [inline]
    [&lt;0000000019512953&gt;] kzalloc include/linux/slab.h:664 [inline]
    [&lt;0000000019512953&gt;] dlfb_alloc_urb_list drivers/video/fbdev/udlfb.c:1892 [inline]
    [&lt;0000000019512953&gt;] dlfb_usb_probe.cold+0x289/0x988 drivers/video/fbdev/udlfb.c:1704
    [&lt;0000000072160152&gt;] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [&lt;00000000a8d6726f&gt;] really_probe+0x159/0x480 drivers/base/dd.c:554
    [&lt;00000000c3ce4b0e&gt;] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
    [&lt;00000000e942e01c&gt;] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844
    [&lt;00000000de0a5a5c&gt;] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
    [&lt;00000000463fbcb4&gt;] __device_attach+0x122/0x250 drivers/base/dd.c:912
    [&lt;00000000b881a711&gt;] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
    [&lt;00000000364bbda5&gt;] device_add+0x5ac/0xc30 drivers/base/core.c:2936
    [&lt;00000000eecca418&gt;] usb_set_configuration+0x9de/0xb90 drivers/usb/core/message.c:2159
    [&lt;00000000edfeca2d&gt;] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238
    [&lt;000000001830872b&gt;] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293
    [&lt;00000000a8d6726f&gt;] really_probe+0x159/0x480 drivers/base/dd.c:554
    [&lt;00000000c3ce4b0e&gt;] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
    [&lt;00000000e942e01c&gt;] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844
    [&lt;00000000de0a5a5c&gt;] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431

Reported-by: syzbot+c9e365d7f450e8aa615d@syzkaller.appspotmail.com
Signed-off-by: Zqiang &lt;qiang.zhang@windriver.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201215063022.16746-1-qiang.zhang@windriver.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>video: fbdev: udlfb: fix kobj_to_dev.cocci warnings</title>
<updated>2020-09-08T11:33:27+00:00</updated>
<author>
<name>kernel test robot</name>
<email>lkp@intel.com</email>
</author>
<published>2020-08-26T20:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6bfea83eec8e266ffe0da90037c17bca5e698eb4'/>
<id>urn:sha1:6bfea83eec8e266ffe0da90037c17bca5e698eb4</id>
<content type='text'>
 Use kobj_to_dev() instead of container_of()

Generated by: scripts/coccinelle/api/kobj_to_dev.cocci

Cc: Denis Efremov &lt;efremov@linux.com&gt;
Signed-off-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@inria.fr&gt;
Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
[b.zolnierkie: minor patch summary fixup]
[b.zolnierkie: removed "Fixes:" tag (not in upstream tree)]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.22.394.2008262252270.2522@hadrien
</content>
</entry>
<entry>
<title>video: udlfb: use true,false for bool variables</title>
<updated>2020-05-06T17:30:25+00:00</updated>
<author>
<name>Jason Yan</name>
<email>yanaijie@huawei.com</email>
</author>
<published>2020-04-22T07:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7022537b58d82d3db30bc99664d8de5f45ec29aa'/>
<id>urn:sha1:7022537b58d82d3db30bc99664d8de5f45ec29aa</id>
<content type='text'>
Fix the following coccicheck warning:

drivers/video/fbdev/udlfb.c:67:12-19: WARNING: Assignment of 0/1 to bool
variable
drivers/video/fbdev/udlfb.c:68:12-20: WARNING: Assignment of 0/1 to bool
variable
drivers/video/fbdev/udlfb.c:69:12-18: WARNING: Assignment of 0/1 to bool
variable

Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200422071836.49123-1-yanaijie@huawei.com
</content>
</entry>
<entry>
<title>video: udlfb: don't restore fb_mmap after deferred IO cleanup</title>
<updated>2019-12-03T09:11:16+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2019-11-29T10:29:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1844af349c730b159dd78cc76da2978c49fafd0'/>
<id>urn:sha1:f1844af349c730b159dd78cc76da2978c49fafd0</id>
<content type='text'>
Deferred IO now preserves the fb_ops.

Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/0f12bb51a6f2a656571cd21230b7e9d5be320db4.1575022735.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>udlfb: Make dlfb_ops constant</title>
<updated>2019-08-19T13:52:29+00:00</updated>
<author>
<name>Nishka Dasgupta</name>
<email>nishkadg.linux@gmail.com</email>
</author>
<published>2019-08-19T07:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df5eff6d2a44c8f01b0dcd61b0ed5715116e10b4'/>
<id>urn:sha1:df5eff6d2a44c8f01b0dcd61b0ed5715116e10b4</id>
<content type='text'>
Static structure dlfb_ops, of type fb_ops, is not used except to be
copied into another variable. Hence make dlfb_ops constant to protect it
from unintended modification.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta &lt;nishkadg.linux@gmail.com&gt;
Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190819075236.1051-1-nishkadg.linux@gmail.com
</content>
</entry>
<entry>
<title>video: fbdev: don't print error message on framebuffer_alloc() failure</title>
<updated>2019-06-28T10:30:08+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2019-06-28T10:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0adcdbcb179624d7b3677264f2cd228e7d89eea9'/>
<id>urn:sha1:0adcdbcb179624d7b3677264f2cd228e7d89eea9</id>
<content type='text'>
framebuffer_alloc() can fail only on kzalloc() memory allocation
failure and since kzalloc() will print error message in such case
we can omit printing extra error message in drivers (which BTW is
what the majority of framebuffer_alloc() users is doing already).

Cc: "Bruno Prémont" &lt;bonbons@linux-vserver.org&gt;
Cc: Jiri Kosina &lt;jikos@kernel.org&gt;
Cc: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 262</title>
<updated>2019-06-05T15:30:28+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T14:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12eb90f1eda1b91e6f339eb85d2ebbe2311348fd'/>
<id>urn:sha1:12eb90f1eda1b91e6f339eb85d2ebbe2311348fd</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this file is subject to the terms and conditions of the gnu general
  public license v2 see the file copying in the main directory of this
  archive for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 11 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141333.582369016@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>udlfb: introduce a rendering mutex</title>
<updated>2019-04-01T15:46:57+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2019-04-01T15:46:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=babc250e278eac7b0e671bdaedf833759b43bb78'/>
<id>urn:sha1:babc250e278eac7b0e671bdaedf833759b43bb78</id>
<content type='text'>
Rendering calls may be done simultaneously from the workqueue,
dlfb_ops_write, dlfb_ops_ioctl, dlfb_ops_set_par and dlfb_dpy_deferred_io.
The code is robust enough so that it won't crash on concurrent rendering.

However, concurrent rendering may cause display corruption if the same
pixel is simultaneously being rendered. In order to avoid this corruption,
this patch adds a mutex around the rendering calls.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
Cc: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
[b.zolnierkie: replace "dlfb:" with "uldfb:" in the patch summary]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>udlfb: fix sleeping inside spinlock</title>
<updated>2019-04-01T15:46:56+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2019-04-01T15:46:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6b11f9d8433b471fdd3ebed232b43a4b723be6ff'/>
<id>urn:sha1:6b11f9d8433b471fdd3ebed232b43a4b723be6ff</id>
<content type='text'>
If a framebuffer device is used as a console, the rendering calls
(copyarea, fillrect, imageblit) may be done with the console spinlock
held. On udlfb, these function call dlfb_handle_damage that takes a
blocking semaphore before acquiring an URB.

In order to fix the bug, this patch changes the calls copyarea, fillrect
and imageblit to offload USB work to a workqueue.

A side effect of this patch is 3x improvement in console scrolling speed
because the device doesn't have to be updated after each copyarea call.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
Cc: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>udlfb: delete the unused parameter for dlfb_handle_damage</title>
<updated>2019-04-01T15:46:56+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2019-04-01T15:46:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd86b6c5c60711dbd4fa21bdb497a188ecb6cf63'/>
<id>urn:sha1:bd86b6c5c60711dbd4fa21bdb497a188ecb6cf63</id>
<content type='text'>
Remove the unused parameter "data" and unused variable "ret".

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
Cc: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
</feed>
