lkml.org 
[lkml]   [2013]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] firmware: Avoid deadlock of usermodehelper lock at shutdown
At Wed, 8 May 2013 23:56:51 +0800,
Ming Lei wrote:
>
> On Wed, May 8, 2013 at 2:56 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > When a system goes to reboot/shutdown, it tries to disable the
> > usermode helper via usermodehelper_disable(). This might be blocked
> > when a driver tries to load a firmware beforehand and it's stuck by
> > some reason.
>
> IMO, it is better to find why the loading is stuck. Also we already provides
> the timeout sysfs file to help to deal with the situation.

The loading is done manually in the case of dell_rbu driver, so it may
happen at any time that the f/w loading doesn't finish properly.


> > In this patch, the firmware class driver registers a reboot notifier
> > so that it can abort all pending f/w bufs. Also enable a flag for
> > avoiding the call of usermodehelper after the reboot/shutdown starts.
>
> With this patch, maybe we only hide the real problem.

No, you can simulate the hang easily. Try the below (you can run it
on every x86 machine; it just loads the data onto the memory.)

- modprobe dell_rbu

- echo init > /sys/devices/platform/dell_rbu/image_type

(... now /sys/class/firmware/dell_rbu/* appear)

- echo 1 > /sys/class/firmware/dell_rbu/loading

- halt -p

Now the machine gets stuck.

Yes, the real problem is obvious: you didn't finish the f/w loading in
the above, and it will never happen. This doesn't justify that the
machine can be stalled at shutdown, though.


Takashi


\
 
 \ /
  Last update: 2013-05-08 19:41    [W:0.081 / U:1.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site