From: Jessica Yu <jeyu@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Aaron Tomlin <atomlin@redhat.com>,
linux-kernel@vger.kernel.org, rostedt@goodmis.org
Subject: Re: module: Ensure a module's state is set accordingly during module coming cleanup code
Date: Wed, 9 Nov 2016 05:12:01 -0500 [thread overview]
Message-ID: <20161109101201.GA27196@packer-debian-8-amd64.digitalocean.com> (raw)
In-Reply-To: <87funk3p6f.fsf@rustcorp.com.au>
+++ Rusty Russell [26/10/16 11:24 +1030]:
>Aaron Tomlin <atomlin@redhat.com> writes:
>> In load_module() in the event of an error, for e.g. unknown module
>> parameter(s) specified we go to perform some module coming clean up
>> operations. At this point the module is still in a "formed" state
>> when it is actually going away.
>>
>> This patch updates the module's state accordingly to ensure anyone on the
>> module_notify_list waiting for a module going away notification will be
>> notified accordingly.
>
>I recall a similar proposal before.
>
>I've audited all the subscribers to check they didn't look at
>mod->state; they seem OK.
>
>We actually do this in the init-failed path, so this should be OK.
We did discuss a similar proposal before:
https://lkml.kernel.org/r/87a8m7ko6j.fsf@rustcorp.com.au
The complaint back then was that we need to be in the COMING state for
strong_try_module_get() to fail. But it will also correctly fail for GOING
modules in the module_is_live() check in the subsequent call to
try_module_get(), so I believe we are still OK here.
Jessica
next prev parent reply other threads:[~2016-11-09 10:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 16:18 [RFC PATCH 0/2] Possible race between load_module() error handling and kprobe registration ? Aaron Tomlin
2016-10-20 16:18 ` [RFC PATCH 1/2] module: Ensure a module's state is set accordingly during module coming cleanup code Aaron Tomlin
2016-10-26 0:54 ` Rusty Russell
2016-11-09 10:12 ` Jessica Yu [this message]
2016-11-16 15:49 ` Miroslav Benes
2016-11-23 23:41 ` Jessica Yu
2016-10-20 16:18 ` [RFC PATCH 2/2] module: When modifying a module's text ignore modules which are going away too Aaron Tomlin
2016-10-26 1:05 ` Rusty Russell
2016-10-26 12:09 ` Steven Rostedt
2016-10-27 9:36 ` [RFC PATCH v2 " Aaron Tomlin
2016-10-27 13:49 ` Steven Rostedt
2016-11-07 11:46 ` Aaron Tomlin
2016-11-09 10:40 ` Jessica Yu
2016-11-23 16:00 ` Steven Rostedt
2016-11-23 18:33 ` Jessica Yu
2016-11-18 6:15 ` [RFC PATCH v2 2/2] " Rusty Russell
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=20161109101201.GA27196@packer-debian-8-amd64.digitalocean.com \
--to=jeyu@redhat.com \
--cc=atomlin@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
/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
Powered by JetHome