All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/2] target refcounting infrastructure fixes for usb
@ 2013-12-16 15:10 James Bottomley
  2013-12-16 15:12 ` [RFC 1/2] fix our current target reap infrastructure James Bottomley
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: James Bottomley @ 2013-12-16 15:10 UTC (permalink / raw)
  To: linux-scsi; +Cc: Alan Stern, USB list

This set should fix our target problems with USB by making the target
visibility properly reference counted.  Since it's a major change to the
infrastructure, we'll incubate upstream first before backporting to
stable.

James

---

James Bottomley (2):
  [SCSI] fix our current target reap infrastructure.
  [SCSI] dual scan thread bug fix

 drivers/scsi/scsi_scan.c   | 102 ++++++++++++++++++++++++++++-----------------
 drivers/scsi/scsi_sysfs.c  |  15 ++++---
 include/scsi/scsi_device.h |   3 +-
 3 files changed, 74 insertions(+), 46 deletions(-)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [RFC 1/2] fix our current target reap infrastructure.
  2013-12-16 15:10 [RFC 0/2] target refcounting infrastructure fixes for usb James Bottomley
@ 2013-12-16 15:12 ` James Bottomley
  2013-12-16 15:57   ` Alan Stern
  2013-12-16 15:13 ` [RFC 2/2] dual scan thread bug fix James Bottomley
       [not found] ` <1387206619.2200.6.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  2 siblings, 1 reply; 20+ messages in thread
From: James Bottomley @ 2013-12-16 15:12 UTC (permalink / raw)
  To: linux-scsi; +Cc: Alan Stern, USB list

This patch eliminates the reap_ref and replaces it with a proper kref.
On last put of this kref, the target is removed from visibility in
sysfs.  The final call to scsi_target_reap() for the device is done from
__scsi_remove_device() and only if the device was made visible.  This
ensures that the target disappears as soon as the last device is gone
rather than waiting until final release of the device (which is often
too long).

---
 drivers/scsi/scsi_scan.c   | 89 +++++++++++++++++++++++++++-------------------
 drivers/scsi/scsi_sysfs.c  | 15 ++++----
 include/scsi/scsi_device.h |  3 +-
 3 files changed, 63 insertions(+), 44 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 307a811..39e5c85 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -371,6 +371,31 @@ static struct scsi_target *__scsi_find_target(struct device *parent,
 }
 
 /**
+ * scsi_target_reap_ref_release - remove target from visibility
+ * @kref: the reap_ref in the target being released
+ *
+ * Called on last put of reap_ref, which is the indication that no device
+ * under this target is visible anymore, so render the target invisible in
+ * sysfs.  Note: we have to be in user context here because the target reaps
+ * should be done in places where the scsi device visibility is being removed.
+ */
+static void scsi_target_reap_ref_release(struct kref *kref)
+{
+	struct scsi_target *starget
+		= container_of(kref, struct scsi_target, reap_ref);
+
+	transport_remove_device(&starget->dev);
+	device_del(&starget->dev);
+	starget->state = STARGET_DEL;
+	scsi_target_destroy(starget);
+}
+
+static void scsi_target_reap_ref_put(struct scsi_target *starget)
+{
+	kref_put(&starget->reap_ref, scsi_target_reap_ref_release);
+}
+
+/**
  * scsi_alloc_target - allocate a new or find an existing target
  * @parent:	parent of the target (need not be a scsi host)
  * @channel:	target channel number (zero if no channels)
@@ -401,7 +426,7 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
 	}
 	dev = &starget->dev;
 	device_initialize(dev);
-	starget->reap_ref = 1;
+	kref_init(&starget->reap_ref);
 	dev->parent = get_device(parent);
 	dev_set_name(dev, "target%d:%d:%d", shost->host_no, channel, id);
 	dev->bus = &scsi_bus_type;
@@ -441,29 +466,32 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
 	return starget;
 
  found:
-	found_target->reap_ref++;
+	if (!kref_get_unless_zero(&found_target->reap_ref))
+		/*
+		 * release routine already fired.  Target is dead, but
+		 * STARGET_DEL may not yet be set (set in the release
+		 * routine), so set here as well, just in case
+		 */
+		found_target->state = STARGET_DEL;
 	spin_unlock_irqrestore(shost->host_lock, flags);
 	if (found_target->state != STARGET_DEL) {
 		put_device(dev);
 		return found_target;
 	}
-	/* Unfortunately, we found a dying target; need to
-	 * wait until it's dead before we can get a new one */
+	/*
+	 * Unfortunately, we found a dying target; need to wait until it's
+	 * dead before we can get a new one.  There is an anomaly here.  We
+	 * *should* call scsi_target_reap() to balance the kref_get() of the
+	 * reap_ref above.  However, since the target is in state STARGET_DEL,
+	 * it's already invisible and the reap_ref is irrelevant.  If we call
+	 * scsi_target_reap() we might spuriously do another device_del() on
+	 * an already invisible target.
+	 */
 	put_device(&found_target->dev);
 	flush_scheduled_work();
 	goto retry;
 }
 
-static void scsi_target_reap_usercontext(struct work_struct *work)
-{
-	struct scsi_target *starget =
-		container_of(work, struct scsi_target, ew.work);
-
-	transport_remove_device(&starget->dev);
-	device_del(&starget->dev);
-	scsi_target_destroy(starget);
-}
-
 /**
  * scsi_target_reap - check to see if target is in use and destroy if not
  * @starget: target to be checked
@@ -474,28 +502,11 @@ static void scsi_target_reap_usercontext(struct work_struct *work)
  */
 void scsi_target_reap(struct scsi_target *starget)
 {
-	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
-	unsigned long flags;
-	enum scsi_target_state state;
-	int empty = 0;
-
-	spin_lock_irqsave(shost->host_lock, flags);
-	state = starget->state;
-	if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
-		empty = 1;
-		starget->state = STARGET_DEL;
-	}
-	spin_unlock_irqrestore(shost->host_lock, flags);
-
-	if (!empty)
-		return;
-
-	BUG_ON(state == STARGET_DEL);
-	if (state == STARGET_CREATED)
+	BUG_ON(starget->state == STARGET_DEL);
+	if (starget->state == STARGET_CREATED)
 		scsi_target_destroy(starget);
 	else
-		execute_in_process_context(scsi_target_reap_usercontext,
-					   &starget->ew);
+		scsi_target_reap_ref_put(starget);
 }
 
 /**
@@ -1532,6 +1543,10 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
 	}
 	mutex_unlock(&shost->scan_mutex);
 	scsi_autopm_put_target(starget);
+	/*
+	 * paired with scsi_alloc_target().  Target will be destroyed unless
+	 * scsi_probe_and_add_lun made an underlying device visible
+	 */
 	scsi_target_reap(starget);
 	put_device(&starget->dev);
 
@@ -1612,8 +1627,10 @@ static void __scsi_scan_target(struct device *parent, unsigned int channel,
 
  out_reap:
 	scsi_autopm_put_target(starget);
-	/* now determine if the target has any children at all
-	 * and if not, nuke it */
+	/*
+	 * paired with scsi_alloc_target(): determine if the target has
+	 * any children at all and if not, nuke it
+	 */
 	scsi_target_reap(starget);
 
 	put_device(&starget->dev);
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 9117d0b..34eab7b 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -383,17 +383,14 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
 {
 	struct scsi_device *sdev;
 	struct device *parent;
-	struct scsi_target *starget;
 	struct list_head *this, *tmp;
 	unsigned long flags;
 
 	sdev = container_of(work, struct scsi_device, ew.work);
 
 	parent = sdev->sdev_gendev.parent;
-	starget = to_scsi_target(parent);
 
 	spin_lock_irqsave(sdev->host->host_lock, flags);
-	starget->reap_ref++;
 	list_del(&sdev->siblings);
 	list_del(&sdev->same_target_siblings);
 	list_del(&sdev->starved_entry);
@@ -413,8 +410,6 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
 	/* NULL queue means the device can't be used */
 	sdev->request_queue = NULL;
 
-	scsi_target_reap(scsi_target(sdev));
-
 	kfree(sdev->inquiry);
 	kfree(sdev);
 
@@ -1001,6 +996,7 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
 		return error;
 	}
 	transport_add_device(&sdev->sdev_gendev);
+	kref_get(&starget->reap_ref); /* device now visible, so target is held */
 	sdev->is_visible = 1;
 
 	/* create queue files, which may be writable, depending on the host */
@@ -1055,6 +1051,13 @@ void __scsi_remove_device(struct scsi_device *sdev)
 		device_unregister(&sdev->sdev_dev);
 		transport_remove_device(dev);
 		device_del(dev);
+		/*
+		 * Paired with the kref_get() in scsi_sysfs_add_sdev().  We're
+		 * removing sysfs visibility from the device, so make the
+		 * target invisible if this was the last device underneath it.
+		 */
+		scsi_target_reap(scsi_target(sdev));
+
 	} else
 		put_device(&sdev->sdev_dev);
 
@@ -1133,7 +1136,7 @@ void scsi_remove_target(struct device *dev)
 			continue;
 		if (starget->dev.parent == dev || &starget->dev == dev) {
 			/* assuming new targets arrive at the end */
-			starget->reap_ref++;
+			kref_get(&starget->reap_ref);
 			spin_unlock_irqrestore(shost->host_lock, flags);
 			if (last)
 				scsi_target_reap(last);
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index d65fbec..24b9e06 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -257,7 +257,7 @@ struct scsi_target {
 	struct list_head	siblings;
 	struct list_head	devices;
 	struct device		dev;
-	unsigned int		reap_ref; /* protected by the host lock */
+	struct kref		reap_ref; /* last put renders device invisible */
 	unsigned int		channel;
 	unsigned int		id; /* target id ... replace
 				     * scsi_device.id eventually */
@@ -284,7 +284,6 @@ struct scsi_target {
 #define SCSI_DEFAULT_TARGET_BLOCKED	3
 
 	char			scsi_level;
-	struct execute_work	ew;
 	enum scsi_target_state	state;
 	void 			*hostdata; /* available to low-level driver */
 	unsigned long		starget_data[0]; /* for the transport */
-- 
1.8.4.3




^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [RFC 2/2] dual scan thread bug fix
  2013-12-16 15:10 [RFC 0/2] target refcounting infrastructure fixes for usb James Bottomley
  2013-12-16 15:12 ` [RFC 1/2] fix our current target reap infrastructure James Bottomley
@ 2013-12-16 15:13 ` James Bottomley
       [not found] ` <1387206619.2200.6.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  2 siblings, 0 replies; 20+ messages in thread
From: James Bottomley @ 2013-12-16 15:13 UTC (permalink / raw)
  To: linux-scsi; +Cc: Alan Stern, USB list

In the highly unusual case where two threads are running concurrently through
the scanning code scanning the same target, we run into the situation where
one may allocate the target while the other is still using it.  In this case,
because the reap checks for STARGET_CREATED and kills the target without
reference counting, the second thread will do the wrong thing on reap.

Fix this by reference counting even creates and doing the STARGET_CREATED
check in the final put.

---
 drivers/scsi/scsi_scan.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 39e5c85..2d7aafa 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -320,6 +320,7 @@ static void scsi_target_destroy(struct scsi_target *starget)
 	struct Scsi_Host *shost = dev_to_shost(dev->parent);
 	unsigned long flags;
 
+	starget->state = STARGET_DEL;
 	transport_destroy_device(dev);
 	spin_lock_irqsave(shost->host_lock, flags);
 	if (shost->hostt->target_destroy)
@@ -384,9 +385,15 @@ static void scsi_target_reap_ref_release(struct kref *kref)
 	struct scsi_target *starget
 		= container_of(kref, struct scsi_target, reap_ref);
 
-	transport_remove_device(&starget->dev);
-	device_del(&starget->dev);
-	starget->state = STARGET_DEL;
+	/*
+	 * if we get here and the target is still in the CREATED state that
+	 * means it was allocated but never made visible (because a scan
+	 * turned up no LUNs), so don't call device_del() on it.
+	 */
+	if (starget->state == STARGET_RUNNING) {
+		transport_remove_device(&starget->dev);
+		device_del(&starget->dev);
+	}
 	scsi_target_destroy(starget);
 }
 
@@ -502,11 +509,13 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
  */
 void scsi_target_reap(struct scsi_target *starget)
 {
+	/*
+	 * serious problem if this triggers: STARGET_DEL is only set in the
+	 * kref release routine, so we're doing another final put on an
+	 * already released kref
+	 */
 	BUG_ON(starget->state == STARGET_DEL);
-	if (starget->state == STARGET_CREATED)
-		scsi_target_destroy(starget);
-	else
-		scsi_target_reap_ref_put(starget);
+	scsi_target_reap_ref_put(starget);
 }
 
 /**
-- 
1.8.4.3




^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [RFC 1/2] fix our current target reap infrastructure.
  2013-12-16 15:12 ` [RFC 1/2] fix our current target reap infrastructure James Bottomley
@ 2013-12-16 15:57   ` Alan Stern
  2013-12-17 13:38     ` James Bottomley
  0 siblings, 1 reply; 20+ messages in thread
From: Alan Stern @ 2013-12-16 15:57 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, USB list

On Mon, 16 Dec 2013, James Bottomley wrote:

> This patch eliminates the reap_ref and replaces it with a proper kref.
> On last put of this kref, the target is removed from visibility in
> sysfs.  The final call to scsi_target_reap() for the device is done from
> __scsi_remove_device() and only if the device was made visible.  This
> ensures that the target disappears as soon as the last device is gone
> rather than waiting until final release of the device (which is often
> too long).

Reviewed-by: Alan Stern <stern@rowland.harvard.edu>

Two small suggested changes:

> @@ -441,29 +466,32 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
>  	return starget;
>  
>   found:
> -	found_target->reap_ref++;
> +	if (!kref_get_unless_zero(&found_target->reap_ref))
> +		/*
> +		 * release routine already fired.  Target is dead, but
> +		 * STARGET_DEL may not yet be set (set in the release
> +		 * routine), so set here as well, just in case
> +		 */
> +		found_target->state = STARGET_DEL;
>  	spin_unlock_irqrestore(shost->host_lock, flags);
>  	if (found_target->state != STARGET_DEL) {
>  		put_device(dev);
>  		return found_target;
>  	}
> -	/* Unfortunately, we found a dying target; need to
> -	 * wait until it's dead before we can get a new one */
> +	/*
> +	 * Unfortunately, we found a dying target; need to wait until it's
> +	 * dead before we can get a new one.  There is an anomaly here.  We
> +	 * *should* call scsi_target_reap() to balance the kref_get() of the
> +	 * reap_ref above.  However, since the target is in state STARGET_DEL,
> +	 * it's already invisible and the reap_ref is irrelevant.  If we call
> +	 * scsi_target_reap() we might spuriously do another device_del() on
> +	 * an already invisible target.
> +	 */
>  	put_device(&found_target->dev);
>  	flush_scheduled_work();
>  	goto retry;

