lkml.org 
[lkml]   [2020]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] hpet: Fix struct_size() in kzalloc()
Date
...
> > > - hpetp = kzalloc(struct_size(hpetp, hp_dev, hdp->hd_nirqs - 1),
> > > + hpetp = kzalloc(struct_size(hpetp, hp_dev, hdp->hd_nirqs),
> > > GFP_KERNEL);
> > >
> > > if (!hpetp)
> > > --
> >
> > Yep, "char: hpet: Use flexible-array member" started causing random boot
> > failures on mainline for me. Tetsuo beat me to sending the fix.
> >
> > Only thing I'll add is that GFP_KERNEL can now fit on the previous line.
>
> Gustavo already sent a fix for this, I didn't realize it was causing
> boot problems, I'll forward it on to Linus soon.

grep -r --include '*.c' 'struct_size.*- 1'
gives 4 other matches.
I bet they all have the same bug.
There might be others that simple pattern doesn't find.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

\
 
 \ /
  Last update: 2020-01-30 11:11    [W:0.061 / U:2.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site