Re: drm: restrict the device list for shadow attached drivers
From: Dave Jones
Date: Thu Jan 30 2014 - 11:42:09 EST
On Thu, Jan 30, 2014 at 04:57:54AM +0000, Linux Kernel wrote:
> Gitweb: http://git.kernel.org/linus/;a=commit;h=b3f2333de8e81b089262b26d52272911523e605f
> Commit: b3f2333de8e81b089262b26d52272911523e605f
> Parent: e2577d455adb165e1046816e5ed092cc6d60f35a
> Author: Daniel Vetter <daniel.vetter@xxxxxxxx>
> AuthorDate: Wed Dec 11 11:34:31 2013 +0100
> Committer: Dave Airlie <airlied@xxxxxxxxxx>
> CommitDate: Wed Dec 18 11:08:36 2013 +1000
>
> drm: restrict the device list for shadow attached drivers
> @@ -465,8 +470,11 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
> if (driver->driver_features & DRIVER_MODESET) {
> pci_unregister_driver(pdriver);
> } else {
> - list_for_each_entry_safe(dev, tmp, &driver->device_list, driver_item)
> + list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,
> + legacy_dev_list) {
> drm_put_dev(dev);
> + list_del(&dev->legacy_dev_list);
> + }
> }
Use-after-free. drm_put_dev frees dev.
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/