diff options
| author | 2021-10-15 00:03:45 -0500 | |
|---|---|---|
| committer | 2021-10-22 15:22:04 +1100 | |
| commit | 61cb9ac66b30374c7fd8a8b2a3c4f8f432c72e36 (patch) | |
| tree | 387e0edd1c52d89addbcf8bb580b476e3b4f1793 /include/linux/perf/git:/ssh:/git@git.zx2c4.com | |
| parent | powerpc/fsl_booke: Enable STRICT_KERNEL_RWX (diff) | |
| download | linux-dev-61cb9ac66b30374c7fd8a8b2a3c4f8f432c72e36.tar.xz linux-dev-61cb9ac66b30374c7fd8a8b2a3c4f8f432c72e36.zip | |
powerpc/vas: Fix potential NULL pointer dereference
(!ptr && !ptr->foo) strikes again. :)
The expression (!ptr && !ptr->foo) is bogus and in case ptr is NULL,
it leads to a NULL pointer dereference: ptr->foo.
Fix this by converting && to ||
This issue was detected with the help of Coccinelle, and audited and
fixed manually.
Fixes: 1a0d0d5ed5e3 ("powerpc/vas: Add platform specific user window operations")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211015050345.GA1161918@embeddedor
Diffstat (limited to 'include/linux/perf/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
