Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-23 Thread Enrico Weigelt, metux IT consult
On 17.02.21 14:50, Andy Shevchenko wrote: On Wed, Feb 17, 2021 at 01:15:43PM +0100, Enrico Weigelt, metux IT consult wrote: Under rare circumstances it may happen that a device node's name is NULL (most likely kernel bug in some other place). What circumstances? How can I reproduce this?

Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-23 Thread Enrico Weigelt, metux IT consult
On 18.02.21 13:53, Petr Mladek wrote: Please, use if (check_pointer(, end, p, spec)) return buf; It will print "(null)" instead of the name. It should be enough to inform the user this way. The extra pr_warn() does not help much to localize the problem anyway. And it

Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-18 Thread Petr Mladek
On Wed 2021-02-17 15:50:00, Andy Shevchenko wrote: > On Wed, Feb 17, 2021 at 01:15:43PM +0100, Enrico Weigelt, metux IT consult > wrote: > > Under rare circumstances it may happen that a device node's name is NULL > > (most likely kernel bug in some other place). > > What circumstances? How can

Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-17 Thread Sergey Senozhatsky
On (21/02/17 13:15), Enrico Weigelt, metux IT consult wrote: > Under rare circumstances it may happen that a device node's name is NULL > (most likely kernel bug in some other place). In such situations anything > but helpful, if the debug printout crashes, and nobody knows what actually >

Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-17 Thread Andy Shevchenko
On Wed, Feb 17, 2021 at 01:15:43PM +0100, Enrico Weigelt, metux IT consult wrote: > Under rare circumstances it may happen that a device node's name is NULL > (most likely kernel bug in some other place). What circumstances? How can I reproduce this? More information, please! > In such

[PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-17 Thread Enrico Weigelt, metux IT consult
Under rare circumstances it may happen that a device node's name is NULL (most likely kernel bug in some other place). In such situations anything but helpful, if the debug printout crashes, and nobody knows what actually happened here. Therefore protect it by an explicit NULL check and print out