Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3572473pxb; Mon, 24 Jan 2022 12:31:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDMpFwe5ri5GD2dqHv/Du7W1Kq56MVjDEuPaM53ohrfHquvG/B43c8sy+PdA3Thv6z0OUO X-Received: by 2002:a63:a745:: with SMTP id w5mr12874388pgo.374.1643056309628; Mon, 24 Jan 2022 12:31:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056309; cv=none; d=google.com; s=arc-20160816; b=eKMNx8aczYPAgyyIfsp3uDhgjGy7PM6uN4rDNy2Mc3m1C/GLp7nWiz389TdZGawulq 5ndGxKf67aLVMc9jJspLGPJIjqdLpTRbbLs/zG3K32cTlAjVP+u9z3VohVhTqr3a1y5r ReL6p9HFE1aVk4ubjfjK/PjhU5nvFLtB5MM2LT6gzWT0rY/lhqCg9ZXLjPaHpFcynN48 Jd3kc93+F3qbSHuaJQ+ox/BS6HgCZ/igliyDHtEbbPIwP2fkA7+QbrhUSOXda0C5cJZF uttZa9h3j/T5yExz+Tk7SDAZey1pDRZVIAWD/hlL//BVlpTFqNqzWU5wO3zxPAK8uUKE QtyQ== 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=Vze5Qjb6XNAVvXcWRT1WMOSbc0AXlwhoY8hLCU5Bmr8=; b=LEa6PBeT9qJluennzoS/jCm3BmXJl+rtsUoflbNZiDuIZqzFb940w7U2qyLQKyVyXD d5ay4mi7yq4mDey2T7xnDtCVKfxbNUW9ToayFrPs4s+QFcjgEUh82UPka6zj1uxPDWry LNd5NrIWzdRm7VrmRf8fgLS5Ht0Hnq0Hagh81LPrjxKimnjvdyJlblb48x1YlPv2KVU4 5po1GyLjZvQ5KcP3N2/zAJ+qod61MXR4lsXyKAOERWVTF6YmADYdzIt35q2jb3Hch6jX k82WwXlN/kfw+/2y8ftWjfRznxNFD+UX8NbYDtVvqiJuUpvu7Q9YrWTtauOebxRxZtm4 IpVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aFvpbW7w; 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=pass (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 k8si16351083pfu.23.2022.01.24.12.31.36; Mon, 24 Jan 2022 12:31:49 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=aFvpbW7w; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354111AbiAXTgB (ORCPT + 99 others); Mon, 24 Jan 2022 14:36:01 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:57036 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352064AbiAXT3d (ORCPT ); Mon, 24 Jan 2022 14:29:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3FF356135E; Mon, 24 Jan 2022 19:29:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A3EDC340E5; Mon, 24 Jan 2022 19:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052572; bh=ETqpcHCICc1tUB+WtR27CydYwT/UiM3pGK7XK2NBSNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aFvpbW7wDgl/qFmbFcFK83tze/6thQYC5IyZ3jUj19NO7TcbpnxVXBx0dev5HjZ1P 5FhDzMbXJ6qcX87J4RoKH7c6nvGOHoPJmgubpeNLYnzaXQKZV9JMnYHkfOcKy2qeNq DEa79Gyy9z/w+UW4dsDcFbGeaZaRm+RbTFziEWYw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 104/320] rocker: fix a sleeping in atomic bug Date: Mon, 24 Jan 2022 19:41:28 +0100 Message-Id: <20220124183957.261941057@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@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: Dan Carpenter [ Upstream commit 43d012123122cc69feacab55b71369f386c19566 ] This code is holding the &ofdpa->flow_tbl_lock spinlock so it is not allowed to sleep. That means we have to pass the OFDPA_OP_FLAG_NOWAIT flag to ofdpa_flow_tbl_del(). Fixes: 936bd486564a ("rocker: use FIB notifications instead of switchdev calls") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/rocker/rocker_ofdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c index 7072b249c8bd6..8157666209798 100644 --- a/drivers/net/ethernet/rocker/rocker_ofdpa.c +++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c @@ -2795,7 +2795,8 @@ static void ofdpa_fib4_abort(struct rocker *rocker) if (!ofdpa_port) continue; nh->fib_nh_flags &= ~RTNH_F_OFFLOAD; - ofdpa_flow_tbl_del(ofdpa_port, OFDPA_OP_FLAG_REMOVE, + ofdpa_flow_tbl_del(ofdpa_port, + OFDPA_OP_FLAG_REMOVE | OFDPA_OP_FLAG_NOWAIT, flow_entry); } spin_unlock_irqrestore(&ofdpa->flow_tbl_lock, flags); -- 2.34.1