Re: [PATCH 2/2] staging/rtl8192e: userspace ptr deref + incorrect declarations

From: Dominique van den Broeck
Date: Sun Apr 27 2014 - 14:05:29 EST


Hello,
Thanks for your comments and reviewing.

> I guess it would be better to have defines for those instead of
> hard-coding the offsets. Also the size of the info_buf array
> might change depending on the size of wrqu->data.pointer, right?
> Maybe create a new define for that as well?
> Let's just be safe and create new defines to prevent headaches in
> the future, if not for futher expansion then for the sake of
> legibility.

As regards those hardcoded indexes, I totally agree.

Still, for this particular patch only, I tried to stick to what
was signaled by sparse. I kept the rest as it was. "info_buf",
directly pointing userspace, and its index numbers are declared
this way by the original code...

I remain totally willing to make it better. :-)

Cheers.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/