lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1471804022-3486-1-git-send-email-xypron.glpk@gmx.de>
Date:   Sun, 21 Aug 2016 20:27:02 +0200
From:   Heinrich Schuchardt <xypron.glpk@....de>
To:     Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>
Cc:     David Airlie <airlied@...ux.ie>, Rex Zhu <Rex.Zhu@....com>,
        Eric Huang <JinHuiEric.Huang@....com>,
        Jammy Zhou <Jammy.Zhou@....com>,
        Eric Yang <eric.yang2@....com>,
        Vitaly Prosyak <vitaly.prosyak@....com>,
        Nils Wallménius <nils.wallmenius@...il.com>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Heinrich Schuchardt <xypron.glpk@....de>
Subject: [PATCH 1/1] drm/amd/powerplay: avoid NULL dereference, cz_hwmgr.c

if (a == NULL || a->b == NULL)
leads to a NULL pointer dereference if a == NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@....de>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
index 8cc0df9..5e2d4cf 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
@@ -1246,7 +1246,7 @@ static int cz_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
 
 static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
 {
-	if (hwmgr != NULL || hwmgr->backend != NULL) {
+	if (hwmgr != NULL && hwmgr->backend != NULL) {
 		kfree(hwmgr->backend);
 		kfree(hwmgr);
 	}
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