<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/video/fbdev/smscufx.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-01-29T21:24:25Z</updated>
<entry>
<title>video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe()</title>
<updated>2022-01-29T21:24:25Z</updated>
<author>
<name>Wang Hai</name>
</author>
<published>2021-10-14T13:22:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1791f487f877a9e83d81c8677bd3e7b259e7cb27'/>
<id>urn:sha1:1791f487f877a9e83d81c8677bd3e7b259e7cb27</id>
<content type='text'>
I got a null-ptr-deref report:

BUG: kernel NULL pointer dereference, address: 0000000000000000
...
RIP: 0010:fb_destroy_modelist+0x38/0x100
...
Call Trace:
 ufx_usb_probe.cold+0x2b5/0xac1 [smscufx]
 usb_probe_interface+0x1aa/0x3c0 [usbcore]
 really_probe+0x167/0x460
...
 ret_from_fork+0x1f/0x30

If fb_alloc_cmap() fails in ufx_usb_probe(), fb_destroy_modelist() will
be called to destroy modelist in the error handling path. But modelist
has not been initialized yet, so it will result in null-ptr-deref.

Initialize modelist before calling fb_alloc_cmap() to fix this bug.

Fixes: 3c8a63e22a08 ("Add support for SMSC UFX6000/7000 USB display adapters")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Wang Hai &lt;wanghai38@huawei.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>video: constify fb ops across all drivers</title>
<updated>2019-12-05T08:57:53Z</updated>
<author>
<name>Jani Nikula</name>
</author>
<published>2019-12-03T16:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a48ac339398f21282985bff16552447d41dcfb2'/>
<id>urn:sha1:8a48ac339398f21282985bff16552447d41dcfb2</id>
<content type='text'>
Now that the fbops member of struct fb_info is const, we can start
making the ops const as well.

This does not cover all drivers; some actually modify the fbops struct,
for example to adjust for different configurations, and others do more
involved things that I'd rather not touch in practically obsolete
drivers. Mostly this is the low hanging fruit where we can add "const"
and be done with it.

v3:
- un-constify atyfb, mb862xx, nvidia and uvesabf (0day)

v2:
- fix typo (Christophe de Dinechin)
- use "static const" instead of "const static" in mx3fb.c
- also constify smscufx.c

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/ce67f14435f3af498f2e8bf35ce4be11f7504132.1575390740.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>video: smscufx: don't restore fb_mmap after deferred IO cleanup</title>
<updated>2019-12-03T09:11:02Z</updated>
<author>
<name>Jani Nikula</name>
</author>
<published>2019-11-29T10:29:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=822f82fbc0b1d931e8cc63913e8d8a90bcf0ced6'/>
<id>urn:sha1:822f82fbc0b1d931e8cc63913e8d8a90bcf0ced6</id>
<content type='text'>
Deferred IO now preserves the fb_ops.

Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&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/480dcc682481e6972e5648181d7e92120929ec6b.1575022735.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>video: fbdev: don't print error message on framebuffer_alloc() failure</title>
<updated>2019-06-28T10:30:08Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2019-06-28T10:30:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:28Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-29T14:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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>video: smscufx: Delete an error message for a failed memory allocation in ufx_realloc_framebuffer()</title>
<updated>2018-03-28T14:34:28Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2018-03-28T14:34:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=668912549db0fa4fedc3aae3fc389b492958a275'/>
<id>urn:sha1:668912549db0fa4fedc3aae3fc389b492958a275</id>
<content type='text'>
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: smscufx: Return an error code only as a constant in ufx_realloc_framebuffer()</title>
<updated>2018-03-28T14:34:28Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2018-03-28T14:34:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4befd0cf21cd8ab11f45b9601b37fe8bc91de29f'/>
<id>urn:sha1:4befd0cf21cd8ab11f45b9601b37fe8bc91de29f</id>
<content type='text'>
* Return an error code without storing it in an intermediate variable.

* Delete the label "error" and local variable "retval"
  which became unnecessary with this refactoring.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: smscufx: Less checks in ufx_usb_probe() after error detection</title>
<updated>2018-03-28T14:34:27Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2018-03-28T14:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=daa0524bc0a07048e33fdb61cae30467ef4ceff7'/>
<id>urn:sha1:daa0524bc0a07048e33fdb61cae30467ef4ceff7</id>
<content type='text'>
Up to four checks could be repeated by the ufx_usb_probe() function
during error handling even if the relevant properties can be determined
for the involved variables before by source code analysis.

* Return directly after a call of the function "kzalloc" failed
  at the beginning.

* Adjust jump targets so that extra checks can be omitted at the end.

* Delete initialisations for the variables "info" and "retval"
  which became unnecessary with this refactoring.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: smscufx: Improve a size determination in two functions</title>
<updated>2017-12-29T18:48:44Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2017-12-29T18:48:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=defddeff61041dbe2d5bd5469ee48912a89b4118'/>
<id>urn:sha1:defddeff61041dbe2d5bd5469ee48912a89b4118</id>
<content type='text'>
Replace the specification of data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: smscufx: constify usb_device_id.</title>
<updated>2017-08-21T14:49:57Z</updated>
<author>
<name>Arvind Yadav</name>
</author>
<published>2017-08-21T14:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8290d78e66a98f77dddf8c173000377101d73ad6'/>
<id>urn:sha1:8290d78e66a98f77dddf8c173000377101d73ad6</id>
<content type='text'>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by &lt;linux/usb.h&gt; work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
</feed>