Since scsi_target_reap_usercontext() is now gone, scsi_target_destroy()
doesn't rely on a work queue any more.  Therefore something like
msleep(1) would be more appropriate than flush_scheduled_work().

> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -257,7 +257,7 @@ struct scsi_target {
>  	struct list_head	siblings;
>  	struct list_head	devices;
>  	struct device		dev;
> -	unsigned int		reap_ref; /* protected by the host lock */
> +	struct kref		reap_ref; /* last put renders device invisible */

s/device/target/

Alan Stern


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 1/2] fix our current target reap infrastructure.
  2013-12-16 15:57   ` Alan Stern
@ 2013-12-17 13:38     ` James Bottomley
  0 siblings, 0 replies; 20+ messages in thread
From: James Bottomley @ 2013-12-17 13:38 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-scsi, USB list


On Mon, 2013-12-16 at 10:57 -0500, Alan Stern wrote:
> On Mon, 16 Dec 2013, James Bottomley wrote:
> 
> > This patch eliminates the reap_ref and replaces it with a proper kref.
> > On last put of this kref, the target is removed from visibility in
> > sysfs.  The final call to scsi_target_reap() for the device is done from
> > __scsi_remove_device() and only if the device was made visible.  This
> > ensures that the target disappears as soon as the last device is gone
> > rather than waiting until final release of the device (which is often
> > too long).
> 
> Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
> 
> Two small suggested changes:
> 
> > @@ -441,29 +466,32 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
> >  	return starget;
> >  
> >   found:
> > -	found_target->reap_ref++;
> > +	if (!kref_get_unless_zero(&found_target->reap_ref))
> > +		/*
> > +		 * release routine already fired.  Target is dead, but
> > +		 * STARGET_DEL may not yet be set (set in the release
> > +		 * routine), so set here as well, just in case
> > +		 */
> > +		found_target->state = STARGET_DEL;
> >  	spin_unlock_irqrestore(shost->host_lock, flags);
> >  	if (found_target->state != STARGET_DEL) {
> >  		put_device(dev);
> >  		return found_target;
> >  	}
> > -	/* Unfortunately, we found a dying target; need to
> > -	 * wait until it's dead before we can get a new one */
> > +	/*
> > +	 * Unfortunately, we found a dying target; need to wait until it's
> > +	 * dead before we can get a new one.  There is an anomaly here.  We
> > +	 * *should* call scsi_target_reap() to balance the kref_get() of the
> > +	 * reap_ref above.  However, since the target is in state STARGET_DEL,
> > +	 * it's already invisible and the reap_ref is irrelevant.  If we call
> > +	 * scsi_target_reap() we might spuriously do another device_del() on
> > +	 * an already invisible target.
> > +	 */
> >  	put_device(&found_target->dev);
> >  	flush_scheduled_work();
> >  	goto retry;
> 
> Since scsi_target_reap_usercontext() is now gone, scsi_target_destroy()
> doesn't rely on a work queue any more.  Therefore something like
> msleep(1) would be more appropriate than flush_scheduled_work().

I suppose so.  In theory with the removal of the work queue, going from
final release to list del should be deterministic, so we should run into
this less.  I quite like the flush_scheduled_work, because it pushes out
all the pending work for devices on other targets (so accelerates host
remove).  However, I suppose it does now look wrong in this context.

