Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon Set "enabled" value on...
details: https://anonhg.NetBSD.org/src/rev/dc31c2e5abf7
branches: trunk
changeset: 458932:dc31c2e5abf7
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sat Aug 17 16:02:55 2019 +0000
description:
Set "enabled" value only when hpd.hpd is not RADEON_HPD_NONE(== 0xff) to
avoid 1 << 255. Found by kUBSan.
diffstat:
sys/external/bsd/drm2/dist/drm/radeon/radeon_r600.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r ca862135feab -r dc31c2e5abf7 sys/external/bsd/drm2/dist/drm/radeon/radeon_r600.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600.c Sat Aug 17 15:50:05 2019 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600.c Sat Aug 17 16:02:55 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeon_r600.c,v 1.2 2019/08/17 15:50:05 msaitoh Exp $ */
+/* $NetBSD: radeon_r600.c,v 1.3 2019/08/17 16:02:55 msaitoh Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
* Jerome Glisse
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_r600.c,v 1.2 2019/08/17 15:50:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_r600.c,v 1.3 2019/08/17 16:02:55 msaitoh Exp $");
#include <linux/bitops.h>
#include <linux/slab.h>
@@ -1008,7 +1008,8 @@
break;
}
}
- enable |= 1 << radeon_connector->hpd.hpd;
+ if (radeon_connector->hpd.hpd != RADEON_HPD_NONE)
+ enable |= 1 << radeon_connector->hpd.hpd;
radeon_hpd_set_polarity(rdev, radeon_connector->hpd.hpd);
}
radeon_irq_kms_enable_hpd(rdev, enable);
Home |
Main Index |
Thread Index |
Old Index