xf86-video-savage: Fix crash by null pointer access on XVideo when DRI is not available

Alex Villací­s Lasso a_villacis at palosanto.com
Mon Mar 16 11:38:50 PDT 2009


The Linux kernel version 2.6.29-rc7 introduced a regression that makes a 
mmap2() call on /dev/dri/card0 fail with EAGAIN on Savage chipsets 
(don't know about other chipsets yet). I have not yet bisected it or 
filed a bug for it (since I want to check 2.6.29-rc8 for this bug), but 
this in turn uncovered a bug in my recent changes to the savage driver. 
When DRI is not available, an attempt to query available memory for 
xvideo via AGP (which requires DRI) results in a NULL pointer access to 
psav->DRIServerInfo, even if xvideo is configured not to use AGP. This 
patch fixes it by adding a NULL pointer check that allows it to use the 
previously-available framebuffer upload for xvideo while I hunt down 
this bug.


Changelog:
* Add NULL pointer check before trying to access DRIServerInfo, since it 
might be NULL when DRI fails to initialize.

-- 
perl -e '$x=2.3;printf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Fix-crash-by-null-pointer-access-when-DRI-is-not-ava.patch
URL: <http://lists.x.org/archives/xorg/attachments/20090316/a71caad2/attachment.ksh>


More information about the xorg mailing list