> > --- a/include/scsi/scsi_device.h
> > +++ b/include/scsi/scsi_device.h
> > @@ -257,7 +257,7 @@ struct scsi_target {
> >  	struct list_head	siblings;
> >  	struct list_head	devices;
> >  	struct device		dev;
> > -	unsigned int		reap_ref; /* protected by the host lock */
> > +	struct kref		reap_ref; /* last put renders device invisible */
> 
> s/device/target/

Will update, thanks.

James



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
       [not found] ` <1387206619.2200.6.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
@ 2013-12-18 20:36   ` Sarah Sharp
  2013-12-18 21:50     ` Alan Stern
  0 siblings, 1 reply; 20+ messages in thread
From: Sarah Sharp @ 2013-12-18 20:36 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, Alan Stern, USB list

On Mon, Dec 16, 2013 at 07:10:19AM -0800, James Bottomley wrote:
> This set should fix our target problems with USB by making the target
> visibility properly reference counted.  Since it's a major change to the
> infrastructure, we'll incubate upstream first before backporting to
> stable.
> 
> James

I tried these patches, and they cause an oops when a USB mass storage
device is plugged in.  Note that this device uses the usb-storage
driver, not the uas driver.

[14248.340064] scsi6 : usb-storage 2-2:1.0
[14248.341083] usbcore: registered new interface driver usb-storage
[14248.346211] usbcore: registered new interface driver uas
[14249.339937] scsi 6:0:0:0: Direct-Access     Lexar    JumpDrive        1.00 PQ: 0 ANSI: 6
[14249.340988] ------------[ cut here ]------------
[14249.340999] WARNING: CPU: 3 PID: 5578 at lib/kobject.c:227 kobject_add_internal+0x13f/0x350()
[14249.341003] kobject_add_internal failed for 6:0:0:0 (error: -2 parent: target6:0:0)
[14249.341005] Modules linked in: uas usb_storage ctr ccm cuse dm_crypt uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev btusb x86_pkg_temp_thermal coretemp ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 iwldvm mac80211 microcode snd_hda_codec_hdmi iwlwifi psmouse snd_hda_codec_realtek serio_raw snd_hda_intel snd_usb_audio snd_hda_codec thinkpad_acpi cfg80211 joydev snd_usbmidi_lib nvram snd_hwdep snd_seq_midi snd_pcm snd_seq_midi_event snd_rawmidi lpc_ich rfcomm bnep snd_seq bluetooth snd_seq_device snd_page_alloc ehci_pci snd_timer ehci_hcd snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 ahci libahci e1000e sdhci_pci sdhci i2c_algo_bit drm_kms_helper ptp pps_core drm xhci_hcd video
[14249.341095] CPU: 3 PID: 5578 Comm: kworker/u16:0 Not tainted 3.13.0-rc1+ #142
[14249.341098] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
[14249.341105] Workqueue: events_unbound async_run_entry_fn
[14249.341108]  0000000000000009 ffff88003aa9db60 ffffffff81658a4e ffff88003aa9dba8
[14249.341115]  ffff88003aa9db98 ffffffff81048c3d ffff88006bc551b0 00000000fffffffe
[14249.341121]  0000000000000000 ffff8800bec22838 0000000000000200 ffff88003aa9dbf8
[14249.341127] Call Trace:
[14249.341135]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
[14249.341142]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
[14249.341148]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
[14249.341154]  [<ffffffff81660f17>] ? _raw_spin_unlock+0x27/0x40
[14249.341159]  [<ffffffff8133748f>] kobject_add_internal+0x13f/0x350
[14249.341163]  [<ffffffff813379b5>] kobject_add+0x65/0xb0
[14249.341170]  [<ffffffff81425b40>] ? get_device+0x30/0x30
[14249.341175]  [<ffffffff81649781>] ? klist_init+0x31/0x40
[14249.341181]  [<ffffffff81427208>] device_add+0x128/0x660
[14249.341186]  [<ffffffff814369cc>] ? __pm_runtime_resume+0x5c/0x90
[14249.341193]  [<ffffffff8145bcdc>] scsi_sysfs_add_sdev+0xac/0x340
[14249.341199]  [<ffffffff8145a443>] do_scan_async+0x83/0x180
[14249.341204]  [<ffffffff81074247>] async_run_entry_fn+0x37/0x130
[14249.341210]  [<ffffffff81066524>] process_one_work+0x1f4/0x550
[14249.341215]  [<ffffffff810664c2>] ? process_one_work+0x192/0x550
[14249.341220]  [<ffffffff81067261>] worker_thread+0x121/0x3a0
[14249.341225]  [<ffffffff81067140>] ? manage_workers.isra.22+0x2a0/0x2a0
[14249.341231]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
[14249.341238]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
[14249.341243]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
[14249.341249]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
[14249.341253] ---[ end trace 7f1d8a449e6af5aa ]---
[14249.341259] scsi 6:0:0:0: failed to add device: -2

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2013-12-18 20:36   ` [RFC 0/2] target refcounting infrastructure fixes for usb Sarah Sharp
@ 2013-12-18 21:50     ` Alan Stern
  2013-12-19  0:05       ` James Bottomley
  0 siblings, 1 reply; 20+ messages in thread
From: Alan Stern @ 2013-12-18 21:50 UTC (permalink / raw)
  To: Sarah Sharp; +Cc: James Bottomley, linux-scsi, USB list

On Wed, 18 Dec 2013, Sarah Sharp wrote:

> On Mon, Dec 16, 2013 at 07:10:19AM -0800, James Bottomley wrote:
> > This set should fix our target problems with USB by making the target
> > visibility properly reference counted.  Since it's a major change to the
> > infrastructure, we'll incubate upstream first before backporting to
> > stable.
> > 
> > James
> 
> I tried these patches, and they cause an oops when a USB mass storage
> device is plugged in.  Note that this device uses the usb-storage
> driver, not the uas driver.
> 
> [14248.340064] scsi6 : usb-storage 2-2:1.0
> [14248.341083] usbcore: registered new interface driver usb-storage
> [14248.346211] usbcore: registered new interface driver uas
> [14249.339937] scsi 6:0:0:0: Direct-Access     Lexar    JumpDrive        1.00 PQ: 0 ANSI: 6
> [14249.340988] ------------[ cut here ]------------
> [14249.340999] WARNING: CPU: 3 PID: 5578 at lib/kobject.c:227 kobject_add_internal+0x13f/0x350()
> [14249.341003] kobject_add_internal failed for 6:0:0:0 (error: -2 parent: target6:0:0)
> [14249.341005] Modules linked in: uas usb_storage ctr ccm cuse dm_crypt uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev btusb x86_pkg_temp_thermal coretemp ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 iwldvm mac80211 microcode snd_hda_codec_hdmi iwlwifi psmouse snd_hda_codec_realtek serio_raw snd_hda_intel snd_usb_audio snd_hda_codec thinkpad_acpi cfg80211 joydev snd_usbmidi_lib nvram snd_hwdep snd_seq_midi snd_pcm snd_seq_midi_event snd_rawmidi lpc_ich rfcomm bnep snd_seq bluetooth snd_seq_device snd_page_alloc ehci_pci snd_timer ehci_hcd snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 ahci libahci e1000e sdhci_pci sdhci i2c_algo_bit drm_kms_helper ptp pps_core drm xhci_hcd vide
 o
> [14249.341095] CPU: 3 PID: 5578 Comm: kworker/u16:0 Not tainted 3.13.0-rc1+ #142
> [14249.341098] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
> [14249.341105] Workqueue: events_unbound async_run_entry_fn
> [14249.341108]  0000000000000009 ffff88003aa9db60 ffffffff81658a4e ffff88003aa9dba8
> [14249.341115]  ffff88003aa9db98 ffffffff81048c3d ffff88006bc551b0 00000000fffffffe
> [14249.341121]  0000000000000000 ffff8800bec22838 0000000000000200 ffff88003aa9dbf8
> [14249.341127] Call Trace:
> [14249.341135]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
> [14249.341142]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
> [14249.341148]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
> [14249.341154]  [<ffffffff81660f17>] ? _raw_spin_unlock+0x27/0x40
> [14249.341159]  [<ffffffff8133748f>] kobject_add_internal+0x13f/0x350
> [14249.341163]  [<ffffffff813379b5>] kobject_add+0x65/0xb0
> [14249.341170]  [<ffffffff81425b40>] ? get_device+0x30/0x30
> [14249.341175]  [<ffffffff81649781>] ? klist_init+0x31/0x40
> [14249.341181]  [<ffffffff81427208>] device_add+0x128/0x660
> [14249.341186]  [<ffffffff814369cc>] ? __pm_runtime_resume+0x5c/0x90
> [14249.341193]  [<ffffffff8145bcdc>] scsi_sysfs_add_sdev+0xac/0x340
> [14249.341199]  [<ffffffff8145a443>] do_scan_async+0x83/0x180
> [14249.341204]  [<ffffffff81074247>] async_run_entry_fn+0x37/0x130
> [14249.341210]  [<ffffffff81066524>] process_one_work+0x1f4/0x550
> [14249.341215]  [<ffffffff810664c2>] ? process_one_work+0x192/0x550
> [14249.341220]  [<ffffffff81067261>] worker_thread+0x121/0x3a0
> [14249.341225]  [<ffffffff81067140>] ? manage_workers.isra.22+0x2a0/0x2a0
> [14249.341231]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
> [14249.341238]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> [14249.341243]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
> [14249.341249]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> [14249.341253] ---[ end trace 7f1d8a449e6af5aa ]---
> [14249.341259] scsi 6:0:0:0: failed to add device: -2

James:

The problem occurs when scsi_finish_async_scan() calls 
scsi_sysfs_add_devices().

During an async scan, the devices get stored up and not made visible as
they are found (see the end of scsi_add_lun()).  At the end, the target
gets removed because it has no visible children, of course.  Then when
the children do get added all at once, when the scan is over, it's too
late.

How should this be fixed?  Forget about the en-masse registration and 
do each device as it is found?

Alan Stern


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2013-12-18 21:50     ` Alan Stern
@ 2013-12-19  0:05       ` James Bottomley
  2013-12-19 18:26         ` Sarah Sharp
  0 siblings, 1 reply; 20+ messages in thread
From: James Bottomley @ 2013-12-19  0:05 UTC (permalink / raw)
  To: Alan Stern; +Cc: Sarah Sharp, linux-scsi, USB list

On Wed, 2013-12-18 at 16:50 -0500, Alan Stern wrote:
> On Wed, 18 Dec 2013, Sarah Sharp wrote:
> 
> > On Mon, Dec 16, 2013 at 07:10:19AM -0800, James Bottomley wrote:
> > > This set should fix our target problems with USB by making the target
> > > visibility properly reference counted.  Since it's a major change to the
> > > infrastructure, we'll incubate upstream first before backporting to
> > > stable.
> > > 
> > > James
> > 
> > I tried these patches, and they cause an oops when a USB mass storage
> > device is plugged in.  Note that this device uses the usb-storage
> > driver, not the uas driver.
> > 
> > [14248.340064] scsi6 : usb-storage 2-2:1.0
> > [14248.341083] usbcore: registered new interface driver usb-storage
> > [14248.346211] usbcore: registered new interface driver uas
> > [14249.339937] scsi 6:0:0:0: Direct-Access     Lexar    JumpDrive        1.00 PQ: 0 ANSI: 6
> > [14249.340988] ------------[ cut here ]------------
> > [14249.340999] WARNING: CPU: 3 PID: 5578 at lib/kobject.c:227 kobject_add_internal+0x13f/0x350()
> > [14249.341003] kobject_add_internal failed for 6:0:0:0 (error: -2 parent: target6:0:0)
> > [14249.341005] Modules linked in: uas usb_storage ctr ccm cuse dm_crypt uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev btusb x86_pkg_temp_thermal coretemp ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 iwldvm mac80211 microcode snd_hda_codec_hdmi iwlwifi psmouse snd_hda_codec_realtek serio_raw snd_hda_intel snd_usb_audio snd_hda_codec thinkpad_acpi cfg80211 joydev snd_usbmidi_lib nvram snd_hwdep snd_seq_midi snd_pcm snd_seq_midi_event snd_rawmidi lpc_ich rfcomm bnep snd_seq bluetooth snd_seq_device snd_page_alloc ehci_pci snd_timer ehci_hcd snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 ahci libahci e1000e sdhci_pci sdhci i2c_algo_bit drm_kms_helper ptp pps_core drm xhci_hcd vi
 deo
> > [14249.341095] CPU: 3 PID: 5578 Comm: kworker/u16:0 Not tainted 3.13.0-rc1+ #142
> > [14249.341098] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
> > [14249.341105] Workqueue: events_unbound async_run_entry_fn
> > [14249.341108]  0000000000000009 ffff88003aa9db60 ffffffff81658a4e ffff88003aa9dba8
> > [14249.341115]  ffff88003aa9db98 ffffffff81048c3d ffff88006bc551b0 00000000fffffffe
> > [14249.341121]  0000000000000000 ffff8800bec22838 0000000000000200 ffff88003aa9dbf8
> > [14249.341127] Call Trace:
> > [14249.341135]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
> > [14249.341142]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
> > [14249.341148]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
> > [14249.341154]  [<ffffffff81660f17>] ? _raw_spin_unlock+0x27/0x40
> > [14249.341159]  [<ffffffff8133748f>] kobject_add_internal+0x13f/0x350
> > [14249.341163]  [<ffffffff813379b5>] kobject_add+0x65/0xb0
> > [14249.341170]  [<ffffffff81425b40>] ? get_device+0x30/0x30
> > [14249.341175]  [<ffffffff81649781>] ? klist_init+0x31/0x40
> > [14249.341181]  [<ffffffff81427208>] device_add+0x128/0x660
> > [14249.341186]  [<ffffffff814369cc>] ? __pm_runtime_resume+0x5c/0x90
> > [14249.341193]  [<ffffffff8145bcdc>] scsi_sysfs_add_sdev+0xac/0x340
> > [14249.341199]  [<ffffffff8145a443>] do_scan_async+0x83/0x180
> > [14249.341204]  [<ffffffff81074247>] async_run_entry_fn+0x37/0x130
> > [14249.341210]  [<ffffffff81066524>] process_one_work+0x1f4/0x550
> > [14249.341215]  [<ffffffff810664c2>] ? process_one_work+0x192/0x550
> > [14249.341220]  [<ffffffff81067261>] worker_thread+0x121/0x3a0
> > [14249.341225]  [<ffffffff81067140>] ? manage_workers.isra.22+0x2a0/0x2a0
> > [14249.341231]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
> > [14249.341238]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> > [14249.341243]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
> > [14249.341249]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> > [14249.341253] ---[ end trace 7f1d8a449e6af5aa ]---
> > [14249.341259] scsi 6:0:0:0: failed to add device: -2
> 
> James:
> 
> The problem occurs when scsi_finish_async_scan() calls 
> scsi_sysfs_add_devices().
> 
> During an async scan, the devices get stored up and not made visible as
> they are found (see the end of scsi_add_lun()).  At the end, the target
> gets removed because it has no visible children, of course.  Then when
> the children do get added all at once, when the scan is over, it's too
> late.
> 
> How should this be fixed?  Forget about the en-masse registration and 
> do each device as it is found?

Great, I knew I'd find a reason to hate the async scanning code
eventually.

However, the solution is just to make the kref work for us.  We already
properly refcount everything, so we just take the reap_ref on the target
at the point the disk has to go through the remove device path, then
just rely on refcounting ... a bit like this.

James

---

diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 34eab7b..cc6e5bd 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -996,7 +996,6 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
 		return error;
 	}
 	transport_add_device(&sdev->sdev_gendev);
-	kref_get(&starget->reap_ref); /* device now visible, so target is held */
 	sdev->is_visible = 1;
 
 	/* create queue files, which may be writable, depending on the host */
@@ -1043,6 +1042,13 @@ void __scsi_remove_device(struct scsi_device *sdev)
 {
 	struct device *dev = &sdev->sdev_gendev;
 
+	/*
+	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
+	 * removing sysfs visibility from the device, so make the target
+	 * invisible if this was the last device underneath it.
+	 */
+	scsi_target_reap(scsi_target(sdev));
+
 	if (sdev->is_visible) {
 		if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
 			return;
@@ -1051,13 +1057,6 @@ void __scsi_remove_device(struct scsi_device *sdev)
 		device_unregister(&sdev->sdev_dev);
 		transport_remove_device(dev);
 		device_del(dev);
-		/*
-		 * Paired with the kref_get() in scsi_sysfs_add_sdev().  We're
-		 * removing sysfs visibility from the device, so make the
-		 * target invisible if this was the last device underneath it.
-		 */
-		scsi_target_reap(scsi_target(sdev));
-
 	} else
 		put_device(&sdev->sdev_dev);
 
@@ -1220,6 +1219,12 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev)
 	list_add_tail(&sdev->same_target_siblings, &starget->devices);
 	list_add_tail(&sdev->siblings, &shost->__devices);
 	spin_unlock_irqrestore(shost->host_lock, flags);
+	/*
+	 * device can now only be removed via __scsi_remove_device() so hold
+	 * the target.  Target will be held in CREATED state until something
+	 * beneath it becomes visible (in which case it moves to RUNNING)
+	 */
+	kref_get(&starget->reap_ref);
 }
 
 int scsi_is_sdev_device(const struct device *dev)




^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2013-12-19  0:05       ` James Bottomley
@ 2013-12-19 18:26         ` Sarah Sharp
  2013-12-19 19:48           ` James Bottomley
  0 siblings, 1 reply; 20+ messages in thread
From: Sarah Sharp @ 2013-12-19 18:26 UTC (permalink / raw)
  To: James Bottomley; +Cc: Alan Stern, linux-scsi, USB list

On Wed, Dec 18, 2013 at 04:05:05PM -0800, James Bottomley wrote:
> On Wed, 2013-12-18 at 16:50 -0500, Alan Stern wrote:
> > On Wed, 18 Dec 2013, Sarah Sharp wrote:
> > 
> > > On Mon, Dec 16, 2013 at 07:10:19AM -0800, James Bottomley wrote:
> > > > This set should fix our target problems with USB by making the target
> > > > visibility properly reference counted.  Since it's a major change to the
> > > > infrastructure, we'll incubate upstream first before backporting to
> > > > stable.
> > > > 
> > > > James
> > > 
> > > I tried these patches, and they cause an oops when a USB mass storage
> > > device is plugged in.  Note that this device uses the usb-storage
> > > driver, not the uas driver.
> > > 
> > > [14248.340064] scsi6 : usb-storage 2-2:1.0
> > > [14248.341083] usbcore: registered new interface driver usb-storage
> > > [14248.346211] usbcore: registered new interface driver uas
> > > [14249.339937] scsi 6:0:0:0: Direct-Access     Lexar    JumpDrive        1.00 PQ: 0 ANSI: 6
> > > [14249.340988] ------------[ cut here ]------------
> > > [14249.340999] WARNING: CPU: 3 PID: 5578 at lib/kobject.c:227 kobject_add_internal+0x13f/0x350()
> > > [14249.341003] kobject_add_internal failed for 6:0:0:0 (error: -2 parent: target6:0:0)
> > > [14249.341005] Modules linked in: uas usb_storage ctr ccm cuse dm_crypt uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev btusb x86_pkg_temp_thermal coretemp ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 iwldvm mac80211 microcode snd_hda_codec_hdmi iwlwifi psmouse snd_hda_codec_realtek serio_raw snd_hda_intel snd_usb_audio snd_hda_codec thinkpad_acpi cfg80211 joydev snd_usbmidi_lib nvram snd_hwdep snd_seq_midi snd_pcm snd_seq_midi_event snd_rawmidi lpc_ich rfcomm bnep snd_seq bluetooth snd_seq_device snd_page_alloc ehci_pci snd_timer ehci_hcd snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 ahci libahci e1000e sdhci_pci sdhci i2c_algo_bit drm_kms_helper ptp pps_core drm xhci_hcd 
 video
> > > [14249.341095] CPU: 3 PID: 5578 Comm: kworker/u16:0 Not tainted 3.13.0-rc1+ #142
> > > [14249.341098] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
> > > [14249.341105] Workqueue: events_unbound async_run_entry_fn
> > > [14249.341108]  0000000000000009 ffff88003aa9db60 ffffffff81658a4e ffff88003aa9dba8
> > > [14249.341115]  ffff88003aa9db98 ffffffff81048c3d ffff88006bc551b0 00000000fffffffe
> > > [14249.341121]  0000000000000000 ffff8800bec22838 0000000000000200 ffff88003aa9dbf8
> > > [14249.341127] Call Trace:
> > > [14249.341135]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
> > > [14249.341142]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
> > > [14249.341148]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
> > > [14249.341154]  [<ffffffff81660f17>] ? _raw_spin_unlock+0x27/0x40
> > > [14249.341159]  [<ffffffff8133748f>] kobject_add_internal+0x13f/0x350
> > > [14249.341163]  [<ffffffff813379b5>] kobject_add+0x65/0xb0
> > > [14249.341170]  [<ffffffff81425b40>] ? get_device+0x30/0x30
> > > [14249.341175]  [<ffffffff81649781>] ? klist_init+0x31/0x40
> > > [14249.341181]  [<ffffffff81427208>] device_add+0x128/0x660
> > > [14249.341186]  [<ffffffff814369cc>] ? __pm_runtime_resume+0x5c/0x90
> > > [14249.341193]  [<ffffffff8145bcdc>] scsi_sysfs_add_sdev+0xac/0x340
> > > [14249.341199]  [<ffffffff8145a443>] do_scan_async+0x83/0x180
> > > [14249.341204]  [<ffffffff81074247>] async_run_entry_fn+0x37/0x130
> > > [14249.341210]  [<ffffffff81066524>] process_one_work+0x1f4/0x550
> > > [14249.341215]  [<ffffffff810664c2>] ? process_one_work+0x192/0x550
> > > [14249.341220]  [<ffffffff81067261>] worker_thread+0x121/0x3a0
> > > [14249.341225]  [<ffffffff81067140>] ? manage_workers.isra.22+0x2a0/0x2a0
> > > [14249.341231]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
> > > [14249.341238]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> > > [14249.341243]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
> > > [14249.341249]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> > > [14249.341253] ---[ end trace 7f1d8a449e6af5aa ]---
> > > [14249.341259] scsi 6:0:0:0: failed to add device: -2
> > 
> > James:
> > 
> > The problem occurs when scsi_finish_async_scan() calls 
> > scsi_sysfs_add_devices().
> > 
> > During an async scan, the devices get stored up and not made visible as
> > they are found (see the end of scsi_add_lun()).  At the end, the target
> > gets removed because it has no visible children, of course.  Then when
> > the children do get added all at once, when the scan is over, it's too
> > late.
> > 
> > How should this be fixed?  Forget about the en-masse registration and 
> > do each device as it is found?
> 
> Great, I knew I'd find a reason to hate the async scanning code
> eventually.
> 
> However, the solution is just to make the kref work for us.  We already
> properly refcount everything, so we just take the reap_ref on the target
> at the point the disk has to go through the remove device path, then
> just rely on refcounting ... a bit like this.

Do you want me to test this?  If so, should I apply it on top of the
previous patches, or separately?

Sarah Sharp

> ---
> 
> diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
> index 34eab7b..cc6e5bd 100644
> --- a/drivers/scsi/scsi_sysfs.c
> +++ b/drivers/scsi/scsi_sysfs.c
> @@ -996,7 +996,6 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
>  		return error;
>  	}
>  	transport_add_device(&sdev->sdev_gendev);
> -	kref_get(&starget->reap_ref); /* device now visible, so target is held */
>  	sdev->is_visible = 1;
>  
>  	/* create queue files, which may be writable, depending on the host */
> @@ -1043,6 +1042,13 @@ void __scsi_remove_device(struct scsi_device *sdev)
>  {
>  	struct device *dev = &sdev->sdev_gendev;
>  
> +	/*
> +	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
> +	 * removing sysfs visibility from the device, so make the target
> +	 * invisible if this was the last device underneath it.
> +	 */
> +	scsi_target_reap(scsi_target(sdev));
> +
>  	if (sdev->is_visible) {
>  		if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
>  			return;
> @@ -1051,13 +1057,6 @@ void __scsi_remove_device(struct scsi_device *sdev)
>  		device_unregister(&sdev->sdev_dev);
>  		transport_remove_device(dev);
>  		device_del(dev);
> -		/*
> -		 * Paired with the kref_get() in scsi_sysfs_add_sdev().  We're
> -		 * removing sysfs visibility from the device, so make the
> -		 * target invisible if this was the last device underneath it.
> -		 */
> -		scsi_target_reap(scsi_target(sdev));
> -
>  	} else
>  		put_device(&sdev->sdev_dev);
>  
> @@ -1220,6 +1219,12 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev)
>  	list_add_tail(&sdev->same_target_siblings, &starget->devices);
>  	list_add_tail(&sdev->siblings, &shost->__devices);
>  	spin_unlock_irqrestore(shost->host_lock, flags);
> +	/*
> +	 * device can now only be removed via __scsi_remove_device() so hold
> +	 * the target.  Target will be held in CREATED state until something
> +	 * beneath it becomes visible (in which case it moves to RUNNING)
> +	 */
> +	kref_get(&starget->reap_ref);
>  }
>  
>  int scsi_is_sdev_device(const struct device *dev)
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2013-12-19 18:26         ` Sarah Sharp
@ 2013-12-19 19:48           ` James Bottomley
  2013-12-20 23:18             ` Sarah Sharp
  0 siblings, 1 reply; 20+ messages in thread
From: James Bottomley @ 2013-12-19 19:48 UTC (permalink / raw)
  To: Sarah Sharp; +Cc: Alan Stern, linux-scsi, USB list

On Thu, 2013-12-19 at 10:26 -0800, Sarah Sharp wrote:
> On Wed, Dec 18, 2013 at 04:05:05PM -0800, James Bottomley wrote:
> > On Wed, 2013-12-18 at 16:50 -0500, Alan Stern wrote:
> > > On Wed, 18 Dec 2013, Sarah Sharp wrote:
> > > 
> > > > On Mon, Dec 16, 2013 at 07:10:19AM -0800, James Bottomley wrote:
> > > > > This set should fix our target problems with USB by making the target
> > > > > visibility properly reference counted.  Since it's a major change to the
> > > > > infrastructure, we'll incubate upstream first before backporting to
> > > > > stable.
> > > > > 
> > > > > James
> > > > 
> > > > I tried these patches, and they cause an oops when a USB mass storage
> > > > device is plugged in.  Note that this device uses the usb-storage
> > > > driver, not the uas driver.
> > > > 
> > > > [14248.340064] scsi6 : usb-storage 2-2:1.0
> > > > [14248.341083] usbcore: registered new interface driver usb-storage
> > > > [14248.346211] usbcore: registered new interface driver uas
> > > > [14249.339937] scsi 6:0:0:0: Direct-Access     Lexar    JumpDrive        1.00 PQ: 0 ANSI: 6
> > > > [14249.340988] ------------[ cut here ]------------
> > > > [14249.340999] WARNING: CPU: 3 PID: 5578 at lib/kobject.c:227 kobject_add_internal+0x13f/0x350()
> > > > [14249.341003] kobject_add_internal failed for 6:0:0:0 (error: -2 parent: target6:0:0)
> > > > [14249.341005] Modules linked in: uas usb_storage ctr ccm cuse dm_crypt uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev btusb x86_pkg_temp_thermal coretemp ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 iwldvm mac80211 microcode snd_hda_codec_hdmi iwlwifi psmouse snd_hda_codec_realtek serio_raw snd_hda_intel snd_usb_audio snd_hda_codec thinkpad_acpi cfg80211 joydev snd_usbmidi_lib nvram snd_hwdep snd_seq_midi snd_pcm snd_seq_midi_event snd_rawmidi lpc_ich rfcomm bnep snd_seq bluetooth snd_seq_device snd_page_alloc ehci_pci snd_timer ehci_hcd snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 ahci libahci e1000e sdhci_pci sdhci i2c_algo_bit drm_kms_helper ptp pps_core drm xhci_hc
 d video
> > > > [14249.341095] CPU: 3 PID: 5578 Comm: kworker/u16:0 Not tainted 3.13.0-rc1+ #142
> > > > [14249.341098] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
> > > > [14249.341105] Workqueue: events_unbound async_run_entry_fn
> > > > [14249.341108]  0000000000000009 ffff88003aa9db60 ffffffff81658a4e ffff88003aa9dba8
> > > > [14249.341115]  ffff88003aa9db98 ffffffff81048c3d ffff88006bc551b0 00000000fffffffe
> > > > [14249.341121]  0000000000000000 ffff8800bec22838 0000000000000200 ffff88003aa9dbf8
> > > > [14249.341127] Call Trace:
> > > > [14249.341135]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
> > > > [14249.341142]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
> > > > [14249.341148]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
> > > > [14249.341154]  [<ffffffff81660f17>] ? _raw_spin_unlock+0x27/0x40
> > > > [14249.341159]  [<ffffffff8133748f>] kobject_add_internal+0x13f/0x350
> > > > [14249.341163]  [<ffffffff813379b5>] kobject_add+0x65/0xb0
> > > > [14249.341170]  [<ffffffff81425b40>] ? get_device+0x30/0x30
> > > > [14249.341175]  [<ffffffff81649781>] ? klist_init+0x31/0x40
> > > > [14249.341181]  [<ffffffff81427208>] device_add+0x128/0x660
> > > > [14249.341186]  [<ffffffff814369cc>] ? __pm_runtime_resume+0x5c/0x90
> > > > [14249.341193]  [<ffffffff8145bcdc>] scsi_sysfs_add_sdev+0xac/0x340
> > > > [14249.341199]  [<ffffffff8145a443>] do_scan_async+0x83/0x180
> > > > [14249.341204]  [<ffffffff81074247>] async_run_entry_fn+0x37/0x130
> > > > [14249.341210]  [<ffffffff81066524>] process_one_work+0x1f4/0x550
> > > > [14249.341215]  [<ffffffff810664c2>] ? process_one_work+0x192/0x550
> > > > [14249.341220]  [<ffffffff81067261>] worker_thread+0x121/0x3a0
> > > > [14249.341225]  [<ffffffff81067140>] ? manage_workers.isra.22+0x2a0/0x2a0
> > > > [14249.341231]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
> > > > [14249.341238]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> > > > [14249.341243]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
> > > > [14249.341249]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
> > > > [14249.341253] ---[ end trace 7f1d8a449e6af5aa ]---
> > > > [14249.341259] scsi 6:0:0:0: failed to add device: -2
> > > 
> > > James:
> > > 
> > > The problem occurs when scsi_finish_async_scan() calls 
> > > scsi_sysfs_add_devices().
> > > 
> > > During an async scan, the devices get stored up and not made visible as
> > > they are found (see the end of scsi_add_lun()).  At the end, the target
> > > gets removed because it has no visible children, of course.  Then when
> > > the children do get added all at once, when the scan is over, it's too
> > > late.
> > > 
> > > How should this be fixed?  Forget about the en-masse registration and 
> > > do each device as it is found?
> > 
> > Great, I knew I'd find a reason to hate the async scanning code
> > eventually.
> > 
> > However, the solution is just to make the kref work for us.  We already
> > properly refcount everything, so we just take the reap_ref on the target
> > at the point the disk has to go through the remove device path, then
> > just rely on refcounting ... a bit like this.
> 
> Do you want me to test this?  If so, should I apply it on top of the
> previous patches, or separately?

It should apply incrementally on top of the previous two.  If it
actually works, I'll fold it into the first patch.

Thanks,

James


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2013-12-19 19:48           ` James Bottomley
@ 2013-12-20 23:18             ` Sarah Sharp
  2013-12-21 20:51               ` Alan Stern
  0 siblings, 1 reply; 20+ messages in thread
