Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4232160ybv; Mon, 10 Feb 2020 15:10:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyuLomIOwsbBpOMgF/io8gFd6ShWZkRuJeDsBQmG+wcHxstt/RkvWChO6FGtxSObPF/OsHZ X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr2808413otq.1.1581376241930; Mon, 10 Feb 2020 15:10:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581376241; cv=none; d=google.com; s=arc-20160816; b=R9gOkhpAaGUITChL9aYpO+dO8USdTvMdYfNpm/eGCZX7ykO9saYtaeNP3xY6EdzRwU NW8cBUbP4iqomfiZ+zVk6zzIKVaHACmDNdTSxfjp70oHeDeta+ybWxIW34HEa8rTFAYy 4cDgPPbgHwBSyCg0UO9Yz5InUYX+KhS6EquWEyIjrclS3W3OV5GdfXxVKquBOa2xaFVs M0iIBLIHvLsS/RLB+I1BUtOitvnTaIILUmA4PrdUc/2t3ZiDOXwLfblt5ImfMTqn4OjF Z7v6Dr5on8ZXdlGZpEFm5LPjVslC3o9dV90C1h2td9HuPIKDV0C4f8zq5+cx+jJUmixI JL8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:date:from:dkim-signature; bh=HlH978RiT/OKtcm1ieT3FHA3Af2vEFe/d++NhRbZZHo=; b=b+mKeJceD23n+UWuVEGVS4SJuQH9OmRW5OsUsq1at/0JveEflWhGj5BYOv9RkuARnD X/kxy2fRiOwC9XA2O+9aKI7X9eGfJ1XCfMTUo+yyu+3nVZ40+hMa29QcPx6yf5iN6tq2 biOqRQtgvjxK4/fJJD7cTfGcyGcYsUh3mmvrTwD5lQUUlqjkdCQF2397SWGqMFVQTVaw wLk/gaq8CaUFahX24wxneHzEFNO0o2f4L9HgXkNW2aQOB7qQihz3dBJGDcBUq1+HqHQS GsXBWNbTrb4uG17lxOEowHS9JtKCB/6WJLi2wujRhBwf9Cv43ef/v07cNlzN10yIcxpD 5NPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hUMe+OTA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si919621otc.160.2020.02.10.15.10.29; Mon, 10 Feb 2020 15:10:41 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hUMe+OTA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727556AbgBJXKL (ORCPT + 99 others); Mon, 10 Feb 2020 18:10:11 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53391 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727435AbgBJXKK (ORCPT ); Mon, 10 Feb 2020 18:10:10 -0500 Received: by mail-wm1-f67.google.com with SMTP id s10so1161140wmh.3; Mon, 10 Feb 2020 15:10:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=HlH978RiT/OKtcm1ieT3FHA3Af2vEFe/d++NhRbZZHo=; b=hUMe+OTAFXZgUF0+R7cEvjnrltme/tHFT+wFq3l3Nzg1DtXP4xQl47fCHVEROqJ+0c 1IT2s5+YdBO0d/8sou/Dd9MFnuA6l8twUXKyy6q/mJRw7F53FgVbEyLqK9SyV8bZ7Vrb MRTqY9Q1oyBVQILT+p4MSBb9bQeRYqOK3FUIZoXnHyynBXjxc79s1vTdHvzsOiabaFyE ZvWSOhJVXx54CswqcaFYfuEdPV2yTA7rRKaVVdtquY7ONWQZEcoLj3C6Mw5UNpXJtVES U+fsEinijrH+fpcvx19n07N91WSpZqBzct7ajwT1RucauWCaU+v0CJoEkFkEgr1GKrO0 kUKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=HlH978RiT/OKtcm1ieT3FHA3Af2vEFe/d++NhRbZZHo=; b=mGQnU5UP5uzNnlgZgYfzEEtjUeySxeJ24XDW+uY90UMhHgylRCUkkY0qIXGk/JFPNw atIzF+iRlylaZTCDo0KEkTZbEZ0m5Ex6iSYgQokitfC+lPo2GCONtDrHHLJ7obrHyQ+7 IkXFP7aWcXr1AanVzb+K8PHjsj73VQkwm+BQ61+yqTECc+2AczJUBh054seR9120Yu+L VyuUVFaHSogOulKPSPMNg+dWMJdKukt8idbd4yfa90RLZNHFtmuXDEjsbPFp9pESLeuz ge9sEKu2/8tULrKklxEG1x6GuOqbKCtpTCggdmAdxBrxPAOE1ohEggklTSx7MGMZ4lx9 YEKA== X-Gm-Message-State: APjAAAUpnqFpHdvoDzP0ZedyONHVnawBd0bUOsvolJTTSduH4B3q5U8e 3PXQmEs/NProhU7Ew9VAHw== X-Received: by 2002:a1c:740b:: with SMTP id p11mr1428624wmc.78.1581376208631; Mon, 10 Feb 2020 15:10:08 -0800 (PST) Received: from ninjahub.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.gmail.com with ESMTPSA id 18sm1122951wmf.1.2020.02.10.15.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 15:10:08 -0800 (PST) From: Jules Irenge X-Google-Original-From: Jules Irenge Date: Mon, 10 Feb 2020 23:09:59 +0000 (GMT) To: Boqun Feng cc: Jules Irenge , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, akpm@linux-foundation.org, dvyukov@google.com, glider@google.com, aryabinin@virtuozzo.com, bsegall@google.com, rostedt@goodmis.org, dietmar.eggemann@arm.com, vincent.guittot@linaro.org, juri.lelli@redhat.com, peterz@infradead.org, mingo@redhat.com, mgorman@suse.de, dvhart@infradead.org, tglx@linutronix.de, namhyung@kernel.org, jolsa@redhat.com, alexander.shishkin@linux.intel.com, mark.rutland@arm.com, acme@kernel.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 00/11] Lock warning cleanup In-Reply-To: <20200210050622.GC69108@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> Message-ID: References: <0/11> <20200210050622.GC69108@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Feb 2020, Boqun Feng wrote: > Hi Jules, > > On Sun, Feb 09, 2020 at 10:24:42PM +0000, Jules Irenge wrote: > > This patch series adds missing annotations to functions that register warnings of context imbalance when built with Sparse tool. > > The adds fix the warnings and give insight on what the functions are actually doing. > > > > 1. Within the futex subsystem, a __releases(&pi_state->.pi_mutex.wait_lock) is added because wake_futex_pi() only releases the lock at exit, > > must_hold(q->lock_ptr) have been added to fixup_pi_state_owner() because the lock is held at entry and exit; > > a __releases(&hb->lock) added to futex_wait_queue_me() as it only releases the lock. > > > > 2. Within fs_pin, a __releases(RCU) is added because the function exit RCU critical section at exit. > > > > 3. In kasan, an __acquires(&report_lock) has been added to start_report() and __releases(&report_lock) to end_report() > > > > 4. Within ring_buffer subsystem, a __releases(RCU) has been added perf_output_end() > > > > 5. schedule subsystem recorded an addition of the __releases(rq->lock) annotation and a __must_hold(this_rq->lock) > > > > 6. At hrtimer subsystem, __acquires(timer) is added to lock_hrtimer_base() as the function acquire the lock but never releases it. > > Jules Irenge (11): > > hrtimer: Add missing annotation to lock_hrtimer_base() > > futex: Add missing annotation for wake_futex_pi() > > futex: Add missing annotation for fixup_pi_state_owner() > > Given that those three patches have been sent and reviewed, please do > increase the version number (this time, for example, using v2) when > sending the updated ones. Also please add a few sentences after the > commit log describing what you have changed between versions. > > Here is an example: > > https://lore.kernel.org/lkml/20200124231834.63628-4-pmalani@chromium.org/ > > Regards, > Boqun > > > perf/ring_buffer: Add missing annotation to perf_output_end() > > sched/fair: Add missing annotation for nohz_newidle_balance() > > sched/deadline: Add missing annotation for dl_task_offline_migration() > > fs_pin: Add missing annotation for pin_kill() declaration > > fs_pin: Add missing annotation for pin_kill() definition > > kasan: add missing annotation for start_report() > > kasan: add missing annotation for end_report() > > futex: Add missing annotation for futex_wait_queue_me() > > > > fs/fs_pin.c | 2 +- > > include/linux/fs_pin.h | 2 +- > > kernel/events/ring_buffer.c | 2 +- > > kernel/futex.c | 3 +++ > > kernel/sched/deadline.c | 1 + > > kernel/sched/fair.c | 2 +- > > kernel/time/hrtimer.c | 1 + > > mm/kasan/report.c | 4 ++-- > > 8 files changed, 11 insertions(+), 6 deletions(-) > > > > -- > > 2.24.1 > > > Thanks for the feedback, I take good notes. I am working on the second version. Kind regards, Jules