Loading Makefile +1 −1 Original line number Diff line number Diff line # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 SUBLEVEL = 65 SUBLEVEL = 66 EXTRAVERSION = NAME = "People's Front" Loading drivers/atm/iphase.c +6 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ #include <asm/byteorder.h> #include <linux/vmalloc.h> #include <linux/jiffies.h> #include <linux/nospec.h> #include "iphase.h" #include "suni.h" #define swap_byte_order(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8)) Loading Loading @@ -2760,8 +2761,11 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg) } if (copy_from_user(&ia_cmds, arg, sizeof ia_cmds)) return -EFAULT; board = ia_cmds.status; if ((board < 0) || (board > iadev_count)) board = 0; board = array_index_nospec(board, iadev_count + 1); iadev = ia_dev[board]; switch (ia_cmds.cmd) { case MEMDUMP: Loading drivers/base/base.h +4 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,9 @@ struct driver_private { * probed first. * @device - pointer back to the struct device that this structure is * associated with. * @dead - This device is currently either in the process of or has been * removed from the system. Any asynchronous events scheduled for this * device should exit without taking any action. * * Nothing outside of the driver core should ever touch these fields. */ Loading @@ -76,6 +79,7 @@ struct device_private { struct klist_node knode_bus; struct list_head deferred_probe; struct device *device; u8 dead:1; }; #define to_device_private_parent(obj) \ container_of(obj, struct device_private, knode_parent) Loading drivers/base/core.c +22 −0 Original line number Diff line number Diff line Loading @@ -2031,6 +2031,24 @@ void put_device(struct device *dev) } EXPORT_SYMBOL_GPL(put_device); bool kill_device(struct device *dev) { /* * Require the device lock and set the "dead" flag to guarantee that * the update behavior is consistent with the other bitfields near * it and that we cannot have an asynchronous probe routine trying * to run while we are tearing out the bus/class/sysfs from * underneath the device. */ lockdep_assert_held(&dev->mutex); if (dev->p->dead) return false; dev->p->dead = true; return true; } EXPORT_SYMBOL_GPL(kill_device); /** * device_del - delete device from system. * @dev: device. Loading @@ -2050,6 +2068,10 @@ void device_del(struct device *dev) struct kobject *glue_dir = NULL; struct class_interface *class_intf; device_lock(dev); kill_device(dev); device_unlock(dev); /* Notify clients of device removal. This call must come * before dpm_sysfs_remove(). */ Loading drivers/base/dd.c +11 −11 Original line number Diff line number Diff line Loading @@ -725,15 +725,6 @@ static int __device_attach_driver(struct device_driver *drv, void *_data) bool async_allowed; int ret; /* * Check if device has already been claimed. This may * happen with driver loading, device discovery/registration, * and deferred probe processing happens all at once with * multiple threads. */ if (dev->driver) return -EBUSY; ret = driver_match_device(drv, dev); if (ret == 0) { /* no match */ Loading Loading @@ -768,6 +759,15 @@ static void __device_attach_async_helper(void *_dev, async_cookie_t cookie) device_lock(dev); /* * Check if device has already been removed or claimed. This may * happen with driver loading, device discovery/registration, * and deferred probe processing happens all at once with * multiple threads. */ if (dev->p->dead || dev->driver) goto out_unlock; if (dev->parent) pm_runtime_get_sync(dev->parent); Loading @@ -778,7 +778,7 @@ static void __device_attach_async_helper(void *_dev, async_cookie_t cookie) if (dev->parent) pm_runtime_put(dev->parent); out_unlock: device_unlock(dev); put_device(dev); Loading Loading @@ -891,7 +891,7 @@ static int __driver_attach(struct device *dev, void *data) if (dev->parent && dev->bus->need_parent_lock) device_lock(dev->parent); device_lock(dev); if (!dev->driver) if (!dev->p->dead && !dev->driver) driver_probe_device(drv, dev); device_unlock(dev); if (dev->parent && dev->bus->need_parent_lock) Loading Loading
Makefile +1 −1 Original line number Diff line number Diff line # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 SUBLEVEL = 65 SUBLEVEL = 66 EXTRAVERSION = NAME = "People's Front" Loading
drivers/atm/iphase.c +6 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ #include <asm/byteorder.h> #include <linux/vmalloc.h> #include <linux/jiffies.h> #include <linux/nospec.h> #include "iphase.h" #include "suni.h" #define swap_byte_order(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8)) Loading Loading @@ -2760,8 +2761,11 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg) } if (copy_from_user(&ia_cmds, arg, sizeof ia_cmds)) return -EFAULT; board = ia_cmds.status; if ((board < 0) || (board > iadev_count)) board = 0; board = array_index_nospec(board, iadev_count + 1); iadev = ia_dev[board]; switch (ia_cmds.cmd) { case MEMDUMP: Loading
drivers/base/base.h +4 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,9 @@ struct driver_private { * probed first. * @device - pointer back to the struct device that this structure is * associated with. * @dead - This device is currently either in the process of or has been * removed from the system. Any asynchronous events scheduled for this * device should exit without taking any action. * * Nothing outside of the driver core should ever touch these fields. */ Loading @@ -76,6 +79,7 @@ struct device_private { struct klist_node knode_bus; struct list_head deferred_probe; struct device *device; u8 dead:1; }; #define to_device_private_parent(obj) \ container_of(obj, struct device_private, knode_parent) Loading
drivers/base/core.c +22 −0 Original line number Diff line number Diff line Loading @@ -2031,6 +2031,24 @@ void put_device(struct device *dev) } EXPORT_SYMBOL_GPL(put_device); bool kill_device(struct device *dev) { /* * Require the device lock and set the "dead" flag to guarantee that * the update behavior is consistent with the other bitfields near * it and that we cannot have an asynchronous probe routine trying * to run while we are tearing out the bus/class/sysfs from * underneath the device. */ lockdep_assert_held(&dev->mutex); if (dev->p->dead) return false; dev->p->dead = true; return true; } EXPORT_SYMBOL_GPL(kill_device); /** * device_del - delete device from system. * @dev: device. Loading @@ -2050,6 +2068,10 @@ void device_del(struct device *dev) struct kobject *glue_dir = NULL; struct class_interface *class_intf; device_lock(dev); kill_device(dev); device_unlock(dev); /* Notify clients of device removal. This call must come * before dpm_sysfs_remove(). */ Loading
drivers/base/dd.c +11 −11 Original line number Diff line number Diff line Loading @@ -725,15 +725,6 @@ static int __device_attach_driver(struct device_driver *drv, void *_data) bool async_allowed; int ret; /* * Check if device has already been claimed. This may * happen with driver loading, device discovery/registration, * and deferred probe processing happens all at once with * multiple threads. */ if (dev->driver) return -EBUSY; ret = driver_match_device(drv, dev); if (ret == 0) { /* no match */ Loading Loading @@ -768,6 +759,15 @@ static void __device_attach_async_helper(void *_dev, async_cookie_t cookie) device_lock(dev); /* * Check if device has already been removed or claimed. This may * happen with driver loading, device discovery/registration, * and deferred probe processing happens all at once with * multiple threads. */ if (dev->p->dead || dev->driver) goto out_unlock; if (dev->parent) pm_runtime_get_sync(dev->parent); Loading @@ -778,7 +778,7 @@ static void __device_attach_async_helper(void *_dev, async_cookie_t cookie) if (dev->parent) pm_runtime_put(dev->parent); out_unlock: device_unlock(dev); put_device(dev); Loading Loading @@ -891,7 +891,7 @@ static int __driver_attach(struct device *dev, void *data) if (dev->parent && dev->bus->need_parent_lock) device_lock(dev->parent); device_lock(dev); if (!dev->driver) if (!dev->p->dead && !dev->driver) driver_probe_device(drv, dev); device_unlock(dev); if (dev->parent && dev->bus->need_parent_lock) Loading