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/edf6837807a8
branches: trunk
changeset: 1002824:edf6837807a8
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 5d63020a8ea0 -r edf6837807a8 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