[PATCH RFC] staging: comedi: fix user/kernel space access of cmd->chanlist
H Hartley Sweeten
hartleys at visionengravers.com
Tue Sep 18 15:50:13 UTC 2012
On Tuesday, September 18, 2012 3:07 AM, Dan Carpenter wrote:
> On Mon, Sep 17, 2012 at 05:17:02PM -0700, H Hartley Sweeten wrote:
>> diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
>> index 8ea55ae..f986370 100644
>> --- a/drivers/staging/comedi/comedi.h
>> +++ b/drivers/staging/comedi/comedi.h
>> @@ -365,7 +365,10 @@
>> unsigned int stop_src;
>> unsigned int stop_arg;
>>
>> - unsigned int __user *chanlist; /* channel/range list */
>> + union {
>> + unsigned int __user *user_data;
>> + unsigned int *kernel_data;
>> + } chanlist; /* channel/range list */
>> unsigned int chanlist_len;
>>
>> short __user *data; /* data list, size depends on subd flags */
>
> Everything in this file is indented one step too far so git diff
> doesn't know which struct is being modified. It should say:
I have been meaning to fix that. I'll post a cleanup patch shortly.
Regards,
Hartley
More information about the devel
mailing list