Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>,
	Li zeming <zeming@nfschina.com>,
	James.Bottomley@hansenpartnership.com
Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] parisc: Increase the usage check of kmalloc allocated object a
Date: Thu, 15 Sep 2022 07:44:38 +0200	[thread overview]
Message-ID: <86318454-d5cd-3787-a88f-41be40967c4d@gmx.de> (raw)
In-Reply-To: <7266457.TOmriZnqnj@eto.sf-tec.de>

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

      reply	other threads:[~2022-09-15  5:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  6:04 [PATCH] parisc: Increase the usage check of kmalloc allocated object a Li zeming
2022-09-14  6:18 ` Helge Deller
2022-09-14  6:43   ` Rolf Eike Beer
2022-09-14  9:04     ` Helge Deller
2022-09-14 14:25       ` Rolf Eike Beer
2022-09-15  5:44         ` Helge Deller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86318454-d5cd-3787-a88f-41be40967c4d@gmx.de \
    --to=deller@gmx.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=zeming@nfschina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox