From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dan Streetman <ddstreet@ieee.org>,
linux-next@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] modules: elide param_lock if !CONFIG_SYSFS
Date: Sat, 27 Jun 2015 10:21:34 +1000 [thread overview]
Message-ID: <20150627102134.00e58047@canb.auug.org.au> (raw)
In-Reply-To: <CALZtOND_-LahkJE5pD6eQOusT42M4-9ECKZ1cD+F_dPK4CVX8A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]
Hi Rusty,
On Thu, 25 Jun 2015 17:34:31 -0400 Dan Streetman <ddstreet@ieee.org> wrote:
>
> On Thu, Jun 25, 2015 at 5:18 PM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > Dan Streetman <ddstreet@ieee.org> writes:
> >> Only include the built-in and per-module param_lock, and corresponding
> >> lock/unlock functions, if sysfs is enabled. If there is no sysfs there
> >> is no need for locking kernel params.
> >>
> >> This fixes a build break when CONFIG_SYSFS is not enabled, introduced
> >> by commit b51d23e.
> >
> > This doesn't even come close to applying to my tree?
>
> sorry, I had the !CONFIG_MODULES patch in my tree also, so this was on
> top of that one:
> https://lkml.org/lkml/2015/6/24/550
>
> I can resend that one, on top of this one, or you can fix it up.
>
> Sorry for not getting it right the first time ;-)
This is what I ended up applying to yesterday's linux-next:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 26 Jun 2015 13:19:19 +1000
Subject: [PATCH] modules: only use mod->param_lock if CONFIG_MODULES
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
kernel/params.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/params.c b/kernel/params.c
index faa461c16f12..adc0bbc06cc5 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -30,7 +30,11 @@
static DEFINE_MUTEX(param_lock);
/* Use the module's mutex, or if built-in use the built-in mutex */
+#ifdef CONFIG_MODULES
#define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock)
+#else
+#define KPARAM_MUTEX(mod) (¶m_lock)
+#endif
static inline void check_kparam_locked(struct module *mod)
{
--
2.1.4
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-06-27 0:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 6:54 linux-next: build failure after merge of the modules tree Stephen Rothwell
2015-06-25 9:51 ` Dan Streetman
2015-06-25 13:04 ` [PATCH] modules: elide param_lock if !CONFIG_SYSFS Dan Streetman
2015-06-25 21:18 ` Rusty Russell
2015-06-25 21:34 ` Dan Streetman
2015-06-27 0:21 ` Stephen Rothwell [this message]
2015-06-28 5:21 ` Rusty Russell
2015-06-25 22:39 ` Stephen Rothwell
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=20150627102134.00e58047@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=ddstreet@ieee.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).