[PATCH 3/4] drivers/misc: Add ASpeed LPC control driver
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Jan 13 03:07:33 AEDT 2017
On Thu, 2017-01-12 at 17:00 +0100, Greg KH wrote:
> > How so ? I mean, access_ok followed by __get/__put_user is still a
> > classic, what's wrong with it ?
>
> No "normal" driver should do that, just call copy_to/from_user and be
> done with it. That way all of the proper locking and validation checks
> like this are done correctly for you. Why would a driver ever call the
> "raw" __get/__put_user functions?
I supposed historically it was considered faster for some things :-)
Not a huge deal, and yes it's probably cleaner, I was just wondering
what was "racy" about access_ok() that I might have missed...
Cheers,
Ben.
More information about the openbmc
mailing list