Re: [PATCH v3] driver core: Add timeout for device shutdown

From: Khasnis Soumya
Date: Fri Jun 07 2024 - 07:50:49 EST


On Thu, Jun 06, 2024 at 10:52:14PM +0200, Greg KH wrote:
> On Thu, Jun 06, 2024 at 08:50:03AM +0000, Soumya Khasnis wrote:
> > The device shutdown callbacks invoked during shutdown/reboot
> > are prone to errors depending on the device state or mishandling
> > by one or more driver. In order to prevent a device hang in such
> > scenarios, we bail out after a timeout while dumping a meaningful
> > call trace of the shutdown callback to kernel logs, which blocks
> > the shutdown or reboot process.
> >
> > Signed-off-by: Soumya Khasnis <soumya.khasnis@xxxxxxxx>
> > Signed-off-by: Srinavasa Nagaraju <Srinavasa.Nagaraju@xxxxxxxx>
> > ---
> > Changes in v3:
> > -fix review comments
Sorry for inconvenience caused Greg, i will update details properly.
here are changes i did in patchset-3(v3)
1. added help text
2. set configuration by default "y"
3. added range for timeout value(DEVICE_SHUTDOWN_TIMEOUT_SEC)
4. moved #define's to base.h file
5. moved timeout functionality to device_shutdown() driver/base/core.c from reboot.c

>
> What ones? In what way? This really doesn't help, sorry. Would you
> like to see this type of response if you were to review other people's
> code?
>
> > -updated commit message
>
1. added information of where call trace is logged.
2. changed patch subject from "reboot:" to "driver core:"

> In what way?
>
> confused,
>
Sorry again for inconvenience caused.
> greg k-h
Thanks and Regards,
soumya.