Messages in this thread | | | Subject | Re: [PATCH driver-core-linus] sysfs: make sure read buffer is zeroed | From | Joe Perches <> | Date | Mon, 19 May 2014 18:25:40 -0700 |
| |
On Mon, 2014-05-19 at 20:49 -0400, Tejun Heo wrote: > On Mon, May 19, 2014 at 03:32:22PM -0700, Joe Perches wrote: > > > > + memset(buf, 0, PAGE_SIZE); > > > > memset(buf, 0, count)? > > It's always PAGE_SIZE. Outputs longer than that are truncated.
Yeah, I know, but the code and comment above it don't match.
/* acquire buffer and ensure that it's >= PAGE_SIZE and clear */
| |