From patchwork Mon Jun 8 17:01:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 11593707 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 3E67D92A for ; Mon, 8 Jun 2020 17:01:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 157CB20760 for ; Mon, 8 Jun 2020 17:01:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 157CB20760 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F3AAB6B000E; Mon, 8 Jun 2020 13:01:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D79736B0023; Mon, 8 Jun 2020 13:01:40 -0400 (EDT) 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 B777F6B000E; Mon, 8 Jun 2020 13:01:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0068.hostedemail.com [216.40.44.68]) by kanga.kvack.org (Postfix) with ESMTP id 8C6066B0010 for ; Mon, 8 Jun 2020 13:01:40 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 220F91C829C for ; Mon, 8 Jun 2020 17:01:40 +0000 (UTC) X-FDA: 76906661160.02.grape95_550a40126dbb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 11D6F940B3 for ; Mon, 8 Jun 2020 17:01:36 +0000 (UTC) X-Spam-Summary: 2,0,0,30b94389a20cdd55,d41d8cd98f00b204,mcgrof@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1539:1567:1711:1714:1730:1747:1777:1792:2393:2559:2562:2903:3138:3139:3140:3141:3142:3871:3872:3876:5007:6261:10004:11026:11658:11914:12043:12048:12114:12296:12297:12517:12519:12555:12895:13069:13141:13230:13311:13357:13894:14181:14384:14394:14721:21080:21444:21627:21990:30029:30054,0,RBL:209.85.210.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: grape95_550a40126dbb X-Filterd-Recvd-Size: 3407 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Mon, 8 Jun 2020 17:01:35 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id x22so8805389pfn.3 for ; Mon, 08 Jun 2020 10:01:35 -0700 (PDT) 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=jH2CPsvsaNzRGDf+QoUv0Reklj4c8N9GM5jBSfoalww=; b=iwKeW5JHpikXBm/C6qJ1E01v24OgF0c26iaPiyQyr5g9Cz+QK8Xmm9ydOSFDgTD4ca kSFFDaPjv+WKB1DbPwo+sNK9Nas+M/VScFL/YyDcrzYp274ajBcATcrnQNdf2neENypE 32x/L2gkPNxD+77mNg3XHLoGSHmm1PSdoiaPRId3f7kcOgZo8fp6chhflV9cnlYBQ7A0 9ikHpN8Q61rcnVXA69chhNR1sVTgELsYJtwrIVVvrmNoa8ZDKhiCcwquAZCYN23Tx/rk qrwyzS+ejMN8iuMC62VJiszsXt9RBIccdUeEFt8oXGjE0yc17/yqhuKgTy9smzQYWWGm qIGg== X-Gm-Message-State: AOAM5318Mee0tpyx0HxVR3bDR8sITP7QxpeQHlb8zh4WgurD0DYPyDL5 KknShJfLnQWIfAebjL7Z5yA= X-Google-Smtp-Source: ABdhPJwwBujS3U9PCsomBnrxJDGD76z2zyRa1W/F///y1VSt1LrxETfDgpsHrdXoXXBTG59fZ8Mfyg== X-Received: by 2002:a63:6345:: with SMTP id x66mr20466636pgb.156.1591635694775; Mon, 08 Jun 2020 10:01:34 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id x197sm7671771pfc.13.2020.06.08.10.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 10:01:32 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 6DF0E41D95; Mon, 8 Jun 2020 17:01:28 +0000 (UTC) From: Luis Chamberlain To: axboe@kernel.dk, viro@zeniv.linux.org.uk, bvanassche@acm.org, gregkh@linuxfoundation.org, rostedt@goodmis.org, mingo@redhat.com, jack@suse.cz, ming.lei@redhat.com, nstange@suse.de, akpm@linux-foundation.org Cc: mhocko@suse.com, yukuai3@huawei.com, martin.petersen@oracle.com, jejb@linux.ibm.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v6 4/6] blktrace: annotate required lock on do_blk_trace_setup() Date: Mon, 8 Jun 2020 17:01:24 +0000 Message-Id: <20200608170127.20419-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200608170127.20419-1-mcgrof@kernel.org> References: <20200608170127.20419-1-mcgrof@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 11D6F940B3 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: Ensure it is clear which lock is required on do_blk_trace_setup(). Suggested-by: Bart Van Assche Signed-off-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- kernel/trace/blktrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 7f60029bdaff..7ff2ea5cd05e 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -483,6 +483,8 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, struct dentry *dir = NULL; int ret; + lockdep_assert_held(&q->blk_trace_mutex); + if (!buts->buf_size || !buts->buf_nr) return -EINVAL;