Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1142588imm; Wed, 1 Aug 2018 10:53:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcf5EFbUPKykuu+RhuMUAesQw49/2pzX67PrtyhSgXIYLBYGxc70P84948eM7e6oKgIdwSa X-Received: by 2002:a65:4b87:: with SMTP id t7-v6mr25230841pgq.391.1533146033197; Wed, 01 Aug 2018 10:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533146033; cv=none; d=google.com; s=arc-20160816; b=t6QIPUFLuh22W5IXpQq8E+oqI47G9K+8YlFqO7vWUf8ftfAYgxbWyeKz+sbxCIzrBq FN/746Wjh5MsUdcbfPHEIoIHSZY0jkI3eYQ19MJZuxkRoRi2oO9yODy1KWadqaOABdgg bcZPD6MPwLiCnm4W0PH7eafXSXtuY6N7qZS55B/rbJ6Id/ASqeCCf3WyxckWWGDT79zx 1CN1p4DV3/XqESCPMgkA47Z3DCUmdHRDaM+Aa/Uq14I93wHCNq5zGjw+3pwsz2Re6lGh L2LofyK2dkicdAnsST6/a6JSXiYROj/ac9/9f29pbwLaIPoqqPerGPStij7EncFS+JxB D/3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ldPFh+q+9JGEh1FesnD8Bmk06FzZgx1jIyRJfeHAtn8=; b=aRLIT+5d/OhtSQJpIjzAOzEdIBa3I0LY5r+n0LmulW6/P8r1K3f3278drBFpFdPkOh rO2vThXh6iFv/FwZKipRZsPvv50NE+Tzq/EulDphRaC72ScYSfSMnsagJl7Z6ms8ze/J TReGZ6fCEmINlp1LTPL18ovl7dwC4OaIyL/SyqXxHJAfpFucqI4UuAyKZV6rr1XXVU1Q Wequ7amFy8rpdpYWUBbSrR2ok9EZQAKVML4qgyEfSKvszT4o8DiDKoAitKWA/uw7U6JP uUDL8fyh8ET8FweIEjJfVZihXFfx9Y5pqIi43lqiBYq04YbZWMa6qZSIoh6dZ5GjWl5g egwg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m32-v6si15683587pgl.622.2018.08.01.10.53.38; Wed, 01 Aug 2018 10:53:53 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390628AbeHATjH (ORCPT + 99 others); Wed, 1 Aug 2018 15:39:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49806 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406018AbeHATIl (ORCPT ); Wed, 1 Aug 2018 15:08:41 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 71EEE13C6; Wed, 1 Aug 2018 17:15:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ezequiel Garcia , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 080/246] media: tw686x: Fix incorrect vb2_mem_ops GFP flags Date: Wed, 1 Aug 2018 18:49:50 +0200 Message-Id: <20180801165015.551287921@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ezequiel Garcia [ Upstream commit 636757ab6c93e19e2f58d3b3af1312e34eaffbab ] When the driver is configured in the "memcpy" dma-mode, it uses vb2_vmalloc_memops, which is backed by a SLAB allocator and so shouldn't be using GFP_DMA32. Fix it. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/pci/tw686x/tw686x-video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/media/pci/tw686x/tw686x-video.c +++ b/drivers/media/pci/tw686x/tw686x-video.c @@ -1228,7 +1228,8 @@ int tw686x_video_init(struct tw686x_dev vc->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; vc->vidq.min_buffers_needed = 2; vc->vidq.lock = &vc->vb_mutex; - vc->vidq.gfp_flags = GFP_DMA32; + vc->vidq.gfp_flags = dev->dma_mode != TW686X_DMA_MODE_MEMCPY ? + GFP_DMA32 : 0; vc->vidq.dev = &dev->pci_dev->dev; err = vb2_queue_init(&vc->vidq);