lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Feb 2013 22:55:37 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	Tejun Heo <tj@...nel.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	David Airlie <airlied@...ux.ie>,
	dri-devel@...ts.freedesktop.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: compositing broken in -next (idr bug)

Hi,

this commit in -next causes my KDE to get stuck while starting. I see
only the splash screen. If I disable effects by alt-shift-f12, it continues.

I bisected it to this commit:
commit 430440fce7da4ad52c2af06a04a5132e5d19faaf
Author: Tejun Heo <tj@...nel.org>
Date:   Thu Feb 7 12:31:37 2013 +1100

    drm: convert to idr_alloc()


More concretely to the change in drm_gem_flink_ioctl. If I revert solely
that one, it works again. Maybe I'm blind, but I do not see why...

Well I see a bug in there, but that is not the root cause -- there is a
missing call to idr_preload_end. Of course, that one only leaves
preemption disabled forever.

What I tried with no effect is this:
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -453,7 +453,8 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
        spin_lock(&dev->object_name_lock);
        if (!obj->name) {
                ret = idr_alloc(&dev->object_name_idr, obj, 1, 0,
GFP_NOWAIT);
-               obj->name = ret;
+               if (ret >= 0)
+                       obj->name = ret;
                args->name = (uint64_t) obj->name;
                spin_unlock(&dev->object_name_lock);

@@ -469,6 +470,7 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
        }

 err:
+       idr_preload_end();
        drm_gem_object_unreference_unlocked(obj);
        return ret;
 }

thanks,
-- 
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