Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3702455pxb; Mon, 24 Jan 2022 15:48:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwB4NgP1a8BXMAdLupBnLJIIs+dpaJQpdG75UUPKgNVn4ZMeqKvbxBGZjRbF2aw1KAyN480 X-Received: by 2002:a17:90a:6448:: with SMTP id y8mr736207pjm.20.1643068115335; Mon, 24 Jan 2022 15:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068115; cv=none; d=google.com; s=arc-20160816; b=G1R4SZx4jY5OAG7sW0W7df9lmEH6jMQyqFdd3Dd7UmGl9vY1w1iRJ5g3AVEMkluKf4 ROP+ydmrDyWdhC7wAejnLDlWZnNHE5JDtEcEnjkbHFVnXeV+v1RDdfPx8T3E+0VwZj67 k8Bjuc7v2YNFEriveEEWYaVkMufOpjQUfE1RvFkfTStw/Qur9KGrBzHNQDDPq5hCucG8 g+6xQcfwKupyxgmM9d8dYZNcleLcvFmozBpmt+jWsC0PYDhrS9in8VnbMsPyrdj8dNYh 8fJvBU64FkSB0nhXdj2xLSM5SD7f9WRUFILYwu/9YfvuNF8FBAV8c+EVRZsFfraBxQYm uHSw== 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=sIVV6yOwG3KiSRFSnvmrR9OMrwkP4JDSsx5dZW99F0k=; b=mrh7gj6DcggWlwPNF0TB7te2LBRLp4W3rnRbYPsc7eQ2YH6toU3hyyzol1FW/cV/60 gOCwU6wessQysxmDuRFZZMuW3UyzHEZb/zs9BkUtPJEEzFwYOfDaNzn8V1NE5W0sx+ol uO9eZE/5NWrutoVXR+eWNrgf9iNC69phxudCUECRdIVjqR07S36fTrVRTekIpNPo9n7i axjqmDafOcsicRLhDaddzsfLFCb1/jizjGNR0/VbvOqcPochURRFmQR0oT6sVyO9hrWb siMFiD5+zqm9QdbRGjR2DwcZ7vfk2/kKKbYAtgTIYWhLzu9gauSbN+kHTZcxmMQnqN/N ohuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QNLPMzsE; 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 w4si5066763pla.146.2022.01.24.15.48.22; Mon, 24 Jan 2022 15:48:35 -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=QNLPMzsE; 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 S2362206AbiAXXl4 (ORCPT + 99 others); Mon, 24 Jan 2022 18:41:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1841130AbiAXW5l (ORCPT ); Mon, 24 Jan 2022 17:57:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9D04C0797BF; Mon, 24 Jan 2022 13:12:07 -0800 (PST) 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 47FCF6131F; Mon, 24 Jan 2022 21:12:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5616BC340E5; Mon, 24 Jan 2022 21:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058726; bh=Q3ypDHHx3RUbuMxMVkYb3TNXwem+cB96Bf8NslW8Bak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QNLPMzsEr1DCoA5tGWD97m2akatrcNwQHqWquUxO9lyv/BSt6Wna3y16IVI9O/cKI i++5b/VQ/faMtXxTI47sL9mcYvMHZeCURd3DD593KEIE8Tz+KYj/mWToohOBIPUG2t 27vaMOza4vTaC1ZkX2rKEZUiv2Z9fkupJmJ4uVLU= 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.16 0383/1039] rocker: fix a sleeping in atomic bug Date: Mon, 24 Jan 2022 19:36:12 +0100 Message-Id: <20220124184138.185390373@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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 3e1ca7a8d0295..bc70c6abd6a5b 100644 --- a/drivers/net/ethernet/rocker/rocker_ofdpa.c +++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c @@ -2783,7 +2783,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