From: Sarah Sharp @ 2013-12-20 23:18 UTC (permalink / raw)
  To: James Bottomley; +Cc: Alan Stern, linux-scsi, USB list

On Thu, Dec 19, 2013 at 11:48:47AM -0800, James Bottomley wrote:
> It should apply incrementally on top of the previous two.  If it
> actually works, I'll fold it into the first patch.

Well, it doesn't oops anymore, but it does generate a pile of warnings:

Dec 20 15:13:55 xanatos kernel: [   39.308652] usb usb2: usb wakeup-resume
Dec 20 15:13:55 xanatos kernel: [   39.308671] usb usb2: usb auto-resume
Dec 20 15:13:55 xanatos kernel: [   39.308688] hub 2-0:1.0: hub_resume
Dec 20 15:13:55 xanatos kernel: [   39.308759] hub 2-0:1.0: port 2: status 0203 change 0001
Dec 20 15:13:55 xanatos kernel: [   39.410694] hub 2-0:1.0: state 7 ports 4 chg 0004 evt 0000
Dec 20 15:13:55 xanatos kernel: [   39.410793] hub 2-0:1.0: port 2, status 0203, change 0000, 5.0 Gb/s
Dec 20 15:13:55 xanatos kernel: [   39.523217] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
Dec 20 15:13:55 xanatos kernel: [   39.539322] usb 2-2: skipped 1 descriptor after endpoint
Dec 20 15:13:55 xanatos kernel: [   39.539331] usb 2-2: skipped 1 descriptor after endpoint
Dec 20 15:13:55 xanatos kernel: [   39.539343] usb 2-2: skipped 2 descriptors after endpoint
Dec 20 15:13:55 xanatos kernel: [   39.539347] usb 2-2: skipped 2 descriptors after endpoint
Dec 20 15:13:55 xanatos kernel: [   39.539350] usb 2-2: skipped 2 descriptors after endpoint
Dec 20 15:13:55 xanatos kernel: [   39.539353] usb 2-2: skipped 2 descriptors after endpoint
Dec 20 15:13:55 xanatos kernel: [   39.539473] usb 2-2: default language 0x0409
Dec 20 15:13:55 xanatos kernel: [   39.539944] usb 2-2: udev 2, busnum 2, minor = 129
Dec 20 15:13:55 xanatos kernel: [   39.539949] usb 2-2: New USB device found, idVendor=174c, idProduct=55aa
Dec 20 15:13:55 xanatos kernel: [   39.539953] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Dec 20 15:13:55 xanatos kernel: [   39.539956] usb 2-2: Product: Plugable USB3-SATA-UASP1
Dec 20 15:13:55 xanatos kernel: [   39.539959] usb 2-2: Manufacturer: ASM1053E
Dec 20 15:13:55 xanatos kernel: [   39.539962] usb 2-2: SerialNumber: 123456789045
Dec 20 15:13:55 xanatos kernel: [   39.540325] usb 2-2: usb_probe_device
Dec 20 15:13:55 xanatos kernel: [   39.540329] usb 2-2: configuration #1 chosen from 1 choice
Dec 20 15:13:55 xanatos kernel: [   39.540984] usb 2-2: adding 2-2:1.0 (config #1, interface 0)
Dec 20 15:13:55 xanatos kernel: [   39.541449] hub 2-0:1.0: state 7 ports 4 chg 0000 evt 0004
Dec 20 15:13:55 xanatos kernel: [   39.803919] usb-storage 2-2:1.0: usb_probe_interface
Dec 20 15:13:55 xanatos kernel: [   39.803925] usb-storage 2-2:1.0: usb_probe_interface - got id
Dec 20 15:13:55 xanatos kernel: [   39.805481] usbcore: registered new interface driver usb-storage
Dec 20 15:13:55 xanatos kernel: [   39.813311] uas 2-2:1.0: usb_probe_interface
Dec 20 15:13:55 xanatos kernel: [   39.813316] uas 2-2:1.0: usb_probe_interface - got id
Dec 20 15:13:55 xanatos kernel: [   39.816517] scsi6 : uas
Dec 20 15:13:55 xanatos kernel: [   39.817396] usbcore: registered new interface driver uas
Dec 20 15:13:55 xanatos kernel: [   39.817800] scsi 6:0:0:0: Direct-Access     ASM1053E Plugable USB3-SA 0    PQ: 0 ANSI: 6
Dec 20 15:13:55 xanatos kernel: [   39.819074] sd 6:0:0:0: Attached scsi generic sg1 type 0
Dec 20 15:13:55 xanatos kernel: [   39.822442] sd 6:0:0:0: [sdb] 117231408 512-byte logical blocks: (60.0 GB/55.8 GiB)
Dec 20 15:13:55 xanatos kernel: [   39.823167] sd 6:0:0:0: [sdb] Write Protect is off
Dec 20 15:13:55 xanatos kernel: [   39.823170] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
Dec 20 15:13:55 xanatos kernel: [   39.823485] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Dec 20 15:13:55 xanatos kernel: [   39.826181]  sdb: sdb1 sdb2 sdb4
Dec 20 15:13:55 xanatos kernel: [   39.828846] sd 6:0:0:0: [sdb] Attached SCSI disk
Dec 20 15:13:56 xanatos kernel: [   40.488826] kjournald starting.  Commit interval 5 seconds
Dec 20 15:13:56 xanatos kernel: [   40.489106] EXT3-fs (sdb1): using internal journal
Dec 20 15:13:56 xanatos kernel: [   40.489109] EXT3-fs (sdb1): mounted filesystem with ordered data mode
Dec 20 15:13:56 xanatos kernel: [   40.500765] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
Dec 20 15:13:56 xanatos kernel: [   40.523432] FAT-fs (sdb4): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Dec 20 15:14:05 xanatos kernel: [   48.893833] hub 2-0:1.0: state 7 ports 4 chg 0000 evt 0004
Dec 20 15:14:05 xanatos kernel: [   48.893982] hub 2-0:1.0: warm reset port 2
Dec 20 15:14:05 xanatos kernel: [   48.932106] sd 6:0:0:0: [sdb] uas_cmd_cmplt ffff880097b1d000 tag 0, inflight: CMD IN
Dec 20 15:14:05 xanatos kernel: [   48.932112] sd 6:0:0:0: [sdb] cmd cmplt err -71
Dec 20 15:14:05 xanatos kernel: [   48.935707] sd 6:0:0:0: [sdb] uas_cmd_cmplt ffff880097b1ca00 tag 1, inflight: CMD IN
Dec 20 15:14:05 xanatos kernel: [   48.935727] sd 6:0:0:0: [sdb] cmd cmplt err -71
Dec 20 15:14:05 xanatos kernel: [   48.948901] hub 2-0:1.0: port 2 not warm reset yet, waiting 50ms
Dec 20 15:14:05 xanatos kernel: [   49.005322] hub 2-0:1.0: port 2, status 02c0, change 0041, 5.0 Gb/s
Dec 20 15:14:05 xanatos kernel: [   49.005327] usb 2-2: USB disconnect, device number 2
Dec 20 15:14:05 xanatos kernel: [   49.005329] usb 2-2: unregistering device
Dec 20 15:14:05 xanatos kernel: [   49.005331] usb 2-2: unregistering interface 2-2:1.0
Dec 20 15:14:05 xanatos kernel: [   49.005557] usb 2-2: usb_set_device_initiated_lpm: Can't disable U1 state for unconfigured device.
Dec 20 15:14:05 xanatos kernel: [   49.005589] usb 2-2: usb_set_device_initiated_lpm: Can't disable U2 state for unconfigured device.
Dec 20 15:14:05 xanatos kernel: [   49.005620] xhci_hcd 0000:00:14.0: shutdown urb ffff88009dd86e40 ep1in-bulk
Dec 20 15:14:05 xanatos kernel: [   49.005623] xhci_hcd 0000:00:14.0: shutdown urb ffff88009dd86540 ep1in-bulk
Dec 20 15:14:05 xanatos kernel: [   49.005664] sd 6:0:0:0: [sdb] uas_data_cmplt ffff880097b1d000 tag 0, inflight: CMD
Dec 20 15:14:05 xanatos kernel: [   49.005668] sd 6:0:0:0: [sdb] data cmplt err -108 stream 2
Dec 20 15:14:05 xanatos kernel: [   49.005676] sd 6:0:0:0: [sdb] uas_data_cmplt ffff880097b1ca00 tag 1, inflight: CMD
Dec 20 15:14:05 xanatos kernel: [   49.005678] sd 6:0:0:0: [sdb] data cmplt err -108 stream 3
Dec 20 15:14:05 xanatos kernel: [   49.005690] xhci_hcd 0000:00:14.0: shutdown urb ffff88009dd86f00 ep3in-bulk
Dec 20 15:14:05 xanatos kernel: [   49.005694] xhci_hcd 0000:00:14.0: shutdown urb ffff88009dd866c0 ep3in-bulk
Dec 20 15:14:05 xanatos kernel: [   49.005702] usb 2-2: stat urb: status -108
Dec 20 15:14:05 xanatos kernel: [   49.005714] usb 2-2: stat urb: status -108
Dec 20 15:14:05 xanatos kernel: [   49.005724] sd 6:0:0:0: [sdb] uas_disconnect ffff880097b1d000 tag 0, inflight: CMD
Dec 20 15:14:05 xanatos kernel: [   49.005726] sd 6:0:0:0: [sdb] uas_disconnect ffff880097b1ca00 tag 1, inflight: CMD
Dec 20 15:14:05 xanatos kernel: [   49.005728] sd 6:0:0:0: [sdb] uas_zap_dead ffff880097b1d000 tag 0, inflight: CMD abort
Dec 20 15:14:05 xanatos kernel: [   49.005730] sd 6:0:0:0: [sdb] abort completed
Dec 20 15:14:05 xanatos kernel: [   49.005733] sd 6:0:0:0: [sdb] uas_zap_dead ffff880097b1ca00 tag 1, inflight: CMD abort
Dec 20 15:14:05 xanatos kernel: [   49.005735] sd 6:0:0:0: [sdb] abort completed
Dec 20 15:14:05 xanatos kernel: [   49.006020] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.006026] WARNING: CPU: 0 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.006027] sysfs group ffffffff81ca3240 not found for kobject '6:0:0:0'
Dec 20 15:14:05 xanatos kernel: [   49.006028] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.006062] CPU: 0 PID: 34 Comm: khubd Not tainted 3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.006063] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.006064]  0000000000000009 ffff8801179f9a10 ffffffff81658a4e ffff8801179f9a58
Dec 20 15:14:05 xanatos kernel: [   49.006067]  ffff8801179f9a48 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.006069]  ffff8800992bfc10 ffff88010ab481a0 ffff8800c5674800 ffff8801179f9aa8
Dec 20 15:14:05 xanatos kernel: [   49.006072] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.006075]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.006079]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.006081]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.006083]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.006086]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.006088]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.006091]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.006094]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.006096]  [<ffffffff814263de>] device_unregister+0x1e/0x60
Dec 20 15:14:05 xanatos kernel: [   49.006099]  [<ffffffff81324390>] bsg_unregister_queue+0x60/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.006103]  [<ffffffff8145c009>] __scsi_remove_device+0xb9/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.006105]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.006108]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.006111]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.006114]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.006116]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.006119]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.006121]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.006123]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.006125]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.006127]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.006129]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.006132]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.006135]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.006137]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.006140]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.006143]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.006145]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.006147]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.006149] ---[ end trace 9806a4327f2ac457 ]---
Dec 20 15:14:05 xanatos kernel: [   49.006200] sd 6:0:0:0: [sdb] Unhandled error code
Dec 20 15:14:05 xanatos kernel: [   49.006204] sd 6:0:0:0: [sdb]  
Dec 20 15:14:05 xanatos kernel: [   49.006207] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Dec 20 15:14:05 xanatos kernel: [   49.006209] sd 6:0:0:0: [sdb] CDB: 
Dec 20 15:14:05 xanatos kernel: [   49.006212] Read(10): 28 00 01 8c 72 e0 00 01 00 00
Dec 20 15:14:05 xanatos kernel: [   49.006220] end_request: I/O error, dev sdb, sector 25981664
Dec 20 15:14:05 xanatos kernel: [   49.006296] sd 6:0:0:0: [sdb] Unhandled error code
Dec 20 15:14:05 xanatos kernel: [   49.006299] sd 6:0:0:0: [sdb]  
Dec 20 15:14:05 xanatos kernel: [   49.006300] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Dec 20 15:14:05 xanatos kernel: [   49.006301] sd 6:0:0:0: [sdb] CDB: 
Dec 20 15:14:05 xanatos kernel: [   49.006302] Read(10): 28 00 01 8c 73 e0 00 01 00 00
Dec 20 15:14:05 xanatos kernel: [   49.006307] end_request: I/O error, dev sdb, sector 25981920
Dec 20 15:14:05 xanatos kernel: [   49.009320] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.009330] WARNING: CPU: 3 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.009333] sysfs group ffffffff81ca3240 not found for kobject '6:0:0:0'
Dec 20 15:14:05 xanatos kernel: [   49.009334] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.009397] CPU: 3 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.009399] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.009401]  0000000000000009 ffff8801179f9a28 ffffffff81658a4e ffff8801179f9a70
Dec 20 15:14:05 xanatos kernel: [   49.009405]  ffff8801179f9a60 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.009409]  ffff88010ab485a8 ffff88010ab481a0 ffff8800c5674800 ffff8801179f9ac0
Dec 20 15:14:05 xanatos kernel: [   49.009413] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.009419]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.009424]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.009427]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.009431]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.009434]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.009437]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.009442]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.009446]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009449]  [<ffffffff814263de>] device_unregister+0x1e/0x60
Dec 20 15:14:05 xanatos kernel: [   49.009453]  [<ffffffff8145c015>] __scsi_remove_device+0xc5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.009457]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.009461]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.009466]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.009470]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.009474]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.009481]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.009489]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.009496]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009503]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.009510]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009518]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.009525]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.009533]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.009541]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009549]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.009557]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.009562]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.009565]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.009567] ---[ end trace 9806a4327f2ac458 ]---
Dec 20 15:14:05 xanatos kernel: [   49.009582] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.009585] WARNING: CPU: 3 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.009587] sysfs group ffffffff81ca3240 not found for kobject 'sg1'
Dec 20 15:14:05 xanatos kernel: [   49.009589] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.009642] CPU: 3 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.009644] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.009645]  0000000000000009 ffff8801179f9988 ffffffff81658a4e ffff8801179f99d0
Dec 20 15:14:05 xanatos kernel: [   49.009657]  ffff8801179f99c0 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.009670]  ffff8800b3691810 ffff88010ab481a0 0000000000000282 ffff8801179f9a20
Dec 20 15:14:05 xanatos kernel: [   49.009680] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.009683]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.009687]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.009690]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.009693]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.009697]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.009700]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.009703]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.009706]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009709]  [<ffffffff814263de>] device_unregister+0x1e/0x60
Dec 20 15:14:05 xanatos kernel: [   49.009712]  [<ffffffff8142649c>] device_destroy+0x3c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.009716]  [<ffffffff8146ccf9>] sg_remove+0xd9/0x140
Dec 20 15:14:05 xanatos kernel: [   49.009719]  [<ffffffff814262c1>] device_del+0xd1/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009722]  [<ffffffff814263de>] device_unregister+0x1e/0x60
Dec 20 15:14:05 xanatos kernel: [   49.009726]  [<ffffffff8145c015>] __scsi_remove_device+0xc5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.009729]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.009736]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.009743]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.009750]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.009758]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.009765]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.009768]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.009771]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009774]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.009777]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009780]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.009783]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.009787]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.009790]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.009793]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.009797]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.009800]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.009807]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.009811] ---[ end trace 9806a4327f2ac459 ]---
Dec 20 15:14:05 xanatos kernel: [   49.009991] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.009996] WARNING: CPU: 3 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.009998] sysfs group ffffffff81ca3240 not found for kobject '6:0:0:0'
Dec 20 15:14:05 xanatos kernel: [   49.009999] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.010049] CPU: 3 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.010050] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.010052]  0000000000000009 ffff8801179f9a40 ffffffff81658a4e ffff8801179f9a88
Dec 20 15:14:05 xanatos kernel: [   49.010056]  ffff8801179f9a78 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.010059]  ffff88010ab481b0 ffff8800c36f6828 ffff8800c5674800 ffff8801179f9ad8
Dec 20 15:14:05 xanatos kernel: [   49.010062] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.010065]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.010069]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.010072]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.010075]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.010078]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.010082]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.010085]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.010088]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010092]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.010095]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.010099]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.010103]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.010106]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.010109]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.010113]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.010116]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.010119]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010122]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.010125]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010128]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.010131]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.010135]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.010138]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010141]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.010145]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.010148]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.010152]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.010154] ---[ end trace 9806a4327f2ac45a ]---
Dec 20 15:14:05 xanatos kernel: [   49.010177] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.010181] WARNING: CPU: 3 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.010183] sysfs group ffffffff81ca3240 not found for kobject '6:0:0:0'
Dec 20 15:14:05 xanatos kernel: [   49.010184] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.010238] CPU: 3 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.010240] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.010241]  0000000000000009 ffff8801179f9978 ffffffff81658a4e ffff8801179f99c0
Dec 20 15:14:05 xanatos kernel: [   49.010245]  ffff8801179f99b0 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.010249]  ffff8800c36f5020 ffff88010ab481a0 ffff8800c5674800 ffff8801179f9a10
Dec 20 15:14:05 xanatos kernel: [   49.010253] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.010257]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.010260]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.010263]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.010266]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.010269]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.010273]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.010276]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.010279]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010283]  [<ffffffff81463e5d>] sd_remove+0x6d/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.010286]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.010289]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.010293]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.010295]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010299]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.010302]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.010306]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.010309]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.010312]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.010316]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.010319]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.010322]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.010325]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010328]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.010331]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010334]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.010339]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.010348]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.010356]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.010364]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.010372]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.010381]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.010389]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.010393] ---[ end trace 9806a4327f2ac45b ]---
Dec 20 15:14:05 xanatos kernel: [   49.029886] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.029896] WARNING: CPU: 3 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.029898] sysfs group ffffffff81ca3240 not found for kobject 'sdb4'
Dec 20 15:14:05 xanatos kernel: [   49.029900] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.029962] CPU: 3 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.029965] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.029968]  0000000000000009 ffff8801179f9920 ffffffff81658a4e ffff8801179f9968
Dec 20 15:14:05 xanatos kernel: [   49.029974]  ffff8801179f9958 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.029978]  ffff8800c5670858 ffff8800c36f6090 ffff8800c5674800 ffff8801179f99b8
Dec 20 15:14:05 xanatos kernel: [   49.029982] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.030010]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.030028]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.030031]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.030043]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.030049]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.030052]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.030066]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.030081]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030100]  [<ffffffff8131dc88>] delete_partition+0x48/0x80
Dec 20 15:14:05 xanatos kernel: [   49.030105]  [<ffffffff8131c0a0>] del_gendisk+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.030123]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.030129]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.030132]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.030137]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.030140]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030155]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.030160]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.030178]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.030190]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.030205]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.030209]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.030212]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.030215]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.030218]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030222]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.030239]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030243]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.030251]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.030265]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.030268]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030284]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.030288]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.030295]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.030298]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.030300] ---[ end trace 9806a4327f2ac45c ]---
Dec 20 15:14:05 xanatos kernel: [   49.030573] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.030588] WARNING: CPU: 3 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.030589] sysfs group ffffffff81c548e0 not found for kobject 'sdb4'
Dec 20 15:14:05 xanatos kernel: [   49.030590] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.030644] CPU: 3 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.030646] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.030647]  0000000000000009 ffff8801179f98e0 ffffffff81658a4e ffff8801179f9928
Dec 20 15:14:05 xanatos kernel: [   49.030650]  ffff8801179f9918 ffffffff81048c3d 0000000000000000 ffffffff81c548e0
Dec 20 15:14:05 xanatos kernel: [   49.030653]  ffff8800c5670858 ffffffff81c89220 ffff8800c5674800 ffff8801179f9978
Dec 20 15:14:05 xanatos kernel: [   49.030658] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.030663]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.030668]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.030671]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.030674]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.030682]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.030686]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.030690]  [<ffffffff81224973>] sysfs_remove_groups+0x33/0x50
Dec 20 15:14:05 xanatos kernel: [   49.030694]  [<ffffffff8142577e>] device_remove_attrs+0x5e/0x80
Dec 20 15:14:05 xanatos kernel: [   49.030697]  [<ffffffff8142631e>] device_del+0x12e/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030700]  [<ffffffff8131dc88>] delete_partition+0x48/0x80
Dec 20 15:14:05 xanatos kernel: [   49.030703]  [<ffffffff8131c0a0>] del_gendisk+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.030716]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.030721]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.030724]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.030727]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.030729]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030734]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.030737]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.030744]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.030749]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.030754]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.030758]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.030762]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.030765]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.030767]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030771]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.030774]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030776]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.030779]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.030783]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.030785]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.030789]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.030793]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.030796]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.030799]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.030801] ---[ end trace 9806a4327f2ac45d ]---
Dec 20 15:14:05 xanatos kernel: [   49.031386] end_request: I/O error, dev sdb, sector 0
Dec 20 15:14:05 xanatos kernel: [   49.033277] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.033287] WARNING: CPU: 0 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.033289] sysfs group ffffffff81ca3240 not found for kobject 'sdb2'
Dec 20 15:14:05 xanatos kernel: [   49.033290] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.033355] CPU: 0 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.033357] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.033359]  0000000000000009 ffff8801179f9920 ffffffff81658a4e ffff8801179f9968
Dec 20 15:14:05 xanatos kernel: [   49.033363]  ffff8801179f9958 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.033366]  ffff8800c5672858 ffff8800c36f6090 ffff8800c5674800 ffff8801179f99b8
Dec 20 15:14:05 xanatos kernel: [   49.033371] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.033376]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.033381]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.033385]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.033388]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.033391]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.033394]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.033399]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.033402]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033407]  [<ffffffff8131dc88>] delete_partition+0x48/0x80
Dec 20 15:14:05 xanatos kernel: [   49.033410]  [<ffffffff8131c0a0>] del_gendisk+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.033414]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.033418]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.033421]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.033424]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.033426]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033431]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.033434]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.033439]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.033443]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.033447]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.033450]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.033453]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.033456]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.033459]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033461]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.033465]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033469]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.033472]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.033476]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.033479]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033483]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.033487]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.033490]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.033494]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.033497] ---[ end trace 9806a4327f2ac45e ]---
Dec 20 15:14:05 xanatos kernel: [   49.033626] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.033630] WARNING: CPU: 0 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.033632] sysfs group ffffffff81c548e0 not found for kobject 'sdb2'
Dec 20 15:14:05 xanatos kernel: [   49.033634] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.033690] CPU: 0 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.033691] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.033693]  0000000000000009 ffff8801179f98e0 ffffffff81658a4e ffff8801179f9928
Dec 20 15:14:05 xanatos kernel: [   49.033697]  ffff8801179f9918 ffffffff81048c3d 0000000000000000 ffffffff81c548e0
Dec 20 15:14:05 xanatos kernel: [   49.033701]  ffff8800c5672858 ffffffff81c89220 ffff8800c5674800 ffff8801179f9978
Dec 20 15:14:05 xanatos kernel: [   49.033705] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.033709]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.033713]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.033716]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.033720]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.033723]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.033726]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.033730]  [<ffffffff81224973>] sysfs_remove_groups+0x33/0x50
Dec 20 15:14:05 xanatos kernel: [   49.033733]  [<ffffffff8142577e>] device_remove_attrs+0x5e/0x80
Dec 20 15:14:05 xanatos kernel: [   49.033736]  [<ffffffff8142631e>] device_del+0x12e/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033740]  [<ffffffff8131dc88>] delete_partition+0x48/0x80
Dec 20 15:14:05 xanatos kernel: [   49.033744]  [<ffffffff8131c0a0>] del_gendisk+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.033748]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.033751]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.033755]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.033758]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.033762]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033765]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.033769]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.033772]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.033776]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.033780]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.033783]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.033787]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.033790]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.033793]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033796]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.033800]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033803]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.033806]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.033810]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.033813]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.033817]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.033821]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.033825]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.033828]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.033830] ---[ end trace 9806a4327f2ac45f ]---
Dec 20 15:14:05 xanatos kernel: [   49.036741] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.036751] WARNING: CPU: 0 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.036754] sysfs group ffffffff81ca3240 not found for kobject 'sdb1'
Dec 20 15:14:05 xanatos kernel: [   49.036755] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.036820] CPU: 0 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.036822] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.036824]  0000000000000009 ffff8801179f9920 ffffffff81658a4e ffff8801179f9968
Dec 20 15:14:05 xanatos kernel: [   49.036829]  ffff8801179f9958 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.036833]  ffff8800c5673058 ffff8800c36f6090 ffff8800c5674800 ffff8801179f99b8
Dec 20 15:14:05 xanatos kernel: [   49.036837] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.036842]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.036848]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.036851]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.036855]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.036859]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.036862]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.036867]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.036871]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.036875]  [<ffffffff8131dc88>] delete_partition+0x48/0x80
Dec 20 15:14:05 xanatos kernel: [   49.036879]  [<ffffffff8131c0a0>] del_gendisk+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.036884]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.036888]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.036892]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.036895]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.036898]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.036926]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.036930]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.036935]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.036940]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.036943]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.036947]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.036950]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.036953]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.036955]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.036958]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.036962]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.036965]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.036969]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.036973]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.036976]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.036980]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.036984]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.036987]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.036991]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.036993] ---[ end trace 9806a4327f2ac460 ]---
Dec 20 15:14:05 xanatos kernel: [   49.037757] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.037763] WARNING: CPU: 0 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.037765] sysfs group ffffffff81c548e0 not found for kobject 'sdb1'
Dec 20 15:14:05 xanatos kernel: [   49.037767] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.037829] CPU: 0 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.037831] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.037832]  0000000000000009 ffff8801179f98e0 ffffffff81658a4e ffff8801179f9928
Dec 20 15:14:05 xanatos kernel: [   49.037837]  ffff8801179f9918 ffffffff81048c3d 0000000000000000 ffffffff81c548e0
Dec 20 15:14:05 xanatos kernel: [   49.037842]  ffff8800c5673058 ffffffff81c89220 ffff8800c5674800 ffff8801179f9978
Dec 20 15:14:05 xanatos kernel: [   49.037846] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.037851]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.037856]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.037860]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.037863]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.037867]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.037870]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.037874]  [<ffffffff81224973>] sysfs_remove_groups+0x33/0x50
Dec 20 15:14:05 xanatos kernel: [   49.037878]  [<ffffffff8142577e>] device_remove_attrs+0x5e/0x80
Dec 20 15:14:05 xanatos kernel: [   49.037881]  [<ffffffff8142631e>] device_del+0x12e/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.037886]  [<ffffffff8131dc88>] delete_partition+0x48/0x80
Dec 20 15:14:05 xanatos kernel: [   49.037890]  [<ffffffff8131c0a0>] del_gendisk+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.037894]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.037898]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.037901]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.037905]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.037908]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.037913]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.037916]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.037921]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.037925]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.037929]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.037933]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.037936]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.037940]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.037943]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.037946]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.037949]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.037953]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.037956]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.037960]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.037964]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.037968]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.037972]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.037976]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.037980]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.037982] ---[ end trace 9806a4327f2ac461 ]---
Dec 20 15:14:05 xanatos kernel: [   49.043545] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.043555] WARNING: CPU: 0 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.043557] sysfs group ffffffff81c548e0 not found for kobject 'sdb'
Dec 20 15:14:05 xanatos kernel: [   49.043559] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.043621] CPU: 0 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.043623] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.043625]  0000000000000009 ffff8801179f9950 ffffffff81658a4e ffff8801179f9998
Dec 20 15:14:05 xanatos kernel: [   49.043629]  ffff8801179f9988 ffffffff81048c3d 0000000000000000 ffffffff81c548e0
Dec 20 15:14:05 xanatos kernel: [   49.043633]  ffff8800c36f60a0 0000000000800010 ffff8800c5674800 ffff8801179f99e8
Dec 20 15:14:05 xanatos kernel: [   49.043637] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.043643]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.043648]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.043651]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.043655]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.043658]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.043662]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.043666]  [<ffffffff81119c54>] blk_trace_remove_sysfs+0x14/0x20
Dec 20 15:14:05 xanatos kernel: [   49.043670]  [<ffffffff813103a8>] blk_unregister_queue+0x68/0x90
Dec 20 15:14:05 xanatos kernel: [   49.043674]  [<ffffffff8131c111>] del_gendisk+0x121/0x290
Dec 20 15:14:05 xanatos kernel: [   49.043678]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.043682]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.043685]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.043688]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.043691]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043695]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.043698]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.043702]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.043707]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.043710]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.043713]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.043717]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.043720]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.043722]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043725]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.043729]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043732]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.043735]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.043739]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.043742]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043746]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.043750]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.043754]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.043757]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.043760] ---[ end trace 9806a4327f2ac462 ]---
Dec 20 15:14:05 xanatos kernel: [   49.043789] ------------[ cut here ]------------
Dec 20 15:14:05 xanatos kernel: [   49.043793] WARNING: CPU: 0 PID: 34 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
Dec 20 15:14:05 xanatos kernel: [   49.043794] sysfs group ffffffff81ca3240 not found for kobject 'sdb'
Dec 20 15:14:05 xanatos kernel: [   49.043795] Modules linked in: nls_iso8859_1 uas usb_storage cuse dm_crypt uvcvideo x86_pkg_temp_thermal coretemp ghash_clmulni_intel videobuf2_vmalloc videobuf2_memops videobuf2_core videodev aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd arc4 snd_hda_codec_hdmi iwldvm mac80211 microcode psmouse snd_usb_audio thinkpad_acpi iwlwifi snd_usbmidi_lib snd_hda_codec_realtek nvram serio_raw snd_seq_midi snd_seq_midi_event snd_hda_intel snd_rawmidi joydev snd_seq snd_hda_codec cfg80211 snd_hwdep snd_pcm bnep rfcomm snd_page_alloc ehci_pci lpc_ich bluetooth ehci_hcd snd_seq_device snd_timer snd soundcore tpm_tis binfmt_misc btrfs libcrc32c xor raid6_pq hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper drm e1000e ahci sdhci_pci libahci sd
 hci ptp xhci_hcd pps_core video
