Kernel Newbies archive on
 help / color / Atom feed
From: Tomek The Messenger <>
Subject: Should I return NOTIFY_DONE always from restart handler?
Date: Tue, 24 Mar 2020 17:06:04 +0100
Message-ID: <> (raw)

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

There is such struct as 'notifier_block'. It has member 'notifier_call'
where You assign pointer to your function (handler) and priority. Then You
register such notifier block to restart handler list.
Then when You type in linux reboot Your function might be invoked (depends
on priority you set and if You don't have registered arm_pm_restart
function which is typically done through device tree) .
My question is should I always return NOTIFY_DONE from my restart handler?
Or can I return some error code? In fact this doesn't make sense to return
any other code value as Your restart handler has to succeed always in order
not to halt system and not to do manually recovery by power off/on.

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

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

Kernelnewbies mailing list

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 16:06 Tomek The Messenger [this message]
2020-03-24 16:16 ` Pranay Srivastava

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on

Archives are clonable:
	git clone --mirror kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ \
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone