On Thu, Sep 17, 2020 at 12:08:10PM +0300, Leon Romanovsky wrote: > On Thu, Sep 17, 2020 at 05:10:08PM +0800, Liu Shixin wrote: > > sizeof() when applied to a pointer typed expression should give the > > size of the pointed data, even if the data is a pointer. > > > > Signed-off-by: Liu Shixin <liushixin2@xxxxxxxxxx> Needs a fixes line > > if (!cnts->names) > > return -ENOMEM; > > > > cnts->offsets = kcalloc(num_counters, > > - sizeof(cnts->offsets), GFP_KERNEL); > > + sizeof(*cnts->offsets), GFP_KERNEL); > > This is not. Why not? Jason