Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312439 > unrolled thread
| Started by | Alan Stern <stern@rowland.harvard.edu> |
|---|---|
| First post | 2016-01-19 19:30 +0100 |
| Last post | 2016-01-19 21:10 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Alan Stern <stern@rowland.harvard.edu> - 2016-01-19 19:30 +0100
Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-01-19 20:10 +0100
Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-19 21:00 +0100
Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Alan Stern <stern@rowland.harvard.edu> - 2016-01-19 21:10 +0100
| From | Alan Stern <stern@rowland.harvard.edu> |
|---|---|
| Date | 2016-01-19 19:30 +0100 |
| Subject | Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") |
| Message-ID | <qSJcu-3ak-29@gated-at.bofh.it> |
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; }
[toc] | [next] | [standalone]
| From | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
|---|---|
| Date | 2016-01-19 20:10 +0100 |
| Subject | Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") |
| Message-ID | <qSJPc-3EO-19@gated-at.bofh.it> |
| In reply to | #1312439 |
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/ |
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-01-19 21:00 +0100 |
| Subject | Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") |
| Message-ID | <qSKBA-3XR-13@gated-at.bofh.it> |
| In reply to | #1312455 |
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
[toc] | [prev] | [next] | [standalone]
| From | Alan Stern <stern@rowland.harvard.edu> |
|---|---|
| Date | 2016-01-19 21:10 +0100 |
| Subject | Re: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") |
| Message-ID | <qSKLh-4he-23@gated-at.bofh.it> |
| In reply to | #1312455 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web