From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MALFORMED_FREEMAIL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D356C352A5 for ; Mon, 10 Feb 2020 23:10:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5AEEF2085B for ; Mon, 10 Feb 2020 23:10:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hUMe+OTA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AEEF2085B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2D7AE6B0195; Mon, 10 Feb 2020 18:10:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AD746B0196; Mon, 10 Feb 2020 18:10:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19D9F6B0198; Mon, 10 Feb 2020 18:10:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 008C46B0196 for ; Mon, 10 Feb 2020 18:10:10 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8D69B180AD802 for ; Mon, 10 Feb 2020 23:10:10 +0000 (UTC) X-FDA: 76475762580.03.cake68_1e904db053d2f X-HE-Tag: cake68_1e904db053d2f X-Filterd-Recvd-Size: 6584 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Mon, 10 Feb 2020 23:10:09 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id p9so1165605wmc.2 for ; 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=E4YUxl8bHmp0iNMOWNOuo37ueJEvOijtKLhvEHwX/0ChkvB5hRiX+K2Y7QYRd4dvyI bTKwYqD3+4DjDYxib065PdZRbTWSCsAM8dDaAlmX+tkU5QLH6X13hP9BVxBavqao1Vlv 5oPmc9OD1V7/wEUM/s31WJpWQZEPLslEUl79CNZKcqk+RlZzIiM6JvW/7uuhVqgMjgZ2 WHnwvQRw2/wD7twWO0x1SQcWCc63xaX1e1yszuKpd7yB9NgFW4P9XA9HV5QMzk82isA6 vLPun3CDrvn8bov/Qky12LfozzrPnTTHrxFrQdTL9H3n7v7EbrdZzb9ufIcKBAfhJWsz YoxA== X-Gm-Message-State: APjAAAU2TPysTwTiiba6j1LzBbYgGDfzH/BIXB3iOrTqgQCf2lCV7AHi WqzzU1tzdtOikctFMfb0AQ== X-Google-Smtp-Source: APXvYqx05+Nv0JSPMDzbeKlDwV27qd+uDgHvjje2LWi8e7snFKtFKr/I3E7VoY7I3fYYmsg581it+g== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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