Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp836408pxu; Mon, 23 Nov 2020 05:32:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzq1MLXf2Tb4sT1Jy7OkOxnT+9eb7nrdIHmBkPlAEs9Zu8W6fPwJJ+kx6nQeghxF5NerMp5 X-Received: by 2002:a50:ed84:: with SMTP id h4mr8857825edr.230.1606138324156; Mon, 23 Nov 2020 05:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606138324; cv=none; d=google.com; s=arc-20160816; b=tBTN6D7A0PW6BDX3tYhHbkxB2dbvXJYhdJjEVKii+AI9Z+D5aIMFKOklR5umyxsk7F JLLsI1sVz2v26A+RytownMmooT7JIrnBiu/stZWJKF3+BhWpMIqrKgatDunMLhfdMfyv Md1Cg0d1Y+xAiYoaFwia8d5C8he60bDOenLZUHk5yuo7XmNqhaWi3aZ99n9aso4QxbVY XmTE5bs//gZUPhEDVNuv6NpKRD/fdsbeAtM8NCyPPPWM6bqaDk8h8kf1mpLshG/xDoCV PTeN5KBJncG/v35TrYjonG4qrMUZMOtYMEj3fRxPbzzAJ60luoQh9rhu4qj2+HlzVP5/ C9mQ== 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=ckMo4Iq3L4nhFE5RRNbihS6DVUV9QfYlD2PYj5V2vE0=; b=BPGSY183Rzo5i0HX+UNDoweKb2a21oM8CYANgcKJNQWmAuBfFv7aXLhUg9LlXfs+91 6FsQUWiefcqWFCRNctCpi++nXq66D/mUWzMaW2crPWG4lD4Bfu3GWNL5OL7AYGZn+mNE P10xE0ADF6OWfn50HRlTzwST/fa++2EpoouYys0fkAg9U4tJfhG7oW35YBIb8y1XPpg9 WWrEh8WkxWf/TtBpF4dRia0Rv9eQbaBwqN2kbJBw3a9H0WcScRrqQ7H3cfZyrNUFPm+a UErSOz0L/+EV7UlGmecpFytHb7CYqKd+8bTyscLCpqmnsrQYJg8mRbF3KdHdlfWZIsyi BTCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a5RohR0x; 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 k5si6501590ejk.655.2020.11.23.05.31.40; Mon, 23 Nov 2020 05:32:04 -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=a5RohR0x; 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 S2389212AbgKWN2J (ORCPT + 99 others); Mon, 23 Nov 2020 08:28:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:42786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730879AbgKWMbg (ORCPT ); Mon, 23 Nov 2020 07:31:36 -0500 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 B368820728; Mon, 23 Nov 2020 12:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134696; bh=uiEihmVFQpWakOa2ZSw0/yLXIDE4p6agPGKsGcONUbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a5RohR0xWMX6+/ieBxHvLuSKIBGkyuSTEftv6fjxwCAEzKIhJcKI13XG6gtcMRkJJ JGJw0MPO+7CoMNTQDf6vwk7hYS0u5mYOEebulCAUp/MhodsX1D8Oacf3NC9wQnbpj3 ACimrIhitYX6WUhwJ3wCJwqHeDd356ASZVEbw628= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Loris Fauster , Alejandro Concepcion Rodriguez , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 4.19 50/91] can: dev: can_restart(): post buffer from the right context Date: Mon, 23 Nov 2020 13:22:10 +0100 Message-Id: <20201123121811.753440341@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121809.285416732@linuxfoundation.org> References: <20201123121809.285416732@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: Alejandro Concepcion Rodriguez [ Upstream commit a1e654070a60d5d4f7cce59c38f4ca790bb79121 ] netif_rx() is meant to be called from interrupt contexts. can_restart() may be called by can_restart_work(), which is called from a worqueue, so it may run in process context. Use netif_rx_ni() instead. Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface") Co-developed-by: Loris Fauster Signed-off-by: Loris Fauster Signed-off-by: Alejandro Concepcion Rodriguez Link: https://lore.kernel.org/r/4e84162b-fb31-3a73-fa9a-9438b4bd5234@acoro.eu [mkl: use netif_rx_ni() instead of netif_rx_any_context()] Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 1950b13f22dfc..f88590074569e 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -579,7 +579,7 @@ static void can_restart(struct net_device *dev) } cf->can_id |= CAN_ERR_RESTARTED; - netif_rx(skb); + netif_rx_ni(skb); stats->rx_packets++; stats->rx_bytes += cf->can_dlc; -- 2.27.0