* [PATCH] drm missing memset can crash X server...
@ 2005-03-08 23:58 Dave Airlie
2005-03-09 6:58 ` Chris Wright
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2005-03-08 23:58 UTC (permalink / raw)
To: greg, chrisw; +Cc: Andrew Morton, linux-kernel
Egbert Eich reported a bug 2673 on bugs.freedesktop.org and tracked it
down to a missing memset in the setversion ioctl, this causes X server
crashes so I would like to see the fix in a 2.6.11.x tree if possible..
Regards,
Dave.
--
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
Linux kernel - DRI, VAX / pam_smb / ILUG
diff -Nru a/drivers/char/drm/drm_ioctl.c b/drivers/char/drm/drm_ioctl.c
--- a/drivers/char/drm/drm_ioctl.c 2005-03-09 10:53:42 +11:00
+++ b/drivers/char/drm/drm_ioctl.c 2005-03-09 10:53:43 +11:00
@@ -326,6 +326,8 @@
DRM_COPY_FROM_USER_IOCTL(sv, argp, sizeof(sv));
+ memset(&version, 0, sizeof(version));
+
dev->driver->version(&version);
retv.drm_di_major = DRM_IF_MAJOR;
retv.drm_di_minor = DRM_IF_MINOR;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm missing memset can crash X server...
2005-03-08 23:58 [PATCH] drm missing memset can crash X server Dave Airlie
@ 2005-03-09 6:58 ` Chris Wright
2005-03-09 22:17 ` Dave Airlie
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wright @ 2005-03-09 6:58 UTC (permalink / raw)
To: Dave Airlie; +Cc: greg, chrisw, Andrew Morton, linux-kernel
* Dave Airlie (airlied@linux.ie) wrote:
>
> Egbert Eich reported a bug 2673 on bugs.freedesktop.org and tracked it
> down to a missing memset in the setversion ioctl, this causes X server
> crashes so I would like to see the fix in a 2.6.11.x tree if possible..
Could you please add Signed-off-by? Do I read this patch correctly that
it effectively disables the DRM_COPY in ->version callbacks?
thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm missing memset can crash X server...
2005-03-09 6:58 ` Chris Wright
@ 2005-03-09 22:17 ` Dave Airlie
0 siblings, 0 replies; 5+ messages in thread
From: Dave Airlie @ 2005-03-09 22:17 UTC (permalink / raw)
To: Chris Wright; +Cc: greg, Andrew Morton, linux-kernel
>
> Could you please add Signed-off-by? Do I read this patch correctly that
> it effectively disables the DRM_COPY in ->version callbacks?
I'll resend the patch now .. no it just zeros out the structure on the
stack so that the version callback doesn't get a garbage structure to copy
into...
Dave.
--
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
Linux kernel - DRI, VAX / pam_smb / ILUG
^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch] drm missing memset can crash X server..
@ 2005-03-09 22:20 Dave Airlie
2005-03-09 22:31 ` Chris Wright
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2005-03-09 22:20 UTC (permalink / raw)
To: stable; +Cc: linux-kernel
Egbert Eich reported a bug 2673 on bugs.freedesktop.org and tracked it
down to a missing memset in the setversion ioctl, this causes X server
crashes...
From: Egbert Eich <eich@pdx.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
diff -Nru a/drivers/char/drm/drm_ioctl.c b/drivers/char/drm/drm_ioctl.c
--- a/drivers/char/drm/drm_ioctl.c 2005-03-09 10:53:42 +11:00
+++ b/drivers/char/drm/drm_ioctl.c 2005-03-09 10:53:43 +11:00
@@ -326,6 +326,8 @@
DRM_COPY_FROM_USER_IOCTL(sv, argp, sizeof(sv));
+ memset(&version, 0, sizeof(version));
+
dev->driver->version(&version);
retv.drm_di_major = DRM_IF_MAJOR;
retv.drm_di_minor = DRM_IF_MINOR;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-10 5:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-08 23:58 [PATCH] drm missing memset can crash X server Dave Airlie
2005-03-09 6:58 ` Chris Wright
2005-03-09 22:17 ` Dave Airlie
-- strict thread matches above, loose matches on Subject: below --
2005-03-09 22:20 [patch] " Dave Airlie
2005-03-09 22:31 ` Chris Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox