From: Jiri Slaby <jslaby@suse.cz>
To: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: compositing broken in -next (idr bug)
Date: Tue, 12 Feb 2013 23:03:30 +0100 [thread overview]
Message-ID: <511ABC32.3050706@suse.cz> (raw)
In-Reply-To: <511ABA59.9050604@suse.cz>
On 02/12/2013 10:55 PM, Jiri Slaby wrote:
> --- 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;
Oh my, maybe: return ret < 0 ? ret : 0... Let's try.
--
js
suse labs
next prev parent reply other threads:[~2013-02-12 22:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 21:55 Jiri Slaby
2013-02-12 21:58 ` Tejun Heo
2013-02-12 21:59 ` Jiri Slaby
2013-02-12 22:03 ` Jiri Slaby [this message]
2013-02-12 22:08 ` Jiri Slaby
2013-02-12 22:13 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=511ABC32.3050706@suse.cz \
--to=jslaby@suse.cz \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®