Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp690995ybg; Mon, 1 Jun 2020 11:47:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmgrSOE4R+Imm3GsZrjYYDUspVqOnqU8+O0KDIZqEpj7ugZX9Gy4BbzWlL56eBKqjmkh/r X-Received: by 2002:a17:906:616:: with SMTP id s22mr19719280ejb.382.1591037263333; Mon, 01 Jun 2020 11:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591037263; cv=none; d=google.com; s=arc-20160816; b=fFrD/vCGq+4DGPnbJZL0xM9NjH2QKWD1oYbrmjQOs8rHd64VWIRoNp8YaM5qx46CUR fK1is2KGai3ypaNZJBbAZpNU0Xl97Z19QgzfuJMFh0tahMtwJVKR21TDjxUdCw7i/K1p dpju1DdVTs+L156LjNj9miaMFj3KBH16Zjzw6uD0QP/QqVqqxTejHfnZBGtinlAn4KJH z20KIzoCRi9ubdfOuUwuHkaFQn6YVyaM8d4NaEOGc+66o/6UCCxXiHhSihtLuaS+ekt7 Qm524heU3n6wL64bFaV5oZDTLcHL7wNB6Jvn5LeDorSUmS3J9nZld1XoWZb8Lh3n9K92 WNVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g93xSeVzbXnQj2fNhOshw5NGGxgJHKKmL99+t0ESn98=; b=SwH2fX0C3gzcqN0zeT/BzNSS3x5r8OGaQF1HL74BYV9RX3yvMj005FRbhX6L+89QH5 cuCMEyqJa3Vj+pqxg/k1xysgV4lCc7s6hjFyjDuiLa7Tbi95OoSzc6FPNaIbwMdd/DXQ MkJSakSLL4f/I0+FnS4e5GVV+fUTA/AHEedm1vt4CzTRDzdrfJfVbN/Se/xEd3hqjX3m F+wGo20lMdIIjlF0w26UWxL+m772fo1e1YgxvITN+1mibaPhlopbhsnQD/STLyzi+u2u 1gTMT0ZaCwiTtPElLsQXK6/zQeo7NJW4k35m86oo6A7DTobS5vz6/um5QWsmf6GKPbUe 8rrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zY3Mua8z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si195652ejo.321.2020.06.01.11.47.19; Mon, 01 Jun 2020 11:47:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zY3Mua8z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731019AbgFASpi (ORCPT + 99 others); Mon, 1 Jun 2020 14:45:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:55722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730867AbgFASJU (ORCPT ); Mon, 1 Jun 2020 14:09:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72F752068D; Mon, 1 Jun 2020 18:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034959; bh=EttFuyWUsVA2+0so7dutokKTLb7us68VFKlExgm5ag4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zY3Mua8zv/Vm0hDJnr9vKY+pLPHZP3rkk+GNJ9TZUgRG34vDxMXVz402XaGrgaSBM EK2dCf7tt+XYxJNjOBPLI0WcboOnOefiOPdX/Sjv7EFDvgc2gfIb/5O3aezwzLXWdx jUsC2IcaTPO7oz2EIpTHrc+FBqJius81tmhopi8k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+bb82cafc737c002d11ca@syzkaller.appspotmail.com, Madhuparna Bhowmik , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 062/142] drivers: net: hamradio: Fix suspicious RCU usage warning in bpqether.c Date: Mon, 1 Jun 2020 19:53:40 +0200 Message-Id: <20200601174044.350949290@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Madhuparna Bhowmik [ Upstream commit 95f59bf88bb75281cc626e283ecefdd5d5641427 ] This patch fixes the following warning: ============================= WARNING: suspicious RCU usage 5.7.0-rc5-next-20200514-syzkaller #0 Not tainted ----------------------------- drivers/net/hamradio/bpqether.c:149 RCU-list traversed in non-reader section!! Since rtnl lock is held, pass this cond in list_for_each_entry_rcu(). Reported-by: syzbot+bb82cafc737c002d11ca@syzkaller.appspotmail.com Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/hamradio/bpqether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index fbea6f232819..e2ad3c2e8df5 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c @@ -127,7 +127,8 @@ static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev) { struct bpqdev *bpq; - list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list) { + list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list, + lockdep_rtnl_is_held()) { if (bpq->ethdev == dev) return bpq->axdev; } -- 2.25.1