Re: [PATCH v5 01/11] sound: Fix snd_pcm_readv()/writev() to use iov access functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 21 Sep 2023 00:22:21 +0200,
David Howells wrote:
> 
> Fix snd_pcm_readv()/writev() to use iov access functions rather than poking
> at the iov_iter internals directly.
> 
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> cc: Jaroslav Kysela <perex@xxxxxxxx>
> cc: Takashi Iwai <tiwai@xxxxxxxx>
> cc: Oswald Buddenhagen <oswald.buddenhagen@xxxxxx>
> cc: Jens Axboe <axboe@xxxxxxxxx>
> cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> cc: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> cc: alsa-devel@xxxxxxxxxxxxxxxx

Reviewed-by: Takashi Iwai <tiwai@xxxxxxx>

Would you apply it through your tree, or shall I apply this one via
sound git tree?


thanks,

Takashi

> ---
>  sound/core/pcm_native.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index bd9ddf412b46..9a69236fa207 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -3527,7 +3527,7 @@ static ssize_t snd_pcm_readv(struct kiocb *iocb, struct iov_iter *to)
>  	if (runtime->state == SNDRV_PCM_STATE_OPEN ||
>  	    runtime->state == SNDRV_PCM_STATE_DISCONNECTED)
>  		return -EBADFD;
> -	if (!to->user_backed)
> +	if (!user_backed_iter(to))
>  		return -EINVAL;
>  	if (to->nr_segs > 1024 || to->nr_segs != runtime->channels)
>  		return -EINVAL;
> @@ -3567,7 +3567,7 @@ static ssize_t snd_pcm_writev(struct kiocb *iocb, struct iov_iter *from)
>  	if (runtime->state == SNDRV_PCM_STATE_OPEN ||
>  	    runtime->state == SNDRV_PCM_STATE_DISCONNECTED)
>  		return -EBADFD;
> -	if (!from->user_backed)
> +	if (!user_backed_iter(from))
>  		return -EINVAL;
>  	if (from->nr_segs > 128 || from->nr_segs != runtime->channels ||
>  	    !frame_aligned(runtime, iov->iov_len))
> 



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux