From patchwork Tue Jun 19 22:00:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 10475581 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EFA04601D7 for ; Tue, 19 Jun 2018 22:00:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE65028CE0 for ; Tue, 19 Jun 2018 22:00:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA41328CFB; Tue, 19 Jun 2018 22:00:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D81728DB4 for ; Tue, 19 Jun 2018 22:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755531AbeFSWAa (ORCPT ); Tue, 19 Jun 2018 18:00:30 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58428 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964933AbeFSWAY (ORCPT ); Tue, 19 Jun 2018 18:00:24 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1fVOfn-0004Ra-4h; Wed, 20 Jun 2018 00:00:23 +0200 From: Sebastian Andrzej Siewior To: linux-input@vger.kernel.org Cc: tglx@linutronix.de, Sebastian Andrzej Siewior , Dmitry Torokhov Subject: [PATCH] input: iforce: use GFP_KERNEL in iforce_get_id_packet() Date: Wed, 20 Jun 2018 00:00:17 +0200 Message-Id: <20180619220017.13859-1-bigeasy@linutronix.de> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP iforce_get_id_packet() invokes wait_event_interruptible_timeout() which means it has to be in !atomic context at that point. In !atomic context it could use GFP_KERNEL instead of GFP_ATOMIC. Make usb_submit_urb() use GFP_KERNEL. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/input/joystick/iforce/iforce-packets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 08f98f2eaf88..fedaaea5c16d 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -255,7 +255,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) iforce->cr.bRequest = packet[0]; iforce->ctrl->dev = iforce->usbdev; - status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); + status = usb_submit_urb(iforce->ctrl, GFP_KERNEL); if (status) { dev_err(&iforce->intf->dev, "usb_submit_urb failed %d\n", status);