drm/sysfs: Grab lock for edid/modes_show
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 2 Oct 2015 11:01:02 +0000 (13:01 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 24 Nov 2015 10:47:47 +0000 (11:47 +0100)
commita48a62bc9226e731e2284afb1c782869a413e1b2
treed56b382176f5423b552a711016430893abf76fe1
parentf980a71a2ba85ba5e60b72255df1ce6722932e0e
drm/sysfs: Grab lock for edid/modes_show

We chase pointers/lists without taking the locks protecting them,
which isn't that good.

Fix it.

v2: Actually unlock properly, spotted by Julia.

v3: Put the label _before_ the mutex_unlock (Emil)

Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Link: http://patchwork.freedesktop.org/patch/msgid/1443783662-23066-1-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_sysfs.c