Re: [PATCH] mpt3sas_ctl: fix double-fetch bug in _ctl_ioctl_main()

2019-05-29 Thread Martin K. Petersen
Gen, > In _ctl_ioctl_main(), 'ioctl_header' is fetched the first time from > userspace. 'ioctl_header.ioc_number' is then checked. The legal result > is saved to 'ioc'. Then, in condition MPT3COMMAND, the whole struct is > fetched again from the userspace. Then _ctl_do_mpt_command() is called,

[PATCH] mpt3sas_ctl: fix double-fetch bug in _ctl_ioctl_main()

2019-05-29 Thread Gen Zhang
In _ctl_ioctl_main(), 'ioctl_header' is fetched the first time from userspace. 'ioctl_header.ioc_number' is then checked. The legal result is saved to 'ioc'. Then, in condition MPT3COMMAND, the whole struct is fetched again from the userspace. Then _ctl_do_mpt_command() is called, 'ioc' and 'karg

Re: [PATCH] mpt3sas_ctl: fix double-fetch bug in _ctl_ioctl_main()

2019-05-28 Thread Gen Zhang
On Tue, May 28, 2019 at 11:44:35AM +0530, Suganath Prabu Subramani wrote: > Please consider this patch as Ack-by: Suganath Prabu S > > > Thanks, > Suganath. > > > On Mon, May 27, 2019 at 6:27 AM Gen Zhang wrote: > > > > In _ctl_ioctl_main(), 'ioctl_header' is fetched the first time from > > us

Re: [PATCH] mpt3sas_ctl: fix double-fetch bug in _ctl_ioctl_main()

2019-05-27 Thread Suganath Prabu Subramani
Please consider this patch as Ack-by: Suganath Prabu S Thanks, Suganath. On Mon, May 27, 2019 at 6:27 AM Gen Zhang wrote: > > In _ctl_ioctl_main(), 'ioctl_header' is fetched the first time from > userspace. 'ioctl_header.ioc_number' is then checked. The legal result > is saved to 'ioc'. Then,

[PATCH] mpt3sas_ctl: fix double-fetch bug in _ctl_ioctl_main()

2019-05-26 Thread Gen Zhang
In _ctl_ioctl_main(), 'ioctl_header' is fetched the first time from userspace. 'ioctl_header.ioc_number' is then checked. The legal result is saved to 'ioc'. Then, in condition MPT3COMMAND, the whole struct is fetched again from the userspace. Then _ctl_do_mpt_command() is called, 'ioc' and 'karg