Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-20 Thread Alan Stern
On Wed, 14 Jan 2015, Christoph Hellwig wrote: On Mon, Jan 12, 2015 at 11:29:15AM -0500, Alan Stern wrote: This seems like a good idea and the obvious (once it has been pointed out!) approach. Perhaps not directly related to the issue at hand is this question: In scsi_rescan_device()

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-15 Thread Don Brace
On 01/07/2015 07:03 AM, Bart Van Assche wrote: Since kernel v3.19-rc1 module_refcount() returns 1 instead of 0 when called from inside module_exit(). This breaks the module_refcount() test in scsi_device_put() and hence causes the following kernel warning to be reported when unloading the ib_srp

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-15 Thread Christoph Hellwig
On Wed, Jan 14, 2015 at 10:07:00AM -0500, Alan Stern wrote: and the kernfs core insures that the underlying device won't be deallocated while a sysfs method runs. It has a reference to keep it from beeing freed, but so far I can't find anything that prevents -remove from beeing called while we

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-14 Thread Alan Stern
On Wed, 14 Jan 2015, Christoph Hellwig wrote: On Mon, Jan 12, 2015 at 11:29:15AM -0500, Alan Stern wrote: This seems like a good idea and the obvious (once it has been pointed out!) approach. Perhaps not directly related to the issue at hand is this question: In scsi_rescan_device()

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-14 Thread Christoph Hellwig
On Mon, Jan 12, 2015 at 11:29:15AM -0500, Alan Stern wrote: This seems like a good idea and the obvious (once it has been pointed out!) approach. Perhaps not directly related to the issue at hand is this question: In scsi_rescan_device() we will now have:

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-12 Thread Alan Stern
On Thu, 8 Jan 2015, Christoph Hellwig wrote: On Wed, Jan 07, 2015 at 02:03:22PM +0100, Bart Van Assche wrote: Since kernel v3.19-rc1 module_refcount() returns 1 instead of 0 when called from inside module_exit(). This breaks the module_refcount() test in scsi_device_put() and hence causes

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-08 Thread Christoph Hellwig
On Wed, Jan 07, 2015 at 02:03:22PM +0100, Bart Van Assche wrote: Since kernel v3.19-rc1 module_refcount() returns 1 instead of 0 when called from inside module_exit(). This breaks the module_refcount() test in scsi_device_put() and hence causes the following kernel warning to be reported when

[PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-07 Thread Bart Van Assche
Since kernel v3.19-rc1 module_refcount() returns 1 instead of 0 when called from inside module_exit(). This breaks the module_refcount() test in scsi_device_put() and hence causes the following kernel warning to be reported when unloading the ib_srp kernel module: WARNING: CPU: 5 PID: 228 at