From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] tty, add kref to sysrq handlers
Date: Fri, 27 Apr 2012 18:39:22 +0100 [thread overview]
Message-ID: <20120427183922.47436912@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <1335546920-28492-1-git-send-email-prarit@redhat.com>
> If the lock were removed, however, there is one _unlikely_ circumstance in
> which the array would be left unprotected. That would be the situation in
> which a module was loaded and the sysrq handler was registered during the
> execution of the module. Again, the possibility of the scenario is very
> small and given the existing usage of unregister_sysrq_key() in the tree
> it seems like removing the lock is sufficient.
It's asking for later disasters I think.
I'm not sure I see we need a kref - that looks like overkill, and its
probably even more elegantly done with RCU ?
> Of course, I'm more than willing to hear additional suggestions. A rw
> lock still requires that it be taken with irqs disabled so IMO it is out
> of the question.
One approach would be to defer the work. Is there any reason a slow sysrq
handler shouldn't be expected to behave itself and schedule work to run
later. The module unload killing the work will take care of all the other
unload stuff.
Alan
next prev parent reply other threads:[~2012-04-27 17:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 17:15 Prarit Bhargava
2012-04-27 17:39 ` Alan Cox [this message]
2012-04-27 19:46 ` Prarit Bhargava
2012-05-04 13:00 ` Prarit Bhargava
2012-04-27 17:15 Prarit Bhargava
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120427183922.47436912@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=prarit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®