From: Luis Chamberlain <mcgrof@kernel.org>
To: Jules Irenge <jbi.octave@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, boqun.feng@gmail.com,
Kees Cook <keescook@chromium.org>,
Iurii Zaikin <yzaikin@google.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
"open list:PROC SYSCTL" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 4/7] sysctl: Add missing annotation for start_unregistering()
Date: Thu, 2 Apr 2020 16:06:38 +0000 [thread overview]
Message-ID: <20200402160638.GB11244@42.do-not-panic.com> (raw)
In-Reply-To: <20200331204643.11262-5-jbi.octave@gmail.com>
On Tue, Mar 31, 2020 at 09:46:40PM +0100, Jules Irenge wrote:
> Sparse reports a warning at start_unregistering()
>
> warning: context imbalance in start_unregistering()
> - unexpected unlock
>
> The root cause is the missing annotation at start_unregistering()
> Add the missing __must_hold(&sysctl_lock) annotation.
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
> ---
> fs/proc/proc_sysctl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
> index c75bb4632ed1..d1b5e2b35564 100644
> --- a/fs/proc/proc_sysctl.c
> +++ b/fs/proc/proc_sysctl.c
> @@ -307,6 +307,7 @@ static void proc_sys_prune_dcache(struct ctl_table_header *head)
>
> /* called under sysctl_lock, will reacquire if has to wait */
> static void start_unregistering(struct ctl_table_header *p)
> + __must_hold(&sysctl_lock)
> {
> /*
> * if p->used is 0, nobody will ever touch that entry again;
> --
> 2.24.1
>
next prev parent reply other threads:[~2020-04-02 16:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0/7>
2020-03-31 20:46 ` [PATCH 0/7] Lock warnings cleanup Jules Irenge
2020-03-31 20:46 ` [PATCH 1/7] fs: Add missing annotation for iput_final() Jules Irenge
2020-03-31 20:46 ` [PATCH 2/7] fsnotify: Add missing annotation for fsnotify_finish_user_wait() Jules Irenge
2020-04-01 9:24 ` Jan Kara
2020-04-03 16:15 ` Jules Irenge
2020-04-03 16:52 ` Jan Kara
2020-03-31 20:46 ` [PATCH 3/7] dax: Add missing annotation for wait_entry_unlocked() Jules Irenge
2020-04-01 10:01 ` Jan Kara
2020-04-01 16:04 ` Jules Irenge
2020-03-31 20:46 ` [PATCH 4/7] sysctl: Add missing annotation for start_unregistering() Jules Irenge
2020-04-02 16:06 ` Luis Chamberlain [this message]
2020-03-31 20:46 ` [PATCH 5/7] btrfs: Add missing annotation for btrfs_lock_cluster() Jules Irenge
2020-04-01 15:57 ` David Sterba
2020-03-31 20:46 ` [PATCH 6/7] btrfs: Add missing annotation for btrfs_tree_lock() Jules Irenge
2020-03-31 20:46 ` [PATCH 7/7] tty: serial_core: Add missing annotation for _unlock_and_check_sysrq() Jules Irenge
2020-04-16 13:58 ` Greg Kroah-Hartman
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=20200402160638.GB11244@42.do-not-panic.com \
--to=mcgrof@kernel.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=boqun.feng@gmail.com \
--cc=jbi.octave@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yzaikin@google.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;
as well as URLs for NNTP newsgroup(s).