All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: control: Fix missing __user annotation
@ 2018-04-23 13:29 Takashi Iwai
  2018-04-23 13:34 ` Takashi Sakamoto
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2018-04-23 13:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Sakamoto

There is one place missing __user annotation to the pointer used by
the recent code refactoring.  Reported by sparse.

Fixes: 450296f305f1 ("ALSA: control: code refactoring TLV ioctl handler")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/control.c b/sound/core/control.c
index 69734b0eafd0..9aa15bfc7936 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1492,7 +1492,7 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file,
                              int op_flag)
 {
 	struct snd_ctl_tlv header;
-	unsigned int *container;
+	unsigned int __user *container;
 	unsigned int container_size;
 	struct snd_kcontrol *kctl;
 	struct snd_ctl_elem_id id;
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: control: Fix missing __user annotation
  2018-04-23 13:29 [PATCH] ALSA: control: Fix missing __user annotation Takashi Iwai
@ 2018-04-23 13:34 ` Takashi Sakamoto
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Sakamoto @ 2018-04-23 13:34 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel

On Apr 23 2018 22:29, Takashi Iwai wrote:
> There is one place missing __user annotation to the pointer used by
> the recent code refactoring.  Reported by sparse.
> 
> Fixes: 450296f305f1 ("ALSA: control: code refactoring TLV ioctl handler")
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>   sound/core/control.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/core/control.c b/sound/core/control.c
> index 69734b0eafd0..9aa15bfc7936 100644
> --- a/sound/core/control.c
> +++ b/sound/core/control.c
> @@ -1492,7 +1492,7 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file,
>                                int op_flag)
>   {
>   	struct snd_ctl_tlv header;
> -	unsigned int *container;
> +	unsigned int __user *container;
>   	unsigned int container_size;
>   	struct snd_kcontrol *kctl;
>   	struct snd_ctl_elem_id id;

Indeed. I missed it when posting this change...

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>


Thanks

Takashi Sakamoto

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-23 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 13:29 [PATCH] ALSA: control: Fix missing __user annotation Takashi Iwai
2018-04-23 13:34 ` Takashi Sakamoto

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.