drm/i915: Fix use of uninitialized var in 40a5f0de
authorFlorian Mickler <florian@mickler.org>
Mon, 6 Apr 2009 20:55:41 +0000 (22:55 +0200)
committerEric Anholt <eric@anholt.net>
Wed, 8 Apr 2009 17:18:19 +0000 (10:18 -0700)
i915_gem_put_relocs_to_user returned an uninitialized value which
got returned to userspace. This caused libdrm in my setup to never
get out of a do{}while() loop retrying i915_gem_execbuffer.

result was hanging X, overheating of cpu and 2-3gb of logfile-spam.

This patch adresses the issue by
 1. initializing vars in this file where necessary
 2. correcting wrongly interpreted return values of copy_[from/to]_user

Signed-off-by: Florian Mickler <florian@mickler.org>
[anholt: cleanups of unnecessary changes, consistency in APIs]
Signed-off-by: Eric Anholt <eric@anholt.net>

No differences found