public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
* Kernel module that shuts down the device
@ 2021-11-07  0:54 Drew Abbott
  2021-11-07  8:31 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Abbott @ 2021-11-07  0:54 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 692 bytes --]

Hi all,

I am working on a kernel module that should shut down the device when USB
is unplugged. I make a call to kernel_power_off(), but I see that it gets
stuck trying to call blocking_notifier_call_chain(&reboot_notifier_list,
(state == SYSTEM_HALT) ? SYS_HALT : SYS_POWER_OFF, NULL); in
kernel_shutdown_prepare().
There is currently another driver that has the same function, and shuts
down the device by calling kernel_power_off() successfully. I have tried
adding prints in blocking_notifier_call_chain, but then the kernel log is
flooded with calls and I can't really see what is happening.
Does anyone have any insight into why my call to kernel_power_off() is
hanging?

Thanks,
Drew

[-- Attachment #1.2: Type: text/html, Size: 800 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2021-11-09  6:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-07  0:54 Kernel module that shuts down the device Drew Abbott
2021-11-07  8:31 ` Greg KH
2021-11-08  0:16   ` Drew Abbott
2021-11-08  0:38     ` Valdis Klētnieks
2021-11-08  6:12     ` Greg KH
2021-11-08 20:53       ` Drew Abbott
2021-11-09  6:23         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox