Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3658939pxb; Mon, 24 Jan 2022 14:39:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzF0Bni6f7WKENXep/ZXSjgYJHHNaOyaRfQ9USVMRYL7+dchBHUs57H9hhJsquxPoFHgl1 X-Received: by 2002:a63:5611:: with SMTP id k17mr1257098pgb.88.1643063998436; Mon, 24 Jan 2022 14:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063998; cv=none; d=google.com; s=arc-20160816; b=Zv/szzTeS3K+mWCm0neU2BFAE+kvnmVV6yaq6LPRpYfMm1XfMQT16NovKFSkNdLZfc dEg76e15skfHtHlupLy3Z/1xW2HkMzZnb7Up0TLjIc6jPDGYOOxQBT4x5DnDgsREVASV sUqVGfYuiejUxTbmIhD4QhngkrawfTZWQ+El7Sb4HIVKRyewz/oYKsIX24yV/wn8xmS+ GbFFO/Sc0R6XArPN3qVnzJ9z1hnYKQoPP8JwPyHuRt5+VsQKcWFGgVP103mdRE3Nou9O tCATHH4Y0+9EXjHfbdqHXpV+yZsFj2rLXYQRWEGbCB3PTt1tMd/4Se0lBRkRuqIG44qx 7Saw== 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=jHReCmlvR+CGR9Cbgxi4XLIX2Qfl9zDC2IOs5/mOuN02P5GlUpt3eU8BRT9GrQIfo5 BIUM1Z2uhTv3g5I2y5dhKo+CUcacziCUGzfyyTwzyVbC/AuVClGeAKvX5jZtUy6NOE7t G5RaDeZfh2DUnST3GVBwbo1kbLgpFSP5B8FPCF+kPQSfp6hPs5SnmVE8akAGrm4YZBfu bhiyUTeF9I7UiuO5FyrNAeLMjvrrSQgwrGOCqypHSyyhhsOSLX2R4im2Uw3xg4FxqJ/d o0tjpJrrobntGFtBh3SSy22FK1TX4X0IgcHNBPNhYaPursoh2YWQd/qiEVEt3FJ+PsDZ hH4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NuY1FS2S; 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 c136si12724972pfc.67.2022.01.24.14.39.46; Mon, 24 Jan 2022 14:39:58 -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=NuY1FS2S; 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 S1589084AbiAXWe5 (ORCPT + 99 others); Mon, 24 Jan 2022 17:34:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1456650AbiAXVjo (ORCPT ); Mon, 24 Jan 2022 16:39:44 -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 296A1C0419C1; Mon, 24 Jan 2022 12:25:46 -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 BAB0F61506; Mon, 24 Jan 2022 20:25:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2045C340E5; Mon, 24 Jan 2022 20:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055945; bh=Q3ypDHHx3RUbuMxMVkYb3TNXwem+cB96Bf8NslW8Bak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NuY1FS2Sq8YEtRCP2/hIxoQ7mlHrf/koqdbwAKKFSIyszhvv2btwdIvg/2bY3UTRZ n4BO9bcnvTPD5A0qlXT8h/jmTWQWGSgHvYZEJgPuDlA1FBcvgbbUgjr0oSg8J+oz6J Pe4sZBeuxNnhiTsCGzqq8TU40uaFiOQAogMeXcyI= 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.15 318/846] rocker: fix a sleeping in atomic bug Date: Mon, 24 Jan 2022 19:37:15 +0100 Message-Id: <20220124184111.873437874@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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