From patchwork Sun Feb 9 22:24:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jules Irenge X-Patchwork-Id: 11372309 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C6C8138D for ; Sun, 9 Feb 2020 22:25:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D6A7C2084D 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 D6A7C2084D 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) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 09E116B000C; Sun, 9 Feb 2020 17:24:59 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org 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-Original-To: linux-mm@kvack.org 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-Spam-Summary: 2,0,0,ce7d09e0e2bbb141,d41d8cd98f00b204,jbi.octave@gmail.com,:boqun.feng@gmail.com:linux-kernel@vger.kernel.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:jbi.octave@gmail.com,RULES_HIT:41:355:379:541:988:989:1260:1311:1314:1345:1359:1437:1515:1535:1542:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3872:3874:4250:4605:5007:6261:6653:6742:6743:9413:10004:11026:11658:11914:12043:12296:12297:12438:12517:12519:12679:12895:13053:13161:13229:13548:13894:13972:14096:14394:14687:14 721:2108 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 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 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() 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(-)