Dec 20 15:14:05 xanatos kernel: [   49.043852] CPU: 0 PID: 34 Comm: khubd Tainted: G        W    3.13.0-rc1+ #153
Dec 20 15:14:05 xanatos kernel: [   49.043854] Hardware name: LENOVO 2325AP7/2325AP7, BIOS G2ET82WW (2.02 ) 09/11/2012
Dec 20 15:14:05 xanatos kernel: [   49.043855]  0000000000000009 ffff8801179f9938 ffffffff81658a4e ffff8801179f9980
Dec 20 15:14:05 xanatos kernel: [   49.043859]  ffff8801179f9970 ffffffff81048c3d 0000000000000000 ffffffff81ca3240
Dec 20 15:14:05 xanatos kernel: [   49.043863]  ffff8800c36f60a0 ffff88010ab481a0 ffff8800c5674800 ffff8801179f99d0
Dec 20 15:14:05 xanatos kernel: [   49.043866] Call Trace:
Dec 20 15:14:05 xanatos kernel: [   49.043871]  [<ffffffff81658a4e>] dump_stack+0x4d/0x66
Dec 20 15:14:05 xanatos kernel: [   49.043875]  [<ffffffff81048c3d>] warn_slowpath_common+0x7d/0xa0
Dec 20 15:14:05 xanatos kernel: [   49.043878]  [<ffffffff81048cac>] warn_slowpath_fmt+0x4c/0x50
Dec 20 15:14:05 xanatos kernel: [   49.043882]  [<ffffffff8165f6ce>] ? mutex_unlock+0xe/0x10
Dec 20 15:14:05 xanatos kernel: [   49.043885]  [<ffffffff81223550>] ? sysfs_get_dirent_ns+0x50/0x70
Dec 20 15:14:05 xanatos kernel: [   49.043888]  [<ffffffff81224896>] sysfs_remove_group+0xc6/0xd0
Dec 20 15:14:05 xanatos kernel: [   49.043892]  [<ffffffff81430483>] dpm_sysfs_remove+0x43/0x50
Dec 20 15:14:05 xanatos kernel: [   49.043895]  [<ffffffff81426235>] device_del+0x45/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043900]  [<ffffffff8131c24f>] del_gendisk+0x25f/0x290
Dec 20 15:14:05 xanatos kernel: [   49.043904]  [<ffffffff81463e69>] sd_remove+0x79/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.043907]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.043910]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.043914]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.043916]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043920]  [<ffffffff8145c025>] __scsi_remove_device+0xd5/0xe0
Dec 20 15:14:05 xanatos kernel: [   49.043923]  [<ffffffff8145a5af>] scsi_forget_host+0x6f/0x80
Dec 20 15:14:05 xanatos kernel: [   49.043928]  [<ffffffff8144ee96>] scsi_remove_host+0x76/0x130
Dec 20 15:14:05 xanatos kernel: [   49.043931]  [<ffffffffa05ab07d>] uas_disconnect+0x7d/0xa0 [uas]
Dec 20 15:14:05 xanatos kernel: [   49.043935]  [<ffffffff814b7287>] usb_unbind_interface+0x77/0x2b0
Dec 20 15:14:05 xanatos kernel: [   49.043938]  [<ffffffff8142a03f>] __device_release_driver+0x7f/0xf0
Dec 20 15:14:05 xanatos kernel: [   49.043942]  [<ffffffff8142a0d5>] device_release_driver+0x25/0x40
Dec 20 15:14:05 xanatos kernel: [   49.043945]  [<ffffffff8142993c>] bus_remove_device+0x11c/0x1a0
Dec 20 15:14:05 xanatos kernel: [   49.043948]  [<ffffffff81426326>] device_del+0x136/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043951]  [<ffffffff814b4b90>] usb_disable_device+0xb0/0x290
Dec 20 15:14:05 xanatos kernel: [   49.043955]  [<ffffffff814a92e5>] usb_disconnect+0xb5/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043958]  [<ffffffff814ac526>] hub_thread+0x616/0x1710
Dec 20 15:14:05 xanatos kernel: [   49.043961]  [<ffffffff8109812d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
Dec 20 15:14:05 xanatos kernel: [   49.043965]  [<ffffffff8108eb10>] ? prepare_to_wait_event+0x100/0x100
Dec 20 15:14:05 xanatos kernel: [   49.043968]  [<ffffffff814abf10>] ? usb_reset_device+0x1d0/0x1d0
Dec 20 15:14:05 xanatos kernel: [   49.043972]  [<ffffffff8106dc8c>] kthread+0xfc/0x120
Dec 20 15:14:05 xanatos kernel: [   49.043976]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.043980]  [<ffffffff81669cac>] ret_from_fork+0x7c/0xb0
Dec 20 15:14:05 xanatos kernel: [   49.043983]  [<ffffffff8106db90>] ? kthread_create_on_node+0x230/0x230
Dec 20 15:14:05 xanatos kernel: [   49.043985] ---[ end trace 9806a4327f2ac463 ]---
Dec 20 15:14:05 xanatos kernel: [   49.044151] sd 6:0:0:0: [sdb] Synchronizing SCSI cache
Dec 20 15:14:05 xanatos kernel: [   49.069556] EXT3-fs (sdb1): I/O error while writing superblock
Dec 20 15:14:05 xanatos kernel: [   49.113015] end_request: I/O error, dev sdb, sector 0
Dec 20 15:14:05 xanatos kernel: [   49.113424] JBD2: Error -5 detected when updating journal superblock for sdb2-8.
Dec 20 15:14:05 xanatos kernel: [   49.149033] sd 6:0:0:0: [sdb]  
Dec 20 15:14:05 xanatos kernel: [   49.149038] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
Dec 20 15:14:05 xanatos kernel: [   49.149884] usb 2-2: usb_set_device_initiated_lpm: Can't enable U1 state for unconfigured device.
Dec 20 15:14:05 xanatos kernel: [   49.149943] usb 2-2: usb_set_device_initiated_lpm: Can't enable U2 state for unconfigured device.
Dec 20 15:14:05 xanatos kernel: [   49.150028] usb 2-2: usb_set_device_initiated_lpm: Can't disable U1 state for unconfigured device.
Dec 20 15:14:05 xanatos kernel: [   49.150059] usb 2-2: usb_set_device_initiated_lpm: Can't disable U2 state for unconfigured device.
Dec 20 15:14:05 xanatos kernel: [   49.150082] usb 2-2: usb_disable_device nuking all URBs
Dec 20 15:14:05 xanatos kernel: [   49.279627] hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x2a0
Dec 20 15:14:05 xanatos kernel: [   49.279635] hub 2-0:1.0: state 7 ports 4 chg 0000 evt 0004
Dec 20 15:14:05 xanatos kernel: [   49.279784] hub 2-0:1.0: hub_suspend
Dec 20 15:14:05 xanatos kernel: [   49.279795] usb usb2: bus auto-suspend, wakeup 1

