lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.21.2004031710120.10601@earth.lan>
Date:   Fri, 3 Apr 2020 17:15:44 +0100 (BST)
From:   Jules Irenge <jbi.octave@...il.com>
To:     Jan Kara <jack@...e.cz>
cc:     Jules Irenge <jbi.octave@...il.com>, linux-kernel@...r.kernel.org,
        boqun.feng@...il.com, Amir Goldstein <amir73il@...il.com>,
        "open list:FSNOTIFY: FILESYSTEM NOTIFICATION INFRASTRUCTURE" 
        <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 2/7] fsnotify: Add missing annotation for
 fsnotify_finish_user_wait()



On Wed, 1 Apr 2020, Jan Kara wrote:

> On Tue 31-03-20 21:46:38, Jules Irenge wrote:
>> Sparse reports a warning at fsnotify_finish_user_wait()
>>
>> warning: context imbalance in fsnotify_finish_user_wait()
>> 	- wrong count at exit
>>
>> The root cause is the missing annotation at fsnotify_finish_user_wait()
>> Add the missing __acquires(&fsnotify_mark_srcu) annotation.
>>
>> Signed-off-by: Jules Irenge <jbi.octave@...il.com>
>
> OK, but then fsnotify_prepare_user_wait() needs __releases annotation as
> well if we're going to be serious about sparse warnings in this code?
>
> 								Honza
>
>> ---
>>  fs/notify/mark.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/notify/mark.c b/fs/notify/mark.c
>> index 1d96216dffd1..44fea637bb02 100644
>> --- a/fs/notify/mark.c
>> +++ b/fs/notify/mark.c
>> @@ -350,6 +350,7 @@ bool fsnotify_prepare_user_wait(struct fsnotify_iter_info *iter_info)
>>  }
>>
>>  void fsnotify_finish_user_wait(struct fsnotify_iter_info *iter_info)
>> +	__acquires(&fsnotify_mark_srcu)
>>  {
>>  	int type;
>>
>> --
>> 2.24.1
>>
> -- 
> Jan Kara <jack@...e.com>
> SUSE Labs, CR
>

Thanks for the reply. I think adding an annotation at 
fsnotify_prepare_user_wait() will not theoretically remove the warning. 
That's the only reason why I skipped it .
Best regards,
Jules

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