Skip to contentSkip to conversation

ALSA: control: Fix missing __user annotation

PATCH In review Takashi Iwai 2 participants 2 messages Apr 23, 2018 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: control: Fix missing __user annotation

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")
---
 sound/core/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/control.c +1 -1
index 69734b0eafd0..9aa15bfc7936 100644
@@ -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;
Signature · 1 line
2.16.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Takashi Iwai

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")
---
  sound/core/control.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/control.c +0 -0
index 69734b0eafd0..9aa15bfc7936 100644

sound/core/control.c static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file, · line 1498

Quoted 8 lines
sound/core/control.c +1 -1
@@ -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...

Thanks

Takashi Sakamoto