Message ID | 20200619204730.26124-5-mcgrof@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=VjTG=AA=kvack.org=owner-linux-mm@kernel.org> 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 19B00912 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 19 Jun 2020 20:47:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB47A2100A for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 19 Jun 2020 20:47:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB47A2100A 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 02CD58D00FC; Fri, 19 Jun 2020 16:47:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EF7DE8D00E9; Fri, 19 Jun 2020 16:47:39 -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 E0AFE8D00FC; Fri, 19 Jun 2020 16:47:39 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0206.hostedemail.com [216.40.44.206]) by kanga.kvack.org (Postfix) with ESMTP id C40368D00E9 for <linux-mm@kvack.org>; Fri, 19 Jun 2020 16:47:39 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8152A33CD for <linux-mm@kvack.org>; Fri, 19 Jun 2020 20:47:39 +0000 (UTC) X-FDA: 76947147438.23.trick78_1f009b526e1b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id DCE9D37608 for <linux-mm@kvack.org>; Fri, 19 Jun 2020 20:47:38 +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.215.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.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:22,LUA_SUMMARY:none X-HE-Tag: trick78_1f009b526e1b X-Filterd-Recvd-Size: 3412 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf48.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 19 Jun 2020 20:47:38 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id e9so4966437pgo.9 for <linux-mm@kvack.org>; Fri, 19 Jun 2020 13:47:38 -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=MrF1jfqjrRRH1tl9ztiX2X6K/O24bWJTjcP4ybZxBQ3XpE3TtdrFA2Jjt9FMxMl4KQ 2DQDP1aehNMtlTBOIdFG9//YrN8tpOhQshjPoWN3JK6TbwL/QDIBvXkK6NHC73QtfZjA bWPN7cKoBBgolv1VSVpEYFocKSn7QJy35YN7daO5JmN1AqfkmYl7vhwtrgKcQRTCefyA 7Ytgbv0jSodaCAOzvFfSHzLFaASTbMf0yvXh6m7itxSWteI2JiL4irYywBjW2eduh+V/ P3C5wObSyFAOe8X951994V4tgKiwhi8QNyPNijz/s49uULlkPCz8FjQm/fWrbugfUF2C CzPg== X-Gm-Message-State: AOAM532HDchFgdqKCqMQvaQBoqHVwcSnFRv7dmCxjFD2jryb3q1vRgOH WExN2SCA7pcZzECdvt74NX+X5VC4UOQ= X-Google-Smtp-Source: ABdhPJw+rxutY1uGOaVhJTaFSz863dhub5gLBJTRgN2o19CWJtfQJo8NFso3QjofJ3IY9132mgZ6aQ== X-Received: by 2002:aa7:981d:: with SMTP id e29mr727732pfl.298.1592599657521; Fri, 19 Jun 2020 13:47:37 -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 u14sm7353047pfk.211.2020.06.19.13.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 13:47:33 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 657E241DAA; Fri, 19 Jun 2020 20:47:32 +0000 (UTC) From: Luis Chamberlain <mcgrof@kernel.org> 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 <mcgrof@kernel.org> Subject: [PATCH v7 4/8] blktrace: annotate required lock on do_blk_trace_setup() Date: Fri, 19 Jun 2020 20:47:26 +0000 Message-Id: <20200619204730.26124-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200619204730.26124-1-mcgrof@kernel.org> References: <20200619204730.26124-1-mcgrof@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: DCE9D37608 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: <linux-mm.kvack.org> |
Series |
blktrace: fix debugfs use after free
|
expand
|
On 2020-06-19 13:47, Luis Chamberlain wrote: > Ensure it is clear which lock is required on do_blk_trace_setup(). Reviewed-by: Bart Van Assche <bvanassche@acm.org>
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;
Ensure it is clear which lock is required on do_blk_trace_setup(). Suggested-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- kernel/trace/blktrace.c | 2 ++ 1 file changed, 2 insertions(+)