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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Dec 2009 12:24:51 +1100
From:	Darren Jenkins <>
To:	David Airlie <>,
	dri-devel mailing list <>,
	Kernel Janitors <>
Cc:	Linux Kernel Mailing List <>
Subject: [PATCH] drm/radeon/r100.c: check for invalid family

If there is an invalid family the fw_name is NULL and causes an
NULL pointer dereference.
This just adds a check for something unexpected.

Coverity CID: 13251

Signed-off-by: Darren Jenkins <>

diff --git drivers/gpu/drm/radeon/r100.c drivers/gpu/drm/radeon/r100.c
index 7172746..e4b9770 100644
--- drivers/gpu/drm/radeon/r100.c
+++ drivers/gpu/drm/radeon/r100.c
@@ -584,6 +584,8 @@ static int r100_cp_init_microcode(struct radeon_device *rdev)
 		   (rdev->family == CHIP_RV570)) {
 		DRM_INFO("Loading R500 Microcode\n");
 		fw_name = FIRMWARE_R520;
+	} else {
+		return -EINVAL;
 	err = request_firmware(&rdev->me_fw, fw_name, &pdev->dev);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists