From patchwork Wed Jun 20 11:00:52 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: 10477007 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 B22F560230 for ; Wed, 20 Jun 2018 11:02:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A274E28AD7 for ; Wed, 20 Jun 2018 11:02:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96DD328B99; Wed, 20 Jun 2018 11:02:35 +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 3BEE428AD7 for ; Wed, 20 Jun 2018 11:02:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754131AbeFTLCd (ORCPT ); Wed, 20 Jun 2018 07:02:33 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:59914 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754144AbeFTLBg (ORCPT ); Wed, 20 Jun 2018 07:01:36 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1fVark-0003m6-EC; Wed, 20 Jun 2018 13:01:32 +0200 From: Sebastian Andrzej Siewior To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , linux-usb@vger.kernel.org, tglx@linutronix.de, Sebastian Andrzej Siewior , Hans Verkuil Subject: [PATCH 14/27] media: gspca: sq930x: use GFP_KERNEL in sd_dq_callback() Date: Wed, 20 Jun 2018 13:00:52 +0200 Message-Id: <20180620110105.19955-15-bigeasy@linutronix.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620110105.19955-1-bigeasy@linutronix.de> References: <20180620110105.19955-1-bigeasy@linutronix.de> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The context in which sd_dq_callback() is non atomic, there is even msleep() at the end of the function. There is no need to use GFP_ATOMIC here - use GFP_KERNEL instead. Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Sebastian Andrzej Siewior --- drivers/media/usb/gspca/sq930x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/gspca/sq930x.c b/drivers/media/usb/gspca/sq930x.c index d7cbcf2b3947..e15b45f022e1 100644 --- a/drivers/media/usb/gspca/sq930x.c +++ b/drivers/media/usb/gspca/sq930x.c @@ -1044,7 +1044,7 @@ static void sd_dq_callback(struct gspca_dev *gspca_dev) v4l2_ctrl_g_ctrl(sd->gain)); gspca_dev->cam.bulk_nurbs = 1; - ret = usb_submit_urb(gspca_dev->urb[0], GFP_ATOMIC); + ret = usb_submit_urb(gspca_dev->urb[0], GFP_KERNEL); if (ret < 0) pr_err("sd_dq_callback() err %d\n", ret);