[lkml]   [2013]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] FS: Fixed buffer overflow issue in seq_read()
On Mon, Nov 18, 2013 at 07:13:54PM -0800, Linus Torvalds wrote:
> On Tue, 19 Nov 2013, Al Viro wrote:
> >
> > seq_file: always clear m->count when we free m->buf
> Ok, applied.
> What do you think about then just abstracing out that now common sequence
> of re-allocating a larger buffer, while clearing m->count?

Sure, no problem, but then we really have only 2 places doing that and no
visible cause to grow more of them. With this common sequence being that
short, I'm not sure that effort to recall the definition of that helper
won't be more than that to understand the open-coded variant. Matter of
taste, but IMO in this case the helper makes it slightly less readable...

BTW, I've several old commits that didn't go into the first pile (e.g.
taking read_seqbegin_or_lock() and friends from fs/dcache.c into
linux/seqlock.h, where they obviously belong, etc.) and several regression
fixes; are you OK with pull request tomorrow? I can post it tonight,
but I'd prefer to leave local toruture running overnight...

 \ /
  Last update: 2013-11-19 05:21    [W:0.035 / U:3.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site