lkml.org 
[lkml]   [2022]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] parisc: Increase the usage check of kmalloc allocated object a
From
On 9/14/22 16:25, Rolf Eike Beer wrote:
> 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.

Ok, I see.
Not sure if that needs fixing. If the allocation fails we will be in trouble anyway :-)

Helge

\
 
 \ /
  Last update: 2022-09-15 07:46    [W:0.056 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site