All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Oliver O'Halloran <oohall@gmail.com>,
	linuxppc-dev@lists.ozlabs.org,
	Colin Ian King <colin.i.king@gmail.com>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] powerpc/powernv/sriov: perform null check on iov before dereferencing iov
Date: Mon, 03 Jul 2023 15:26:58 +1000	[thread overview]
Message-ID: <168836201891.50010.6948846603017935484.b4-ty@ellerman.id.au> (raw)
In-Reply-To: <20230608095849.1147969-1-colin.i.king@gmail.com>

On Thu, 08 Jun 2023 10:58:49 +0100, Colin Ian King wrote:
> Currently pointer iov is being dereferenced before the null check of iov
> which can lead to null pointer dereference errors. Fix this by moving the
> iov null check before the dereferencing.
> 
> Detected using cppcheck static analysis:
> linux/arch/powerpc/platforms/powernv/pci-sriov.c:597:12: warning: Either
> the condition '!iov' is redundant or there is possible null pointer
> dereference: iov. [nullPointerRedundantCheck]
>  num_vfs = iov->num_vfs;
>            ^
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/powernv/sriov: perform null check on iov before dereferencing iov
      https://git.kernel.org/powerpc/c/f4f913c980bc6abe0ccfe88fe3909c125afe4a2d

cheers

      reply	other threads:[~2023-07-03  5:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08  9:58 [PATCH][next] powerpc/powernv/sriov: perform null check on iov before dereferencing iov Colin Ian King
2023-07-03  5:26 ` Michael Ellerman [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=168836201891.50010.6948846603017935484.b4-ty@ellerman.id.au \
    --to=patch-notifications@ellerman.id.au \
    --cc=christophe.leroy@csgroup.eu \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=oohall@gmail.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.