summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-30 17:58:38 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-17 11:23:31 +0100
commitc94adc4a65c67a79f0d19285bf5c32fe4c00176f (patch)
treeb99db2b775b3c0de3fc631c09abe8dceb2f47a2f /drivers/gpu/drm
parent04cfe97eb11c28848d14ba8c88124da31a9f881c (diff)
downloadlinux-c94adc4a65c67a79f0d19285bf5c32fe4c00176f.tar.gz
linux-c94adc4a65c67a79f0d19285bf5c32fe4c00176f.tar.bz2
linux-c94adc4a65c67a79f0d19285bf5c32fe4c00176f.zip
drm: Fix use-after-free in the shadow-attache exit code
This regression has been introduced in commit b3f2333de8e81b089262b26d52272911523e605f Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Dec 11 11:34:31 2013 +0100 drm: restrict the device list for shadow attached drivers Reported-by: Dave Jones <davej@redhat.com> Cc: Dave Jones <davej@redhat.com> Cc: Dave Airlie <airlied@redhat.com> Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/drm_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 5736aaa7e86c..f7af69bcf3f4 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -468,8 +468,8 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
} else {
list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,
legacy_dev_list) {
- drm_put_dev(dev);
list_del(&dev->legacy_dev_list);
+ drm_put_dev(dev);
}
}
DRM_INFO("Module unloaded\n");