Re: [PATCH] ALSA: control: fix a redundant-copy issue

2018-05-13 Thread Takashi Iwai
On Sat, 05 May 2018 20:38:03 +0200, Wenwen Wang wrote: > > In snd_ctl_elem_add_compat(), the fields of the struct 'data' need to be > copied from the corresponding fields of the struct 'data32' in userspace. > This is achieved by invoking copy_from_user() and get_user() functions. The > problem

Re: [PATCH] ALSA: control: fix a redundant-copy issue

2018-05-13 Thread Takashi Iwai
On Sat, 05 May 2018 20:38:03 +0200, Wenwen Wang wrote: > > In snd_ctl_elem_add_compat(), the fields of the struct 'data' need to be > copied from the corresponding fields of the struct 'data32' in userspace. > This is achieved by invoking copy_from_user() and get_user() functions. The > problem

[PATCH] ALSA: control: fix a redundant-copy issue

2018-05-05 Thread Wenwen Wang
In snd_ctl_elem_add_compat(), the fields of the struct 'data' need to be copied from the corresponding fields of the struct 'data32' in userspace. This is achieved by invoking copy_from_user() and get_user() functions. The problem here is that the 'type' field is copied twice. One is by

[PATCH] ALSA: control: fix a redundant-copy issue

2018-05-05 Thread Wenwen Wang
In snd_ctl_elem_add_compat(), the fields of the struct 'data' need to be copied from the corresponding fields of the struct 'data32' in userspace. This is achieved by invoking copy_from_user() and get_user() functions. The problem here is that the 'type' field is copied twice. One is by