Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp410681ybb; Wed, 1 Apr 2020 02:25:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtfVmLXZSCvAfcRI0JxXncYF4hqY9PktWLj3d9k2ZACQ8SKbYd7Sd/5BejB9xdBJu1pORS5 X-Received: by 2002:a4a:3306:: with SMTP id q6mr13633642ooq.81.1585733156193; Wed, 01 Apr 2020 02:25:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585733156; cv=none; d=google.com; s=arc-20160816; b=QktuFWXKaFapwUF//nigFM1SjlD9Xp6KAyOM1p+FWU1LIVgQW4gjVBWoUqC51D0d3v UmLaoel5YdrdxpGRTs83HnXNAKQG2jSVrby6y+EIsKOw8lFVrfj89Gfm/qzdvPiYPViR +NTicSoZPp23vcGbSuJ0uCgL5NZLekYwPAhBMwSc/DQe/VHmwgOVSaJ+Y8H88MO2MpkU Y8M0o0ZyZ6/k6ByO5M8EiVM/mdbWXJDWT0eTGJ9qw/ElBtJEXOXx1UGS2V2EadqD2Scs lfiDBu9wmzwN71HR+FUaABU1AgXG7t76EZm7e1MyAv4O0CZrSmLb0A2GfC5InVknNFiZ drLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=y0xF+dntQpbtC4VmeQXNaWZKdW6aKf8oOT4uKpt0ykk=; b=QKzxv4AdoviZ1G0J5RuKBKDvffHdXlR4VVp85Uzs4DfUbpOqSrF+T4axl8exkve1o3 ymJbWtvVgqMtHJsF7Ii+5DQcqa2geLue8r+A916jYIpGmi2LlsHZgJ+n5U99T1aVrhqh GyuUFOpRGqp+dbUa2RcOEPKdGiT54HW1zOSHIILMWtBYmV3TlsO3+KCEVKDwR0ZZfIU/ f85yS1Wy7KoLfJzO7CUDktEc+1I7D7uh3ovJlMnXWt/TISMGaSyoO+pzoXXw86dGRBWo J9Dgwf9S+mYTCttMLLMdXh9JB8z25W83FZe6zHKMVpeWRVLLJsc57RQAqeOw56ZgYNew 4HNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u137si654397oie.160.2020.04.01.02.25.43; Wed, 01 Apr 2020 02:25:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731541AbgDAJYg (ORCPT + 99 others); Wed, 1 Apr 2020 05:24:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:45164 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726205AbgDAJYg (ORCPT ); Wed, 1 Apr 2020 05:24:36 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BCD2EAD7C; Wed, 1 Apr 2020 09:24:34 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id EF5BC1E11F4; Wed, 1 Apr 2020 11:24:33 +0200 (CEST) Date: Wed, 1 Apr 2020 11:24:33 +0200 From: Jan Kara To: Jules Irenge Cc: linux-kernel@vger.kernel.org, boqun.feng@gmail.com, Jan Kara , Amir Goldstein , "open list:FSNOTIFY: FILESYSTEM NOTIFICATION INFRASTRUCTURE" Subject: Re: [PATCH 2/7] fsnotify: Add missing annotation for fsnotify_finish_user_wait() Message-ID: <20200401092433.GA19466@quack2.suse.cz> References: <0/7> <20200331204643.11262-1-jbi.octave@gmail.com> <20200331204643.11262-3-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331204643.11262-3-jbi.octave@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 SUSE Labs, CR