lkml.org 
[lkml]   [2020]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: kernel oops in 'typec_ucsi' due to commit 'drivers property: When no children in primary, try secondary'
From
Date
On Thu, 2020-07-16 at 18:47 +0300, Andy Shevchenko wrote:
> On Thu, Jul 16, 2020 at 11:17:03AM +0300, Maxim Levitsky wrote:
> > Hi!
> >
> > Few days ago I bisected a regression on 5.8 kernel:
> >
> > I have nvidia rtx 2070s and its USB type C port driver (which is open source)
> > started to crash on load:
>
> ...
>
> > Reverting the commit helped fix this oops.
> >
> > My .config attached.
> > If any more info is needed I'll be happy to provide it,
> > and of course test patches.
>
> Can you test below?
>
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 1e6d75e65938..d58aa98fe964 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -721,7 +721,7 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev,
> return next;
>
> /* When no more children in primary, continue with secondary */
> - if (!IS_ERR_OR_NULL(fwnode->secondary))
> + if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary))
> next = fwnode_get_next_child_node(fwnode->secondary, child);
>
> return next;

It works (no more oops)

Best regards,
Maxim Levitsky

\
 
 \ /
  Last update: 2020-07-16 20:00    [W:1.332 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site