Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4419987pxu; Mon, 12 Oct 2020 19:48:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFhuXzziS79csDMnp1GpdWEMVRCWu0B+/eOXZ2gC1KC3H+W+rRpzbrcfie/EWWEmauf5CM X-Received: by 2002:aa7:ca52:: with SMTP id j18mr16946002edt.147.1602557323235; Mon, 12 Oct 2020 19:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602557323; cv=none; d=google.com; s=arc-20160816; b=iKEmtYb17/c15FVIGRnOPRy0utiv+no23C9g8ArvODMjcLXalzyU9uIp0Fp32Ssxwi WxVwBvzDVSOLIrP5kBi1uh4YU/lharFG4D52XDGmJE84Vs/HZgARqYJuFxgKEiZgPtfK AqXXuxpvYcJYZSOXT31EYUwKYzxXXSSrQlxXAEejnEFGM8MePJs5UpAWE2R4wWqMv1Jk ft3M31rrKY1/AIAUhvGhO2m3zI8qDm17It7MlK7j+yrrnsjSzTh9HLmLwOZMhfW00B46 ymi+4wOWDL42y9pZaOqBqD2HH3pSPo0dJd/mLQiA9Y4/6WdOew6pBlk/+oQnenyqXbGE vj9Q== 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=bx8WNIP9VA/yXX/lWBlxxoibauJSbkpMQ9wsKG70BsY=; b=pvxHCM6dv+k8D/AYZVVx6okQT/1nL09BBaW6Dp8d94ot6HBk8pJR28Up1OjA1QGRDh HiAbeieVJH2J39KzRAKcB4k5hUFoVVdPLTj95KOSwHHwH5mSafbI70UapJ9dC23C7u28 /Pjnej9VTUIepJykAgPoiCN5wMKYbFD0ZDRHf/5h8bjMmXzmMW+2DFP5IcjVlIUcrg1U cvdBhBaQ+1e5uy8SAOz6vSbiJ8leAvfP/HZK8O6zxjEVusfkCuVU5ON/v7Poef/zzmUc UZV5epIGgbG6NO08nLux0hauLQw2rFxGrnBOOMZHtywMxFihW3LgrzAeRlsm4aZV4oco 0eng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pLJQisWG; 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 q13si13695888edb.308.2020.10.12.19.47.56; Mon, 12 Oct 2020 19:48: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=pLJQisWG; 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 S1731856AbgJLOFM (ORCPT + 99 others); Mon, 12 Oct 2020 10:05:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:38002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730810AbgJLNfZ (ORCPT ); Mon, 12 Oct 2020 09:35:25 -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 6960722227; Mon, 12 Oct 2020 13:35:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602509723; bh=xNQeYc8vbiD1ts3rSFDYRnaEEWjjM7CPcujzTGXaWD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pLJQisWGeETkqHpef1KYUxTZrVapTDvhyxTh6Ge4/MZ1hM7owFLRq+A9gCzMGnBY/ EZZhqyindvIVKJTgA5qYdWNFxxtjn/O+/tXB2/6OdpHNylXbJRl1ouUOLqyyRNLbVp 4QBSKowIrRgvKlU8I5DCuxuCYFpXr+2zkkIT7eO0= 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.9 50/54] rxrpc: Fix some missing _bh annotations on locking conn->state_lock Date: Mon, 12 Oct 2020 15:27:12 +0200 Message-Id: <20201012132631.889260681@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132629.585664421@linuxfoundation.org> References: <20201012132629.585664421@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 b099b64366f35..ec02dd7c12ef4 100644 --- a/net/rxrpc/conn_event.c +++ b/net/rxrpc/conn_event.c @@ -309,18 +309,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