All of lore.kernel.org
 help / color / mirror / Atom feed
* Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
@ 2016-01-19 18:22 Alan Stern
  2016-01-19 19:07 ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Stern @ 2016-01-19 18:22 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Linux-pm mailing list, Kernel development list

Uwe:

Your commit causes my ASUS laptop to crash during early boot.  The 
problem occurs in platform_drv_probe(), affecting both the alarmtimer 
and the asus_laptop platform drivers (I can't tell which is the 
critical one).

The old code would not call platform_drv_probe() at all, and probing
would always succeed immediately because these drivers have no probe
routine.  But with the new code, platform_drv_probe() does run.  The
call to of_clk_set_defaults() returns -ENODEV, as does the call to
dev_pm_domain_attach().  The call to drv->probe() gets skipped, of 
course.  The final return value is -ENODEV, and so probing fails.  This 
causes the kernel to crash: blank screen, NumLock LED blinking.

The patch below fixes the problem, but I'm not sure that it's the best 
solution.  What is your advice?

Alan Stern



Index: usb-4.4/drivers/base/platform.c
===================================================================
--- usb-4.4.orig/drivers/base/platform.c
+++ usb-4.4/drivers/base/platform.c
@@ -524,6 +524,8 @@ static int platform_drv_probe(struct dev
 		ret = -ENXIO;
 	}
 
+	if (!drv->probe)
+		ret = 0;
 	return ret;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
  2016-01-19 18:22 Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Alan Stern
@ 2016-01-19 19:07 ` Uwe Kleine-König
  2016-01-19 19:55   ` Greg Kroah-Hartman
  2016-01-19 20:06   ` Alan Stern
  0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2016-01-19 19:07 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman
  Cc: Linux-pm mailing list, Kernel development list

Hello Alan,

On Tue, Jan 19, 2016 at 01:22:22PM -0500, Alan Stern wrote:
> 
> Your commit causes my ASUS laptop to crash during early boot.  The 
> problem occurs in platform_drv_probe(), affecting both the alarmtimer 
> and the asus_laptop platform drivers (I can't tell which is the 
> critical one).
> 
> The old code would not call platform_drv_probe() at all, and probing
> would always succeed immediately because these drivers have no probe
> routine.  But with the new code, platform_drv_probe() does run.  The
> call to of_clk_set_defaults() returns -ENODEV, as does the call to
> dev_pm_domain_attach().  The call to drv->probe() gets skipped, of 
> course.  The final return value is -ENODEV, and so probing fails.  This 
> causes the kernel to crash: blank screen, NumLock LED blinking.
> 
> The patch below fixes the problem, but I'm not sure that it's the best 
> solution.  What is your advice?
You want

	http://mid.gmane.org/1449132704-9952-1-git-send-email-martin.wilck@ts.fujitsu.com

.

Greg, I'd welcome this fix in mainline and 4.4.x.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
  2016-01-19 19:07 ` Uwe Kleine-König
@ 2016-01-19 19:55   ` Greg Kroah-Hartman
  2016-01-19 20:06   ` Alan Stern
  1 sibling, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-19 19:55 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Alan Stern, Linux-pm mailing list, Kernel development list

On Tue, Jan 19, 2016 at 08:07:09PM +0100, Uwe Kleine-König wrote:
> Hello Alan,
> 
> On Tue, Jan 19, 2016 at 01:22:22PM -0500, Alan Stern wrote:
> > 
> > Your commit causes my ASUS laptop to crash during early boot.  The 
> > problem occurs in platform_drv_probe(), affecting both the alarmtimer 
> > and the asus_laptop platform drivers (I can't tell which is the 
> > critical one).
> > 
> > The old code would not call platform_drv_probe() at all, and probing
> > would always succeed immediately because these drivers have no probe
> > routine.  But with the new code, platform_drv_probe() does run.  The
> > call to of_clk_set_defaults() returns -ENODEV, as does the call to
> > dev_pm_domain_attach().  The call to drv->probe() gets skipped, of 
> > course.  The final return value is -ENODEV, and so probing fails.  This 
> > causes the kernel to crash: blank screen, NumLock LED blinking.
> > 
> > The patch below fixes the problem, but I'm not sure that it's the best 
> > solution.  What is your advice?
> You want
> 
> 	http://mid.gmane.org/1449132704-9952-1-git-send-email-martin.wilck@ts.fujitsu.com
> 
> .
> 
> Greg, I'd welcome this fix in mainline and 4.4.x.

Yes it's in my queue to get to after 4.5-rc1 -s out.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
  2016-01-19 19:07 ` Uwe Kleine-König
  2016-01-19 19:55   ` Greg Kroah-Hartman
@ 2016-01-19 20:06   ` Alan Stern
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Stern @ 2016-01-19 20:06 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Linux-pm mailing list, Kernel development list

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1274 bytes --]

On Tue, 19 Jan 2016, Uwe [iso-8859-1] Kleine-König wrote:

> Hello Alan,
> 
> On Tue, Jan 19, 2016 at 01:22:22PM -0500, Alan Stern wrote:
> > 
> > Your commit causes my ASUS laptop to crash during early boot.  The 
> > problem occurs in platform_drv_probe(), affecting both the alarmtimer 
> > and the asus_laptop platform drivers (I can't tell which is the 
> > critical one).
> > 
> > The old code would not call platform_drv_probe() at all, and probing
> > would always succeed immediately because these drivers have no probe
> > routine.  But with the new code, platform_drv_probe() does run.  The
> > call to of_clk_set_defaults() returns -ENODEV, as does the call to
> > dev_pm_domain_attach().  The call to drv->probe() gets skipped, of 
> > course.  The final return value is -ENODEV, and so probing fails.  This 
> > causes the kernel to crash: blank screen, NumLock LED blinking.
> > 
> > The patch below fixes the problem, but I'm not sure that it's the best 
> > solution.  What is your advice?
> You want
> 
> 	http://mid.gmane.org/1449132704-9952-1-git-send-email-martin.wilck@ts.fujitsu.com
> 
> .
> 
> Greg, I'd welcome this fix in mainline and 4.4.x.

Yep, that fixed it, thank you.  This definitely needs to get into 4.4.x
as soon as possible.

Alan Stern

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-19 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 18:22 Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Alan Stern
2016-01-19 19:07 ` Uwe Kleine-König
2016-01-19 19:55   ` Greg Kroah-Hartman
2016-01-19 20:06   ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.