Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7082984ybc; Thu, 28 Nov 2019 10:30:16 -0800 (PST) X-Google-Smtp-Source: APXvYqzej5RdaXrQF/H4x6/jkHVraMoIWOzQJdhzC//ROSgNxxMb3ehg7UJ3kLfyMXTANmad7Bj2 X-Received: by 2002:a05:6402:1ac4:: with SMTP id ba4mr14162388edb.201.1574965816703; Thu, 28 Nov 2019 10:30:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574965816; cv=none; d=google.com; s=arc-20160816; b=SMwX2lUl1C8rPG+zQzJgQauVFcMBELszK3K7ZY3eiTg0PtSMIhV65HeZt1iI+Vj8gB tjqeoM3kmEEG+BFMFqUI8KqlR4+fWJuW1ggbc1XXyDFUB9TEzTc5VFi87N6VKg66GRfL fF5pdU2l9FfPaFV5CnJaABHFWJZP32vy2u//pCg1NqBYckMQYck9zmtbqAkMvKGmQBTa HIChn0Ky7SjVrfn9bVL+1OibyH3zkdRZZs8tTAJBo0dbV2bPBVvePLpKtihFsjhjVinj /iLRFgILHNHBEaOw09Dm/ernWXTOAsrCoXLD6wxVB+BK6mbVd5t8hXZ1ukRn3HF5gxGU exPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=MPGcMjX+exMTcSub0NHeiUr4q94MYBuhn57bxnmgtrs=; b=tygHLMP7CYgukoPEg9R4+7MUOFMrz5Lixt36Tu9YEBfZj64RsMS1LdRu7zjk9spz/o kY2spBgJIxpdKp7mFV7xkdn27w+4h2e0Lo1cI1UYNxC/2HKXUBpxXG3fFYgzN3sRZSlL PJffOyPhFIbByqIQgGDxUvauY/J4f/ZMfWqVWFGz4JSxKH2ksAqHXa7LWJoVW7DYFBC/ b2P5fKo0zdJlq8BBFyVWH4AVeSWve9fdv/xywv4ay0wg8hazjuv+5oM30WXjF09tiBFG dz9OAHp3zHgrxGG2wYYzEceO2DhJeibcftkeOiVqAr97kya/F0Uv+q84QjalA23lzNMf +fRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si12389349ejc.16.2019.11.28.10.29.51; Thu, 28 Nov 2019 10:30:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726715AbfK1S0S (ORCPT + 99 others); Thu, 28 Nov 2019 13:26:18 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37424 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbfK1S0S (ORCPT ); Thu, 28 Nov 2019 13:26:18 -0500 Received: by mail-lj1-f196.google.com with SMTP id u17so2033007lja.4; Thu, 28 Nov 2019 10:26:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MPGcMjX+exMTcSub0NHeiUr4q94MYBuhn57bxnmgtrs=; b=BdSf6Z4KoSpTq+PZluOnpZ/TjnSw+CqZqt4sbLp0x7oZdnZ3eVJ58bM6XAvy4QasmG 22iYfdX4NTpyxet6IwcJkyTAiR/SfhBE0DKVxuFEUpPdCtFERhhJjjv3xbOz6IHMzSbY 61TnkqA+ZdsHnC9VJUJq3FI1jCW6d3tF2hwQlYjFp0DvQCiyYXNXcqZ0D7GUgccDU3h5 aBwT+1w0/zeGT6+lqgfvmVbWCHOZ9HuJxTUjSCcb0qlMi9x9CqaM50aeti3YvFcW48WP ltQfr37ws/MPl7md7/9oTO6e1jqd0doO+OsbUUddn7GGQi0I39wv+UG5EQrSu8zeO3sW 4zvw== X-Gm-Message-State: APjAAAU+N6NQb+83Gbu9NRYR/ZSL/1N1rneECHnRoY30f0IaYbzo8hvI Gmo9l69nI+0f+bJHFxifjhA= X-Received: by 2002:a2e:970a:: with SMTP id r10mr36166349lji.142.1574965576587; Thu, 28 Nov 2019 10:26:16 -0800 (PST) Received: from xi.terra (c-14b8e655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.184.20]) by smtp.gmail.com with ESMTPSA id t6sm8980610lfb.74.2019.11.28.10.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 10:26:15 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.92.3) (envelope-from ) id 1iaOUa-0005jd-6G; Thu, 28 Nov 2019 19:26:16 +0100 From: Johan Hovold To: Wolfgang Grandegger , Marc Kleine-Budde Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable , Jakob Unterwurzacher , Martin Elshuber , Philipp Tomsich Subject: [PATCH] can: ucan: fix non-atomic allocation in completion handler Date: Thu, 28 Nov 2019 19:26:03 +0100 Message-Id: <20191128182603.22004-1-johan@kernel.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL. Fixes: 9f2d3eae88d2 ("can: ucan: add driver for Theobroma Systems UCAN devices") Cc: stable # 4.19 Cc: Jakob Unterwurzacher Cc: Martin Elshuber Cc: Philipp Tomsich Signed-off-by: Johan Hovold --- drivers/net/can/usb/ucan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c index 04aac3bb54ef..81e942f713e6 100644 --- a/drivers/net/can/usb/ucan.c +++ b/drivers/net/can/usb/ucan.c @@ -792,7 +792,7 @@ static void ucan_read_bulk_callback(struct urb *urb) up); usb_anchor_urb(urb, &up->rx_urbs); - ret = usb_submit_urb(urb, GFP_KERNEL); + ret = usb_submit_urb(urb, GFP_ATOMIC); if (ret < 0) { netdev_err(up->netdev, -- 2.24.0