Re: [PATCH] parisc: Increase the usage check of kmalloc allocated object a

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, 14. September 2022, 11:04:33 CEST schrieb Helge Deller:
> On 9/14/22 08:43, Rolf Eike Beer wrote:
> > Am Mittwoch, 14. September 2022, 08:18:19 CEST schrieb Helge Deller:
> >> On 9/14/22 08:04, Li zeming wrote:

> Yes, your proposal is good.
> Anyone want to send a patch (with a small comment that kcalloc() will return
> at least the required 8-byte alignment)?

Done.

> > And these functions end up propagating an allocation error in this file
> > and it will never reach kernel/setup.c, which seems bad.
> 
> That part I don't understand.
> The return value of iosapic_alloc_irt() is checked afterwards, but you
> probably meant something else?
> 
> > But I guess the only point where this really can go wrong if the PDC
> > returns an absurdly large number of entries.

What I meant was that if iosapic_alloc_irt() fails, then iosapic_load_irt() 
will return 0, which can either be "nothing to do" or "error". iosapic_init() 
is void, so even if it could detect the failure, it can't report it upwards to 
parisc_init(). Which is the same for basically all other *_init() calls in 
there.

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux