Re: [PATCH] driver core: Make it safe to use get_device() if the reference count is zero

2017-12-14 Thread Jason Yan
On 2017/12/14 16:56, Greg KH wrote: On Thu, Dec 14, 2017 at 04:27:56PM +0800, Jason Yan wrote: On 2017/12/14 16:10, Greg KH wrote: On Thu, Dec 14, 2017 at 03:56:46PM +0800, Jason Yan wrote: On 2017/12/14 15:42, Greg KH wrote: On Thu, Dec 14, 2017 at 11:39:36AM +0800, Jason Yan wrote: Som

Re: [PATCH] driver core: Make it safe to use get_device() if the reference count is zero

2017-12-14 Thread Greg KH
On Thu, Dec 14, 2017 at 04:27:56PM +0800, Jason Yan wrote: > > > On 2017/12/14 16:10, Greg KH wrote: > > On Thu, Dec 14, 2017 at 03:56:46PM +0800, Jason Yan wrote: > > > > > > On 2017/12/14 15:42, Greg KH wrote: > > > > On Thu, Dec 14, 2017 at 11:39:36AM +0800, Jason Yan wrote: > > > > > Some dr

Re: [PATCH] driver core: Make it safe to use get_device() if the reference count is zero

2017-12-14 Thread Jason Yan
On 2017/12/14 16:10, Greg KH wrote: On Thu, Dec 14, 2017 at 03:56:46PM +0800, Jason Yan wrote: On 2017/12/14 15:42, Greg KH wrote: On Thu, Dec 14, 2017 at 11:39:36AM +0800, Jason Yan wrote: Some driviers may have the chance to increase a reference count that has dropped to zero when using g

Re: [PATCH] driver core: Make it safe to use get_device() if the reference count is zero

2017-12-14 Thread Greg KH
On Thu, Dec 14, 2017 at 03:56:46PM +0800, Jason Yan wrote: > > On 2017/12/14 15:42, Greg KH wrote: > > On Thu, Dec 14, 2017 at 11:39:36AM +0800, Jason Yan wrote: > > > Some driviers may have the chance to increase a reference count that > > > has dropped to zero when using get_device() because of

Re: [PATCH] driver core: Make it safe to use get_device() if the reference count is zero

2017-12-13 Thread Jason Yan
On 2017/12/14 15:42, Greg KH wrote: On Thu, Dec 14, 2017 at 11:39:36AM +0800, Jason Yan wrote: Some driviers may have the chance to increase a reference count that has dropped to zero when using get_device() because of their design. Then those drivers are broken :) We have met such a issue w

Re: [PATCH] driver core: Make it safe to use get_device() if the reference count is zero

2017-12-13 Thread Greg KH
On Thu, Dec 14, 2017 at 11:39:36AM +0800, Jason Yan wrote: > Some driviers may have the chance to increase a reference count that > has dropped to zero when using get_device() because of their design. Then those drivers are broken :) > We have met such a issue with scsi: > https://www.spinics.net

[PATCH] driver core: Make it safe to use get_device() if the reference count is zero

2017-12-13 Thread Jason Yan
Some driviers may have the chance to increase a reference count that has dropped to zero when using get_device() because of their design. We have met such a issue with scsi: https://www.spinics.net/lists/linux-scsi/msg115295.html The scsi core will keep the scsi device object in the host list aft