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=-3.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 D8DEFC2BA83 for ; Sun, 9 Feb 2020 22:24:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 825D320838 for ; Sun, 9 Feb 2020 22:24:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q+iL70qi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 825D320838 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 0EC106B000A; Sun, 9 Feb 2020 17:24:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 09E116B000C; Sun, 9 Feb 2020 17:24:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA7A36B000D; Sun, 9 Feb 2020 17:24:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D14286B000A for ; Sun, 9 Feb 2020 17:24:58 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7C78E8248047 for ; Sun, 9 Feb 2020 22:24:58 +0000 (UTC) X-FDA: 76472019876.01.alarm42_e458393a074b X-HE-Tag: alarm42_e458393a074b X-Filterd-Recvd-Size: 5532 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Sun, 9 Feb 2020 22:24:57 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id y17so5207410wrh.5 for ; Sun, 09 Feb 2020 14:24:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pZloK1j3KMcViPM0mYOaGXZdok5Mk5NKREkeyN+dthg=; b=Q+iL70qiKnki6EtstCEFLEjn3sIHYW59r/9AifmuMLS6FttS5MPoj5U2a2bXgeRhki zDkdsNUSVLgjtqonq23fDB0fyHvg5wOV4yeleFaVwJQ3cpiYEpNbemMyeY7hMCTsuNcR pDmiBH9aBER7zoeD0dqRr4DUhV0U8MQHgga51ZRbYIWwStJl5zNGNjHNRa1o1GRR0eI1 RerRY402pMjqrGezmyIg6UsAKOVW+uaXvJCuwEaUzUJMFoEEU1zifqvbXm4LvvBGARO2 oIgmbyTMybVTXtHK9/GE1evj+tyOIyxXMVcB6dUUfSFG9FOxomRT76NamJsbLs+ojV9s yqjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pZloK1j3KMcViPM0mYOaGXZdok5Mk5NKREkeyN+dthg=; b=SRL00GsqPlecWMDJ17IYVKvCj5xWaX7X7joytna4lfaIueZ45ndsI+trfokw8TQe5C cQCIUiB4RPnAW7n15bzrTWvKM60c2qzwA8K7p6vTCm5k1EKbEw9OVDDhgDNzXaN7BkTU Ser+gDbKfpENJQLbohz630Y+awBviUm10UJcYqVNj25LcRK8PM0+DITDpZcpIIJfjOGk xdrDvRg1sGT9OCO6+oGNcz4sr4qfdqVIoOIFPHRN6yMRPe/8FyfCwywyuhldktBcrjMd VUMDHNyqmVOCmloWBdJqVYHjcCJ1chC6zXIkcqkXOnZ4NJWpddj1ZbjYpTTYLzjKXepB xnBQ== X-Gm-Message-State: APjAAAUhxdxQrxqIxxOZGSbk4Ft404bhgsfJkmCAM1l3DifaJ8G2A/xn TnaiiWaF6RlCVnXg8eNzsA== X-Google-Smtp-Source: APXvYqzytg39AgSq4qdwxPgY78rhWe/R9ylhetCXXb+V4MuhtAn316HrqoTCFOMT/vLNl4u29j4qHA== X-Received: by 2002:a5d:51c9:: with SMTP id n9mr13045738wrv.334.1581287096541; Sun, 09 Feb 2020 14:24:56 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id b21sm13421510wmd.37.2020.02.09.14.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 14:24:56 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: 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, Jules Irenge Subject: [PATCH 00/11] Lock warning cleanup Date: Sun, 9 Feb 2020 22:24:42 +0000 Message-Id: X-Mailer: git-send-email 2.24.1 In-Reply-To: <0/11> References: <0/11> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: This patch series adds missing annotations to functions that register war= nings of context imbalance when built with Sparse tool. The adds fix the warnings and give insight on what the functions are actu= ally doing. 1. Within the futex subsystem, a __releases(&pi_state->.pi_mutex.wait_loc= k) 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 release= s the lock. 2. Within fs_pin, a __releases(RCU) is added because the function exit RC= U critical section at exit. 3. In kasan, an __acquires(&report_lock) has been added to start_report()= and __releases(&report_lock) to end_report()=20 4. Within ring_buffer subsystem, a __releases(RCU) has been added perf_ou= tput_end()=20 5. schedule subsystem recorded an addition of the __releases(rq->lock) an= notation 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() 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(-) --=20 2.24.1