Re: [PATCH] scsi_dh_alua: Fix a reference counting bug

2016-11-01 Thread Martin K. Petersen
> "Bart" == Bart Van Assche writes: Bart> The code at the end of alua_rtpg_work() is as follows: Bart> scsi_device_put(sdev); Bart> kref_put(&pg->kref, release_port_group); Bart> In other words, alua_rtpg_queue() must hold an sdev reference and Bart> a pg reference before queueing rtpg w

Re: [PATCH] scsi_dh_alua: Fix a reference counting bug

2016-11-01 Thread Hannes Reinecke
On 11/01/2016 03:19 PM, Bart Van Assche wrote: The code at the end of alua_rtpg_work() is as follows: scsi_device_put(sdev); kref_put(&pg->kref, release_port_group); In other words, alua_rtpg_queue() must hold an sdev reference and a pg reference before queueing rtpg work. If no

[PATCH] scsi_dh_alua: Fix a reference counting bug

2016-11-01 Thread Bart Van Assche
The code at the end of alua_rtpg_work() is as follows: scsi_device_put(sdev); kref_put(&pg->kref, release_port_group); In other words, alua_rtpg_queue() must hold an sdev reference and a pg reference before queueing rtpg work. If no rtpg work is queued no additional references sho

Re: [PATCH] scsi_dh_alua: Fix a reference counting bug

2016-10-04 Thread Hannes Reinecke
On 09/29/2016 07:01 PM, Bart Van Assche wrote: > On 09/28/2016 10:46 PM, Hannes Reinecke wrote: >> On 09/29/2016 01:45 AM, Bart Van Assche wrote: >>> The code at the end of alua_rtpg_work() is as follows: >>> >>> scsi_device_put(sdev); >>> kref_put(&pg->kref, release_port_group); >>> >>> Ma

Re: [PATCH] scsi_dh_alua: Fix a reference counting bug

2016-09-29 Thread Bart Van Assche
On 09/28/2016 10:46 PM, Hannes Reinecke wrote: On 09/29/2016 01:45 AM, Bart Van Assche wrote: The code at the end of alua_rtpg_work() is as follows: scsi_device_put(sdev); kref_put(&pg->kref, release_port_group); Make sure that all code that queues the work item associated with

Re: [PATCH] scsi_dh_alua: Fix a reference counting bug

2016-09-28 Thread Hannes Reinecke
On 09/29/2016 01:45 AM, Bart Van Assche wrote: > The code at the end of alua_rtpg_work() is as follows: > > scsi_device_put(sdev); > kref_put(&pg->kref, release_port_group); > > Make sure that all code that queues the work item associated > with alua_rtpg_work() holds both references.

[PATCH] scsi_dh_alua: Fix a reference counting bug

2016-09-28 Thread Bart Van Assche
The code at the end of alua_rtpg_work() is as follows: scsi_device_put(sdev); kref_put(&pg->kref, release_port_group); Make sure that all code that queues the work item associated with alua_rtpg_work() holds both references. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc