Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4410492pxu; Mon, 12 Oct 2020 19:25:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzftFhlTHHm1fhcxayfiIDfghE9ICSPECiAoXbQ2MPYkYL5Ks4BCROqceC898wzwDJe5FN1 X-Received: by 2002:aa7:d992:: with SMTP id u18mr17240413eds.284.1602555952081; Mon, 12 Oct 2020 19:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602555952; cv=none; d=google.com; s=arc-20160816; b=JkFr2NfWlUUCzvi41SIBh/ZkYIICRWufo4R3Vl2RFL9rbzae2UdiYCWIWPNe7kXJA4 0VgGvFvEklO1s38Zc7DkHXPVySQifuRf/ogV/Z9MqR1Jvl7QSQ4SmuijigNn0hJC9Ur6 84PIhSAGflHNC81Vl2lkG6eQ/B5Zia26Ag+4vfm74+S4WmQ+497eS9V7Cs3V2zf//ugd Wtr5lwRspTzMb54oQ4qER4lH6kBQe9xeO1/j67X4fgKNSZIevqocjyyROte32sceZoC2 5mKPWWpF9wOnjg+WXETJcl/Phuj+zIDELdC19nyXksNJDN8Iww5nbkStzmVrpIpo+mdE nZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/IkYojwuG3ESjEs/fGc5nkWdgPfNqJvj2QoCcIRyqg0=; b=myxaasXYCxhWjSL/jxzE3lcZh85yUtKm9f/AHxPJkWgYPErZsmXmsMCp9i61oATrDy l+PTwuySgc4lzPOI9Di2KRjQEH/3b23d04hydb3Gp58uOdC/9dYh+ZLVc3tMvNPeowPU zIinPr+d6rPpxnH2ZLzS/7R9/s3aXNCFZhUwFTq9EA/2IGZRD/WS5VwTH27pvAtATpPr xBApGkhzyqGVt71rQDHUvx+JYte9uGoowyHderMOLKr26NUva58fAYbePRn7si86C4ZG Aw5R8IA+Wd0RaG1C1lw8aNFm0R3GojMYTpXZ2VGBumCdwFSAUHA97T4c3uCiWwuVvQHG 1rIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a3ibAdgL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si13523725edq.289.2020.10.12.19.25.30; Mon, 12 Oct 2020 19:25:52 -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=a3ibAdgL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731608AbgJLOCd (ORCPT + 99 others); Mon, 12 Oct 2020 10:02:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:40142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731011AbgJLNiB (ORCPT ); Mon, 12 Oct 2020 09:38:01 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 02CC222247; Mon, 12 Oct 2020 13:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602509870; bh=FOXmyPjkKaaRWUtxVxLJOIElPQCwwDP0EwAvdHRhkYA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a3ibAdgLtdi5YLTGdk0Krp1VOegw7tqvVqpBeJL6D3iofbSjfx0dRb2XlYgz2X4s1 mOYWjNr6rd823wIK+EVzRZbOAPXUXj4FSbHXwjfo1Hk6A7vzAMjMlOZNeNyiRIVbc1 N5YD7xXYBfWP18BYu9mxTOIQU+feOiXvBiKIWHTg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 4.14 65/70] rxrpc: Fix some missing _bh annotations on locking conn->state_lock Date: Mon, 12 Oct 2020 15:27:21 +0200 Message-Id: <20201012132633.330871566@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132630.201442517@linuxfoundation.org> References: <20201012132630.201442517@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Howells [ Upstream commit fa1d113a0f96f9ab7e4fe4f8825753ba1e34a9d3 ] conn->state_lock may be taken in softirq mode, but a previous patch replaced an outer lock in the response-packet event handling code, and lost the _bh from that when doing so. Fix this by applying the _bh annotation to the state_lock locking. Fixes: a1399f8bb033 ("rxrpc: Call channels should have separate call number spaces") Signed-off-by: David Howells Signed-off-by: Sasha Levin --- net/rxrpc/conn_event.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c index 75ec1ad595b72..2432c118397f6 100644 --- a/net/rxrpc/conn_event.c +++ b/net/rxrpc/conn_event.c @@ -316,18 +316,18 @@ static int rxrpc_process_event(struct rxrpc_connection *conn, return ret; spin_lock(&conn->channel_lock); - spin_lock(&conn->state_lock); + spin_lock_bh(&conn->state_lock); if (conn->state == RXRPC_CONN_SERVICE_CHALLENGING) { conn->state = RXRPC_CONN_SERVICE; - spin_unlock(&conn->state_lock); + spin_unlock_bh(&conn->state_lock); for (loop = 0; loop < RXRPC_MAXCALLS; loop++) rxrpc_call_is_secure( rcu_dereference_protected( conn->channels[loop].call, lockdep_is_held(&conn->channel_lock))); } else { - spin_unlock(&conn->state_lock); + spin_unlock_bh(&conn->state_lock); } spin_unlock(&conn->channel_lock); -- 2.25.1