All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: ALSA development <alsa-devel@alsa-project.org>,
	Baolin Wang <baolin.wang@linaro.org>,
	Phil Burk <philburk@google.com>, Zach Riggle <riggle@google.com>,
	Mark Brown <broonie@kernel.org>, Leo Yan <leo.yan@linaro.org>
Subject: Re: [PATCH 2/2] ALSA: pcm: implement the mmap buffer mode for the anonymous dup
Date: Mon, 04 Feb 2019 11:48:21 +0100	[thread overview]
Message-ID: <s5hd0o7rfre.wl-tiwai@suse.de> (raw)
In-Reply-To: <20190204093910.23878-3-perex@perex.cz>

On Mon, 04 Feb 2019 10:39:10 +0100,
Jaroslav Kysela wrote:
> 
> @@ -3295,6 +3311,9 @@ static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file
>  			       struct vm_area_struct *area)
>  {
>  	long size;
> +	struct snd_pcm_file *pcm_file = file->private_data;
> +	if (pcm_file->perm != SNDRV_PCM_PERM_MODE_FULL)
> +		return -EPERM;

This check can be better put to pcm_status_mmap_allowed().

> @@ -3331,6 +3350,9 @@ static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file
>  				struct vm_area_struct *area)
>  {
>  	long size;
> +	struct snd_pcm_file *pcm_file = file->private_data;
> +	if (pcm_file->perm != SNDRV_PCM_PERM_MODE_FULL)
> +		return -EPERM;

Ditto, put to pcm_control_mmap_allowed().

Other than that, looks good to me:
  Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

  reply	other threads:[~2019-02-04 10:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04  9:39 [PATCH 0/2 v4] ALSA: pcm: anonymous dup implementation Jaroslav Kysela
2019-02-04  9:39 ` [PATCH 1/2] ALSA: pcm: implement the anonymous dup (inode file descriptor) Jaroslav Kysela
2019-02-04  9:39 ` [PATCH 2/2] ALSA: pcm: implement the mmap buffer mode for the anonymous dup Jaroslav Kysela
2019-02-04 10:48   ` Takashi Iwai [this message]
2019-02-07 17:41 ` [PATCH 0/2 v4] ALSA: pcm: anonymous dup implementation Phil Burk
2019-02-07 17:53   ` Jaroslav Kysela
2019-02-08 15:57     ` Phil Burk
2019-03-26 14:09 ` Mark Brown
2019-03-26 14:13   ` Takashi Iwai
2019-03-26 14:27     ` Phil Burk
2019-03-26 14:41       ` Jaroslav Kysela
2019-04-23 18:08         ` Takashi Iwai
2019-04-23 20:11           ` Phil Burk
2019-04-23 20:25             ` Takashi Iwai
2020-06-08 13:45             ` Mark Brown
2020-06-08 17:49               ` Phil Burk
2020-06-10 23:10                 ` Phil Burk
2020-06-12 16:59                   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hd0o7rfre.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=baolin.wang@linaro.org \
    --cc=broonie@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=perex@perex.cz \
    --cc=philburk@google.com \
    --cc=riggle@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.