From patchwork Thu Jul 26 15:01:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 142975 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp564316ljj; Thu, 26 Jul 2018 08:01:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcVjjiicHkJt7cYKF9Bskhv9ifPGaGhBzWNm07kjQHKI283bSd9iNl3XsNWo7gSO1X7dvaT X-Received: by 2002:a5d:6250:: with SMTP id m16-v6mr1937136wrv.179.1532617280814; Thu, 26 Jul 2018 08:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532617280; cv=none; d=google.com; s=arc-20160816; b=ENerN2LjBzaZUMroHEGqiSF6WnA6+rtzvlrpVzkSeRmjsjLpKjAdOYFgjY7NUENkMo WRGixW4H5HQE+SpE9S6YuxWsq/6M879GxAOHl8PKwimq74vIfb1hdZvw8KiyvRidiLel ConicaBloedkQWgw7i1HUibFmsm6c53ytTDiSnnZyN3qvBnLgY0h24PHlSb21tt8JMHx WwTnT0gGKWw7BtGdxvcRYhi55o0l7bgy092KymiXkWQKM26GEUEiOrtKGZHV9PHYyLco 9btdRZgh/0vaYa4tbcMPsXG/RJx8T5JoynuCY9hUp+6Nmy8N+1geNTrPzwwPZ7+XPQk3 2t0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=68du00PWNIoHNk+y+oymKpX1sPcBJaE3Xle/yNB6VXM=; b=HvXop3NVFvn95dxlUp5VrDBEWkC39ZWmj9PtDYAK1mHr8WSf3+KHbjGUeScjgQBgqo J1o6zEqCqgd5y1eae0Z9JtFsf4mfJXJYKsGqk+THB+Co5GOwz33SpLTvn46xzBMUDCwd eIS2WX2xA45RJ6GTUTPNUu+FmK6VyQ9UtoOHi/IT9eWLN/Nm0tOUSXmy0CYsapeJUrds Zs+pvShIo+mW6wvVPbMJp1VxbBo87GOxkOaVHfCPPvHiAlogu05oQGlpOFFf/Ob29+mv dVX7rqJJcyC9nnlfBJzvWbsLZxrvcXP6fJ9GQMRK7IwBHjphX/+SarYCinjSZGeOXyPN byAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="pXSf3/UN"; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id w7-v6si1185040wru.330.2018.07.26.08.01.20; Thu, 26 Jul 2018 08:01:20 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="pXSf3/UN"; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 72CE526779B; Thu, 26 Jul 2018 17:01:15 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 378FB26779A; Thu, 26 Jul 2018 17:01:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 9191826779A for ; Thu, 26 Jul 2018 17:01:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=7HX8cccdw8AWsIhCz/2mboj0KVu+0TkO5HJvN29DoDA=; b=pXSf3/UN5HpC lDh0krCWksFpKzZykFS/9K99gmZWRK5D9OV0W1nbAEQ2U5n/E0Ap/pb4tSlBPMa9smIR1BQkTAbJu K3kWvk75KJB4/qR/RZJ8QSu5SvCuZYd3uZH2RiPm3Z7OEwtghMNA7rehQP0DiUyuoOEW7vcO4FWru yjK58=; Received: from host86-168-121-229.range86-168.btcentralplus.com ([86.168.121.229] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fihlP-0007gK-BO; Thu, 26 Jul 2018 15:01:11 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id D9942440078; Thu, 26 Jul 2018 16:01:10 +0100 (BST) From: Mark Brown To: Takashi Iwai In-Reply-To: <20180725204208.15230-1-tiwai@suse.de> Message-Id: <20180726150110.D9942440078@finisterre.ee.mobilebroadband> Date: Thu, 26 Jul 2018 16:01:10 +0100 (BST) Cc: alsa-devel@alsa-project.org, Mark Brown , Lars-Peter Clausen Subject: [alsa-devel] Applied "ASoC: dmaengine: Fix missing __user prefix in copy_user callback" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: dmaengine: Fix missing __user prefix in copy_user callback has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 40d1299f87bf915931970c8e6ea3852acacd1889 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 25 Jul 2018 22:42:08 +0200 Subject: [PATCH] ASoC: dmaengine: Fix missing __user prefix in copy_user callback It seems that __user prefix was forgotten to be added to dmaengine_copy_user callback while we refactored the user-copy PCM core. This patch adds the missing prefix, remove the superfluous cast, and add the needed cast (__force is needed for downgrading from user pointer to kernel pointer), too. Spotted by a sparse warning like: sound/soc/soc-generic-dmaengine-pcm.c:397:27: warning: incorrect type in initializer (incompatible argument 4 (different address spaces)) Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown --- sound/soc/soc-generic-dmaengine-pcm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.18.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 13bdca6e41c5..120f7b39e256 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -334,7 +334,7 @@ static snd_pcm_uframes_t dmaengine_pcm_pointer( static int dmaengine_copy_user(struct snd_pcm_substream *substream, int channel, unsigned long hwoff, - void *buf, unsigned long bytes) + void __user *buf, unsigned long bytes) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_component *component = @@ -350,18 +350,17 @@ static int dmaengine_copy_user(struct snd_pcm_substream *substream, int ret; if (is_playback) - if (copy_from_user(dma_ptr, (void __user *)buf, bytes)) + if (copy_from_user(dma_ptr, buf, bytes)) return -EFAULT; if (process) { - ret = process(substream, channel, hwoff, - (void __user *)buf, bytes); + ret = process(substream, channel, hwoff, (__force void *)buf, bytes); if (ret < 0) return ret; } if (!is_playback) - if (copy_to_user((void __user *)buf, dma_ptr, bytes)) + if (copy_to_user(buf, dma_ptr, bytes)) return -EFAULT; return 0;