Sarah Sharp

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2013-12-20 23:18             ` Sarah Sharp
@ 2013-12-21 20:51               ` Alan Stern
  2014-01-03  0:34                 ` James Bottomley
       [not found]                 ` <Pine.LNX.4.44L0.1312211547490.12252-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
  0 siblings, 2 replies; 20+ messages in thread
From: Alan Stern @ 2013-12-21 20:51 UTC (permalink / raw)
  To: Sarah Sharp; +Cc: James Bottomley, linux-scsi, USB list

On Fri, 20 Dec 2013, Sarah Sharp wrote:

> On Thu, Dec 19, 2013 at 11:48:47AM -0800, James Bottomley wrote:
> > It should apply incrementally on top of the previous two.  If it
> > actually works, I'll fold it into the first patch.
> 
> Well, it doesn't oops anymore, but it does generate a pile of warnings:

This was a simple oversight.  scsi_target_reap() was called at the
start of __scsi_remove_device(), but it should be called at the end.
The patch below, applied on top of James's three patches, will fix the
warnings.

Alan Stern

P.S.: The comment isn't entirely correct any more...



Index: usb-3.13/drivers/scsi/scsi_sysfs.c
===================================================================
--- usb-3.13.orig/drivers/scsi/scsi_sysfs.c
+++ usb-3.13/drivers/scsi/scsi_sysfs.c
@@ -1028,13 +1028,6 @@ void __scsi_remove_device(struct scsi_de
 {
 	struct device *dev = &sdev->sdev_gendev;
 
-	/*
-	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
-	 * removing sysfs visibility from the device, so make the target
-	 * invisible if this was the last device underneath it.
-	 */
-	scsi_target_reap(scsi_target(sdev));
-
 	if (sdev->is_visible) {
 		if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
 			return;
@@ -1059,6 +1052,13 @@ void __scsi_remove_device(struct scsi_de
 		sdev->host->hostt->slave_destroy(sdev);
 	transport_destroy_device(dev);
 
+	/*
+	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
+	 * removing sysfs visibility from the device, so make the target
+	 * invisible if this was the last device underneath it.
+	 */
+	scsi_target_reap(scsi_target(sdev));
+
 	put_device(dev);
 }
 


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2013-12-21 20:51               ` Alan Stern
@ 2014-01-03  0:34                 ` James Bottomley
       [not found]                 ` <Pine.LNX.4.44L0.1312211547490.12252-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
  1 sibling, 0 replies; 20+ messages in thread
From: James Bottomley @ 2014-01-03  0:34 UTC (permalink / raw)
  To: Alan Stern; +Cc: Sarah Sharp, linux-scsi, USB list

On Sat, 2013-12-21 at 15:51 -0500, Alan Stern wrote:
> On Fri, 20 Dec 2013, Sarah Sharp wrote:
> 
> > On Thu, Dec 19, 2013 at 11:48:47AM -0800, James Bottomley wrote:
> > > It should apply incrementally on top of the previous two.  If it
> > > actually works, I'll fold it into the first patch.
> > 
> > Well, it doesn't oops anymore, but it does generate a pile of warnings:
> 
> This was a simple oversight.  scsi_target_reap() was called at the
> start of __scsi_remove_device(), but it should be called at the end.
> The patch below, applied on top of James's three patches, will fix the
> warnings.

Thanks, I'll do a repost of the combined series

> Alan Stern
> 
> P.S.: The comment isn't entirely correct any more...

Yes, fixed the tense.

James



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
       [not found]                 ` <Pine.LNX.4.44L0.1312211547490.12252-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2014-01-03  0:45                   ` Sarah Sharp
  2014-01-03  7:46                     ` James Bottomley
  2014-01-03  8:56                     ` Hans de Goede
  0 siblings, 2 replies; 20+ messages in thread
From: Sarah Sharp @ 2014-01-03  0:45 UTC (permalink / raw)
  To: Alan Stern; +Cc: James Bottomley, linux-scsi, USB list, Hans de Goede

On Sat, Dec 21, 2013 at 03:51:25PM -0500, Alan Stern wrote:
> On Fri, 20 Dec 2013, Sarah Sharp wrote:
> 
> > On Thu, Dec 19, 2013 at 11:48:47AM -0800, James Bottomley wrote:
> > > It should apply incrementally on top of the previous two.  If it
> > > actually works, I'll fold it into the first patch.
> > 
> > Well, it doesn't oops anymore, but it does generate a pile of warnings:
> 
> This was a simple oversight.  scsi_target_reap() was called at the
> start of __scsi_remove_device(), but it should be called at the end.
> The patch below, applied on top of James's three patches, will fix the
> warnings.
> 
> Alan Stern
> 
> P.S.: The comment isn't entirely correct any more...

Ok, Alan's additional patch fixed the warnings I was seeing on UAS
device unplug.  James, can you Cc me on the finished patch when you send
it in?

Hans, I don't want to send the UAS patches off to Greg until James'
patches get into mainline.  I believe Greg's usb-next tree is frozen at
this point, so they'll have to wait until 3.15.

Sarah Sharp

> Index: usb-3.13/drivers/scsi/scsi_sysfs.c
> ===================================================================
> --- usb-3.13.orig/drivers/scsi/scsi_sysfs.c
> +++ usb-3.13/drivers/scsi/scsi_sysfs.c
> @@ -1028,13 +1028,6 @@ void __scsi_remove_device(struct scsi_de
>  {
>  	struct device *dev = &sdev->sdev_gendev;
>  
> -	/*
> -	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
> -	 * removing sysfs visibility from the device, so make the target
> -	 * invisible if this was the last device underneath it.
> -	 */
> -	scsi_target_reap(scsi_target(sdev));
> -
>  	if (sdev->is_visible) {
>  		if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
>  			return;
> @@ -1059,6 +1052,13 @@ void __scsi_remove_device(struct scsi_de
>  		sdev->host->hostt->slave_destroy(sdev);
>  	transport_destroy_device(dev);
>  
> +	/*
> +	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
> +	 * removing sysfs visibility from the device, so make the target
> +	 * invisible if this was the last device underneath it.
> +	 */
> +	scsi_target_reap(scsi_target(sdev));
> +
>  	put_device(dev);
>  }
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2014-01-03  0:45                   ` Sarah Sharp
@ 2014-01-03  7:46                     ` James Bottomley
  2014-01-03  8:56                     ` Hans de Goede
  1 sibling, 0 replies; 20+ messages in thread
From: James Bottomley @ 2014-01-03  7:46 UTC (permalink / raw)
  To: Sarah Sharp; +Cc: Alan Stern, linux-scsi, USB list, Hans de Goede

On Thu, 2014-01-02 at 16:45 -0800, Sarah Sharp wrote:
> On Sat, Dec 21, 2013 at 03:51:25PM -0500, Alan Stern wrote:
> > On Fri, 20 Dec 2013, Sarah Sharp wrote:
> > 
> > > On Thu, Dec 19, 2013 at 11:48:47AM -0800, James Bottomley wrote:
> > > > It should apply incrementally on top of the previous two.  If it
> > > > actually works, I'll fold it into the first patch.
> > > 
> > > Well, it doesn't oops anymore, but it does generate a pile of warnings:
> > 
> > This was a simple oversight.  scsi_target_reap() was called at the
> > start of __scsi_remove_device(), but it should be called at the end.
> > The patch below, applied on top of James's three patches, will fix the
> > warnings.
> > 
> > Alan Stern
> > 
> > P.S.: The comment isn't entirely correct any more...
> 
> Ok, Alan's additional patch fixed the warnings I was seeing on UAS
> device unplug.  James, can you Cc me on the finished patch when you send
> it in?

A bit late: it's here, but it should be on your usb list as well:

http://marc.info/?l=linux-scsi&m=138870949118304

James

> Hans, I don't want to send the UAS patches off to Greg until James'
> patches get into mainline.  I believe Greg's usb-next tree is frozen at
> this point, so they'll have to wait until 3.15.
> 
> Sarah Sharp
> 
> > Index: usb-3.13/drivers/scsi/scsi_sysfs.c
> > ===================================================================
> > --- usb-3.13.orig/drivers/scsi/scsi_sysfs.c
> > +++ usb-3.13/drivers/scsi/scsi_sysfs.c
> > @@ -1028,13 +1028,6 @@ void __scsi_remove_device(struct scsi_de
> >  {
> >  	struct device *dev = &sdev->sdev_gendev;
> >  
> > -	/*
> > -	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
> > -	 * removing sysfs visibility from the device, so make the target
> > -	 * invisible if this was the last device underneath it.
> > -	 */
> > -	scsi_target_reap(scsi_target(sdev));
> > -
> >  	if (sdev->is_visible) {
> >  		if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
> >  			return;
> > @@ -1059,6 +1052,13 @@ void __scsi_remove_device(struct scsi_de
> >  		sdev->host->hostt->slave_destroy(sdev);
> >  	transport_destroy_device(dev);
> >  
> > +	/*
> > +	 * Paired with the kref_get() in scsi_sysfs_initialize().  We're
> > +	 * removing sysfs visibility from the device, so make the target
> > +	 * invisible if this was the last device underneath it.
> > +	 */
> > +	scsi_target_reap(scsi_target(sdev));
> > +
> >  	put_device(dev);
> >  }
> >  
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2014-01-03  0:45                   ` Sarah Sharp
  2014-01-03  7:46                     ` James Bottomley
@ 2014-01-03  8:56                     ` Hans de Goede
  2014-01-03 14:50                       ` James Bottomley
  2014-01-03 22:00                       ` Sarah Sharp
  1 sibling, 2 replies; 20+ messages in thread
From: Hans de Goede @ 2014-01-03  8:56 UTC (permalink / raw)
  To: Sarah Sharp, Alan Stern; +Cc: James Bottomley, linux-scsi, USB list

Hi,

On 01/03/2014 01:45 AM, Sarah Sharp wrote:
> On Sat, Dec 21, 2013 at 03:51:25PM -0500, Alan Stern wrote:
>> On Fri, 20 Dec 2013, Sarah Sharp wrote:
>>
>>> On Thu, Dec 19, 2013 at 11:48:47AM -0800, James Bottomley wrote:
>>>> It should apply incrementally on top of the previous two.  If it
>>>> actually works, I'll fold it into the first patch.
>>>
>>> Well, it doesn't oops anymore, but it does generate a pile of warnings:
>>
>> This was a simple oversight.  scsi_target_reap() was called at the
>> start of __scsi_remove_device(), but it should be called at the end.
>> The patch below, applied on top of James's three patches, will fix the
>> warnings.
>>
>> Alan Stern
>>
>> P.S.: The comment isn't entirely correct any more...
>
> Ok, Alan's additional patch fixed the warnings I was seeing on UAS
> device unplug.  James, can you Cc me on the finished patch when you send
> it in?
>
> Hans, I don't want to send the UAS patches off to Greg until James'
> patches get into mainline.  I believe Greg's usb-next tree is frozen at
> this point, so they'll have to wait until 3.15.

Ugh, I must say I'm rather unhappy about this, waiting till 3.14 to give
time to shake things out was fine. But since the start of the 3.13 cycle,
there have been no issues found in the xhci / uas code.

Yes it triggered an existing problem in another subsys, but the code itself
has been issue free all this time. If Greg's tree is indeed already frozen I
would rather have us asking an exception for this.

Alternatively we could add all of it to 3.14 except for the patch removing
the BROKEN marking from uas. Or at least all the non uas bits, which are
useful to have by themselves.

James, what is the status of getting the fix for the refcount issue into
mainline ?

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2014-01-03  8:56                     ` Hans de Goede
@ 2014-01-03 14:50                       ` James Bottomley
  2014-01-03 22:00                       ` Sarah Sharp
  1 sibling, 0 replies; 20+ messages in thread
From: James Bottomley @ 2014-01-03 14:50 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Sarah Sharp, Alan Stern, linux-scsi, USB list

On Fri, 2014-01-03 at 09:56 +0100, Hans de Goede wrote:
> James, what is the status of getting the fix for the refcount issue into
> mainline ?

The plan is what I wrote in the patch intro:

        "Since it's a major change to the infrastructure, we'll incubate
        upstream first before backporting to stable."
        
That means with the merge window and delayed stable backport to make
sure it's sound.

James



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2014-01-03  8:56                     ` Hans de Goede
  2014-01-03 14:50                       ` James Bottomley
@ 2014-01-03 22:00                       ` Sarah Sharp
  2014-01-03 23:20                         ` Hans de Goede
  1 sibling, 1 reply; 20+ messages in thread
From: Sarah Sharp @ 2014-01-03 22:00 UTC (permalink / raw)
  To: Hans de Goede, Greg KH; +Cc: Alan Stern, James Bottomley, linux-scsi, USB list

On Fri, Jan 03, 2014 at 09:56:45AM +0100, Hans de Goede wrote:
> Hi,
> 
> On 01/03/2014 01:45 AM, Sarah Sharp wrote:
> >Ok, Alan's additional patch fixed the warnings I was seeing on UAS
> >device unplug.  James, can you Cc me on the finished patch when you send
> >it in?
> >
> >Hans, I don't want to send the UAS patches off to Greg until James'
> >patches get into mainline.  I believe Greg's usb-next tree is frozen at
> >this point, so they'll have to wait until 3.15.
> 
> Ugh, I must say I'm rather unhappy about this, waiting till 3.14 to give
> time to shake things out was fine. But since the start of the 3.13 cycle,
> there have been no issues found in the xhci / uas code.

I completely understand why you're unhappy.  I agree that the pull
request you sent me on Nov 18th is fine (aside from not being a GPG
signed git tag). [1]  I also agree that the UAS and xHCI driver changes
have been stable during my testing, other than triggering the SCSI oops
on UAS disconnect.

> Yes it triggered an existing problem in another subsys, but the code itself
> has been issue free all this time. If Greg's tree is indeed already frozen I
> would rather have us asking an exception for this.

Detach yourself emotionally from your code and look at this request from
a maintainer's perspective.

You're asking me to push 69 patches to Greg after -rc6 is out, for a
driver that's been marked broken for several kernel releases (uas).  The
patches enable a feature that's been basically untested across all xHCI
host controllers (streams), and they add new userspace API for usbfs to
expose streams.

In the meantime, there's a big push to get code into linux-next at least
a week or two before the merge window opens.  I sent my last pull request
on Dec 20th, and Felipe closed his USB gadget tree on Dec 26th.  I had
hoped to get the SCSI issue settled so I could send in the UAS patches
on the 20th, but that didn't happen.  My tree is closed.

These fixes should get merged (and will!), but I will not ask Greg for
an exception to get these patches into 3.14.

> Alternatively we could add all of it to 3.14 except for the patch removing
> the BROKEN marking from uas. Or at least all the non uas bits, which are
> useful to have by themselves.

I think the best way to proceed with this is for me to queue all the
xHCI patches in that pull request for usb-next once 3.14-rc1 is out, and
then you send a separate pull request to Greg.  You're going to need to
be able to send him pull requests with a signed git tag in the future
anyway.

> James, what is the status of getting the fix for the refcount issue into
> mainline ?

(Greg, James will be queuing the SCSI fix for the 3.14 merge window.)

Sarah Sharp

[1] http://marc.info/?l=linux-usb&m=138478555324055&w=2

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC 0/2] target refcounting infrastructure fixes for usb
  2014-01-03 22:00                       ` Sarah Sharp
@ 2014-01-03 23:20                         ` Hans de Goede
  0 siblings, 0 replies; 20+ messages in thread
From: Hans de Goede @ 2014-01-03 23:20 UTC (permalink / raw)
  To: Sarah Sharp, Greg KH; +Cc: Alan Stern, James Bottomley, linux-scsi, USB list

Hi,

On 01/03/2014 11:00 PM, Sarah Sharp wrote:
> On Fri, Jan 03, 2014 at 09:56:45AM +0100, Hans de Goede wrote:
>> Hi,
>>
>> On 01/03/2014 01:45 AM, Sarah Sharp wrote:
>>> Ok, Alan's additional patch fixed the warnings I was seeing on UAS
>>> device unplug.  James, can you Cc me on the finished patch when you send
>>> it in?
>>>
>>> Hans, I don't want to send the UAS patches off to Greg until James'
>>> patches get into mainline.  I believe Greg's usb-next tree is frozen at
>>> this point, so they'll have to wait until 3.15.
>>
>> Ugh, I must say I'm rather unhappy about this, waiting till 3.14 to give
>> time to shake things out was fine. But since the start of the 3.13 cycle,
>> there have been no issues found in the xhci / uas code.
>
> I completely understand why you're unhappy.  I agree that the pull
> request you sent me on Nov 18th is fine (aside from not being a GPG
> signed git tag). [1]  I also agree that the UAS and xHCI driver changes
> have been stable during my testing, other than triggering the SCSI oops
> on UAS disconnect.
>
>> Yes it triggered an existing problem in another subsys, but the code itself
>> has been issue free all this time. If Greg's tree is indeed already frozen I
>> would rather have us asking an exception for this.
>
> Detach yourself emotionally from your code and look at this request from
> a maintainer's perspective.
>
> You're asking me to push 69 patches to Greg after -rc6 is out, for a
> driver that's been marked broken for several kernel releases (uas).  The
> patches enable a feature that's been basically untested across all xHCI
> host controllers (streams), and they add new userspace API for usbfs to>
> expose streams.

Yes 69 patches which have been ready since November 18. Your argument is
that they were not in linux-next before now, my unhappiness comes from
that they could have been in linux-next for some time now already.

> In the meantime, there's a big push to get code into linux-next at least
> a week or two before the merge window opens.  I sent my last pull request
> on Dec 20th, and Felipe closed his USB gadget tree on Dec 26th.  I had
> hoped to get the SCSI issue settled so I could send in the UAS patches
> on the 20th, but that didn't happen.  My tree is closed.
>
> These fixes should get merged (and will!), but I will not ask Greg for
> an exception to get these patches into 3.14.
>
>> Alternatively we could add all of it to 3.14 except for the patch removing
>> the BROKEN marking from uas. Or at least all the non uas bits, which are
>> useful to have by themselves.
>
> I think the best way to proceed with this is for me to queue all the
> xHCI patches in that pull request for usb-next once 3.14-rc1 is out, and
> then you send a separate pull request to Greg.  You're going to need to
> be able to send him pull requests with a signed git tag in the future
> anyway.

Since you have all the patches in your tree now anyways I believe it would
be best if you just send a pull-req for all of them. I see little value
in me sending a separate pull-req for the uas patches. As discussed before
I'm fine with picking up uas maintenance from then on.

Regards,

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [RFC 0/2] target refcounting infrastructure fixes for usb
@ 2014-01-03  0:36 James Bottomley
  0 siblings, 0 replies; 20+ messages in thread
From: James Bottomley @ 2014-01-03  0:36 UTC (permalink / raw)
  To: linux-scsi; +Cc: Alan Stern, USB list

This set should fix our target problems with USB by making the target
visibility properly reference counted.  Since it's a major change to the
infrastructure, we'll incubate upstream first before backporting to
stable.

James Bottomley (2):
  [SCSI] fix our current target reap infrastructure.
  [SCSI] dual scan thread bug fix

 drivers/scsi/scsi_scan.c   | 108 +++++++++++++++++++++++++++++----------------
 drivers/scsi/scsi_sysfs.c  |  20 ++++++---
 include/scsi/scsi_device.h |   3 +-
 3 files changed, 84 insertions(+), 47 deletions(-)

James


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-01-03 23:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16 15:10 [RFC 0/2] target refcounting infrastructure fixes for usb James Bottomley
2013-12-16 15:12 ` [RFC 1/2] fix our current target reap infrastructure James Bottomley
2013-12-16 15:57   ` Alan Stern
2013-12-17 13:38     ` James Bottomley
2013-12-16 15:13 ` [RFC 2/2] dual scan thread bug fix James Bottomley
     [not found] ` <1387206619.2200.6.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2013-12-18 20:36   ` [RFC 0/2] target refcounting infrastructure fixes for usb Sarah Sharp
2013-12-18 21:50     ` Alan Stern
2013-12-19  0:05       ` James Bottomley
2013-12-19 18:26         ` Sarah Sharp
2013-12-19 19:48           ` James Bottomley
2013-12-20 23:18             ` Sarah Sharp
2013-12-21 20:51               ` Alan Stern
2014-01-03  0:34                 ` James Bottomley
     [not found]                 ` <Pine.LNX.4.44L0.1312211547490.12252-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-01-03  0:45                   ` Sarah Sharp
2014-01-03  7:46                     ` James Bottomley
2014-01-03  8:56                     ` Hans de Goede
2014-01-03 14:50                       ` James Bottomley
2014-01-03 22:00                       ` Sarah Sharp
2014-01-03 23:20                         ` Hans de Goede
2014-01-03  0:36 James Bottomley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.