From: Borislav Petkov <bp@alien8.de>
To: Sughosh Ganu <sughosh.ganu@arm.com>
Cc: linux-edac@vger.kernel.org
Subject: ghes_edac: Add a null pointer check in ghes_edac_unregister
Date: Mon, 30 Apr 2018 12:59:26 +0200 [thread overview]
Message-ID: <20180430105926.GH6509@pd.tnic> (raw)
On Thu, Apr 26, 2018 at 03:46:49PM +0530, Sughosh Ganu wrote:
> Add a null check for ghes_pvt, before dereferencing it. The pointer
> could still be null in case the return path is taken before
> initialising ghes_pvt in the registration function.
>
> ghes_edac_register function can return a 0 without initialising
> ghes_pvt -- this is not taken as an error in ghes_probe. A subsequent
> call to ghes_edac_unregister would result in ghes_pvt getting
> dereferenced, resulting in a panic.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
> ---
>
> drivers/edac/ghes_edac.c | 3 +++
> 1 file changed, 3 insertions(+)
Applied, thanks.
So yeah, the registration of ghes_edac thing is kinda causing us
headaches so I redid the reg path a bit. Mind running this branch on
your setup to make sure it works as expected?
https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=edac
Thx.
next reply other threads:[~2018-04-30 10:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 10:59 Borislav Petkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-02 11:55 ghes_edac: Add a null pointer check in ghes_edac_unregister Borislav Petkov
2018-05-02 11:21 Sughosh Ganu
2018-04-30 12:30 Sughosh Ganu
2018-04-26 10:16 Sughosh Ganu
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=20180430105926.GH6509@pd.tnic \
--to=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=sughosh.ganu@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.