On 12/14/2011 04:57 AM, Daniel Vetter wrote: > From: Eugeni Dodonov <eugeni.dodonov at intel.com> > > This prevents an in-kernel division by zero which happens when we are > asking for i915_chipset_val too quickly, or within a race condition > between the power monitoring thread and userspace accesses via debugfs. > > The issue can be reproduced easily via the following command: > while ``; do cat /sys/kernel/debug/dri/0/i915_emon_status; done > > This is particularly dangerous because it can be triggered by > a non-privileged user by just reading the debugfs entry. > > This issue was also found independently by Konstantin Belousov > <kostikbel at gmail.com>, who proposed a similar patch. > > Reported-by: Konstantin Belousov <kostikbel at gmail.com> > Acked-by: Jesse Barnes <jbarnes at virtuousgeek.org> > Acked-by: Keith Packard <keithp at keithp.com> > Cc: <stable at vger.kernel.org> > Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com> > Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch> > --- > drivers/gpu/drm/i915/i915_dma.c | 10 ++++++++++ > drivers/gpu/drm/i915/i915_drv.h | 1 + > 2 files changed, 11 insertions(+), 0 deletions(-) This has been in drm-intel-fixes since December 8th.