lkml.org 
[lkml]   [2022]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] [next] dlm: replace one-element array with fixed size array
On Tue, Oct 11, 2022 at 01:06:32PM -0700, Kees Cook wrote:
> On Wed, Oct 12, 2022 at 09:04:15AM +1300, Paulo Miguel Almeida wrote:
> > error = -ENOMEM;
> >
> > - ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_NOFS);
> > + ls = kzalloc(sizeof(struct dlm_ls), GFP_NOFS);
> ^^^^^^^^^^^^^^^^^^^^
> I think you forgot the suggestion Gustavo had here. :) Preferred style would
> be:
> sizeof(*ls)
>
Ooops, I hadn't seen that one =O

Alright, v5 in the making

Paulo A.

\
 
 \ /
  Last update: 2022-10-11 22:12    [W:0.073 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site