linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* uas: kernel BUG at block/blk-tag.c:89 is back again :|
@ 2014-07-01 13:16 Hans de Goede
  2014-07-03  6:01 ` Christoph Hellwig
  0 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2014-07-01 13:16 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: Sarah Sharp, linux-scsi

Hi James, Sarah,

When preparing the uas patches for 3.15 they got delayed to
3.16 because of a scsi subsys issue triggering $subject.

James did a fix which went into 3.15 iirc, but at that time
it was too late for the uas patches to go in so they went
into 3.16.

So I was surprised to see this bug rear its ugly head again
with 3.16-rc2, with which I've been doing some uas testing :|

To reproduce, take an uas disk, mount an fs on a partition on
it somewhere, then unplug it.

Here is the backtrace I'm getting:

[   84.870813] ------------[ cut here ]------------
[   84.870847] kernel BUG at block/blk-tag.c:89!
[   84.870871] invalid opcode: 0000 [#1] SMP
[   84.870900] Modules linked in: fuse xt_CHECKSUM ipt_MASQUERADE tun ip6t_rpfilter ip6t_REJECT xt_conntrack cfg80211 rfkill ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw sch5636 sch56xx_common snd_usb_audio snd_usbmidi_lib snd_rawmidi iTCO_wdt iTCO_vendor_support gpio_ich ppdev tuner_simple tuner_types tuner
snd_hda_codec_hdmi x86_pkg_temp_thermal msp3400 coretemp kvm_intel kvm snd_hda_codec_conexant snd_hda_codec_generic crct10dif_pclmul crc32_pclmul ghash_clmulni_intel microcode bttv btcx_risc tveeprom serio_raw videobuf_dma_sg
[   84.871382]  snd_hda_intel videobuf_core snd_hda_controller rc_core v4l2_common i2c_i801 snd_hda_codec snd_bt87x snd_hwdep videodev snd_seq snd_seq_device media snd_pcm lpc_ich mfd_core e1000e snd_timer snd ptp soundcore shpchp pps_core parport_pc parport tpm_infineon tpm_tis tpm binfmt_misc uas usb_storage i915 crc32c_intel video i2c_algo_bit drm_kms_helper drm i2c_core
[   84.871634] CPU: 3 PID: 3321 Comm: systemd-udevd Not tainted 3.16.0-0.rc2.git4.1.fc21.x86_64 #1
[   84.871676] Hardware name: FUJITSU D3071-S1/D3071-S1, BIOS V4.6.4.0 R1.12.0.S
[   84.871723] task: ffff880204ce19d0 ti: ffff8801eed1c000 task.ti: ffff8801eed1c000
[   84.871760] RIP: 0010:[<ffffffff813b69d8>]  [<ffffffff813b69d8>] blk_free_tags+0x18/0x20
[   84.871807] RSP: 0018:ffff8801eed1fb90  EFLAGS: 00010246
[   84.871835] RAX: 0000000000000000 RBX: ffff8801eedde000 RCX: 0000000000000015
[   84.871870] RDX: ffffffff8180dd9e RSI: 0000000000000001 RDI: ffff88022137a2c0
[   84.871905] RBP: ffff8801eed1fb90 R08: 0000000000000000 R09: 0000000000000000
[   84.871940] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880230082030
[   84.871975] R13: ffff8800ade81000 R14: ffff8801eedde2e0 R15: ffff8800adc44168
[   84.872010] FS:  00007f16a4581880(0000) GS:ffff880235a00000(0000) knlGS:0000000000000000
[   84.872049] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   84.872078] CR2: 00007ffca000bb88 CR3: 00000001f70c7000 CR4: 00000000000407e0
[   84.872113] Stack:
[   84.872126]  ffff8801eed1fbb8 ffffffff81544a00 ffff8801eedde2e0 ffff8801eedde2d0
[   84.872171]  ffff8800ade81000 ffff8801eed1fbe0 ffffffff8151a6d2 ffff8801eedde318
[   84.872217]  ffffffff81f5f040 ffff88022d10d850 ffff8801eed1fc10 ffffffff813e7efa
[   84.872262] Call Trace:
[   84.872282]  [<ffffffff81544a00>] scsi_host_dev_release+0xb0/0xf0
[   84.872315]  [<ffffffff8151a6d2>] device_release+0x32/0xa0
[   84.872345]  [<ffffffff813e7efa>] kobject_release+0x7a/0x1c0
[   84.872376]  [<ffffffff813e7dad>] kobject_put+0x2d/0x60
[   84.872405]  [<ffffffff8151aa47>] put_device+0x17/0x20
[   84.872433]  [<ffffffff8154e53f>] scsi_target_dev_release+0x1f/0x30
[   84.872466]  [<ffffffff8151a6d2>] device_release+0x32/0xa0
[   84.872496]  [<ffffffff813e7efa>] kobject_release+0x7a/0x1c0
[   84.872526]  [<ffffffff813e7dad>] kobject_put+0x2d/0x60
[   84.872554]  [<ffffffff8151aa47>] put_device+0x17/0x20
[   84.872583]  [<ffffffff81551d02>] scsi_device_dev_release_usercontext+0x112/0x130
[   84.872624]  [<ffffffff81551bf0>] ? scsi_device_dev_release+0x20/0x20
[   84.872660]  [<ffffffff810bef19>] execute_in_process_context+0x99/0xb0
[   84.872694]  [<ffffffff81551bec>] scsi_device_dev_release+0x1c/0x20
[   84.872727]  [<ffffffff8151a6d2>] device_release+0x32/0xa0
[   84.872758]  [<ffffffff813e7efa>] kobject_release+0x7a/0x1c0
[   84.872793]  [<ffffffff813e7dad>] kobject_put+0x2d/0x60
[   84.872823]  [<ffffffff8151aa47>] put_device+0x17/0x20
[   84.872854]  [<ffffffff8154246a>] scsi_device_put+0x3a/0x50
[   84.872885]  [<ffffffff81556b12>] scsi_disk_put+0x32/0x50
[   84.872914]  [<ffffffff81556e02>] sd_release+0x42/0xe0
[   84.872945]  [<ffffffff8128dbd5>] __blkdev_put+0x185/0x1c0
[   84.872977]  [<ffffffff8128e61e>] blkdev_put+0x4e/0x180
[   84.873006]  [<ffffffff8128e808>] blkdev_close+0x28/0x30
[   84.873036]  [<ffffffff8124d895>] __fput+0xf5/0x210
[   84.873063]  [<ffffffff8124d9fe>] ____fput+0xe/0x10
[   84.873092]  [<ffffffff810c5534>] task_work_run+0xc4/0xf0
[   84.873124]  [<ffffffff81019d41>] do_notify_resume+0x61/0x90
[   84.873156]  [<ffffffff818119a2>] int_signal+0x12/0x17
[   84.873182] Code: c3 66 90 0f 0b 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 e5 e8 82 ff ff ff 85 c0 74 06 5d c3 0f 1f 40 00 <0f> 0b 66 0f 1f 44 00 00 66 66 66 66 90 55 48 85 ff 48 89 e5 41
[   84.873446] RIP  [<ffffffff813b69d8>] blk_free_tags+0x18/0x20
[   84.873478]  RSP <ffff8801eed1fb90>
[   84.882872] ---[ end trace ec5b6567aa8bf013 ]---

Regards,

Hans

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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-01 13:16 uas: kernel BUG at block/blk-tag.c:89 is back again :| Hans de Goede
@ 2014-07-03  6:01 ` Christoph Hellwig
  2014-07-06 12:24   ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2014-07-03  6:01 UTC (permalink / raw)
  To: Hans de Goede; +Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

Hi Hans,

please test the path below:

---
From: Christoph Hellwig <hch@lst.de>
Subject: block: don't assume last put of shared tags is for the host

There is no inherent reason why the last put of a tag structure must be
the one for the Scsi_Host, as device model objects can be held for
arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
funtion that just release a references and get rid of the BUG() when the
host reference wasn't the last.

Signed-off-by: Christoph Hellwig <hch@lst.de>

diff --git a/block/blk-tag.c b/block/blk-tag.c
index 3f33d86..a185b86 100644
--- a/block/blk-tag.c
+++ b/block/blk-tag.c
@@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag)
 EXPORT_SYMBOL(blk_queue_find_tag);
 
 /**
- * __blk_free_tags - release a given set of tag maintenance info
+ * blk_free_tags - release a given set of tag maintenance info
  * @bqt:	the tag map to free
  *
- * Tries to free the specified @bqt.  Returns true if it was
- * actually freed and false if there are still references using it
+ * Drop the reference count on @bqt and frees it when the last reference
+ * is dropped.
  */
-static int __blk_free_tags(struct blk_queue_tag *bqt)
+void blk_free_tags(struct blk_queue_tag *bqt)
 {
-	int retval;
-
-	retval = atomic_dec_and_test(&bqt->refcnt);
-	if (retval) {
+	if (atomic_dec_and_test(&bqt->refcnt)) {
 		BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) <
 							bqt->max_depth);
 
@@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt)
 
 		kfree(bqt);
 	}
-
-	return retval;
 }
+EXPORT_SYMBOL(blk_free_tags);
 
 /**
  * __blk_queue_free_tags - release tag maintenance info
@@ -69,28 +65,13 @@ void __blk_queue_free_tags(struct request_queue *q)
 	if (!bqt)
 		return;
 
-	__blk_free_tags(bqt);
+	blk_free_tags(bqt);
 
 	q->queue_tags = NULL;
 	queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q);
 }
 
 /**
- * blk_free_tags - release a given set of tag maintenance info
- * @bqt:	the tag map to free
- *
- * For externally managed @bqt frees the map.  Callers of this
- * function must guarantee to have released all the queues that
- * might have been using this tag map.
- */
-void blk_free_tags(struct blk_queue_tag *bqt)
-{
-	if (unlikely(!__blk_free_tags(bqt)))
-		BUG();
-}
-EXPORT_SYMBOL(blk_free_tags);
-
-/**
  * blk_queue_free_tags - release tag maintenance info
  * @q:  the request queue for the device
  *

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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-03  6:01 ` Christoph Hellwig
@ 2014-07-06 12:24   ` Hans de Goede
  2014-07-07 10:10     ` Christoph Hellwig
  0 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2014-07-06 12:24 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

Hi,

On 07/03/2014 08:01 AM, Christoph Hellwig wrote:
> Hi Hans,
> 
> please test the path below:

Note, I did a similar patch a while back, but then it was decided to
try and fix the tear-down ordering instead (which seems to have not
completely fixed the issue).

I've just tested this patch and it indeed fixes this. Note if we go
with this fix for 3.16, it should get a CC: stable for 3.15, as
3.15 is affected too.

Thanks,

Hans


> 
> ---
> From: Christoph Hellwig <hch@lst.de>
> Subject: block: don't assume last put of shared tags is for the host
> 
> There is no inherent reason why the last put of a tag structure must be
> the one for the Scsi_Host, as device model objects can be held for
> arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
> funtion that just release a references and get rid of the BUG() when the
> host reference wasn't the last.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> diff --git a/block/blk-tag.c b/block/blk-tag.c
> index 3f33d86..a185b86 100644
> --- a/block/blk-tag.c
> +++ b/block/blk-tag.c
> @@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag)
>  EXPORT_SYMBOL(blk_queue_find_tag);
>  
>  /**
> - * __blk_free_tags - release a given set of tag maintenance info
> + * blk_free_tags - release a given set of tag maintenance info
>   * @bqt:	the tag map to free
>   *
> - * Tries to free the specified @bqt.  Returns true if it was
> - * actually freed and false if there are still references using it
> + * Drop the reference count on @bqt and frees it when the last reference
> + * is dropped.
>   */
> -static int __blk_free_tags(struct blk_queue_tag *bqt)
> +void blk_free_tags(struct blk_queue_tag *bqt)
>  {
> -	int retval;
> -
> -	retval = atomic_dec_and_test(&bqt->refcnt);
> -	if (retval) {
> +	if (atomic_dec_and_test(&bqt->refcnt)) {
>  		BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) <
>  							bqt->max_depth);
>  
> @@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt)
>  
>  		kfree(bqt);
>  	}
> -
> -	return retval;
>  }
> +EXPORT_SYMBOL(blk_free_tags);
>  
>  /**
>   * __blk_queue_free_tags - release tag maintenance info
> @@ -69,28 +65,13 @@ void __blk_queue_free_tags(struct request_queue *q)
>  	if (!bqt)
>  		return;
>  
> -	__blk_free_tags(bqt);
> +	blk_free_tags(bqt);
>  
>  	q->queue_tags = NULL;
>  	queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q);
>  }
>  
>  /**
> - * blk_free_tags - release a given set of tag maintenance info
> - * @bqt:	the tag map to free
> - *
> - * For externally managed @bqt frees the map.  Callers of this
> - * function must guarantee to have released all the queues that
> - * might have been using this tag map.
> - */
> -void blk_free_tags(struct blk_queue_tag *bqt)
> -{
> -	if (unlikely(!__blk_free_tags(bqt)))
> -		BUG();
> -}
> -EXPORT_SYMBOL(blk_free_tags);
> -
> -/**
>   * blk_queue_free_tags - release tag maintenance info
>   * @q:  the request queue for the device
>   *
> 

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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-06 12:24   ` Hans de Goede
@ 2014-07-07 10:10     ` Christoph Hellwig
  2014-07-07 12:42       ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2014-07-07 10:10 UTC (permalink / raw)
  To: Hans de Goede; +Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

On Sun, Jul 06, 2014 at 02:24:03PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 07/03/2014 08:01 AM, Christoph Hellwig wrote:
> > Hi Hans,
> > 
> > please test the path below:
> 
> Note, I did a similar patch a while back, but then it was decided to
> try and fix the tear-down ordering instead (which seems to have not
> completely fixed the issue).

I can't see any sensible way to "fix" the issue.  Struct gendisk keeps a
reference to the requeue_queue, and a struct gendisk reference is held
as long as the block device is open.  So whenever you surprise remove a
device that is open (usually by having a filesystem mounted on it),
the request_queue and it's reference to the tag structure will vastly
outlive the Scsi_Host.


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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-07 10:10     ` Christoph Hellwig
@ 2014-07-07 12:42       ` Hans de Goede
  2014-07-08  9:53         ` Christoph Hellwig
  0 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2014-07-07 12:42 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

Hi,

On 07/07/2014 12:10 PM, Christoph Hellwig wrote:
> On Sun, Jul 06, 2014 at 02:24:03PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 07/03/2014 08:01 AM, Christoph Hellwig wrote:
>>> Hi Hans,
>>>
>>> please test the path below:
>>
>> Note, I did a similar patch a while back, but then it was decided to
>> try and fix the tear-down ordering instead (which seems to have not
>> completely fixed the issue).
> 
> I can't see any sensible way to "fix" the issue.  Struct gendisk keeps a
> reference to the requeue_queue, and a struct gendisk reference is held
> as long as the block device is open.  So whenever you surprise remove a
> device that is open (usually by having a filesystem mounted on it),
> the request_queue and it's reference to the tag structure will vastly
> outlive the Scsi_Host.

Ok, so can we then please move forward with getting your patch merged ?

Thanks,

Hans

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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-07 12:42       ` Hans de Goede
@ 2014-07-08  9:53         ` Christoph Hellwig
  2014-07-08  9:54           ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2014-07-08  9:53 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Christoph Hellwig, James E.J. Bottomley, Sarah Sharp, linux-scsi,
	Jens Axboe

On Mon, Jul 07, 2014 at 02:42:40PM +0200, Hans de Goede wrote:
> > I can't see any sensible way to "fix" the issue.  Struct gendisk keeps a
> > reference to the requeue_queue, and a struct gendisk reference is held
> > as long as the block device is open.  So whenever you surprise remove a
> > device that is open (usually by having a filesystem mounted on it),
> > the request_queue and it's reference to the tag structure will vastly
> > outlive the Scsi_Host.
> 
> Ok, so can we then please move forward with getting your patch merged ?

I've posted the patch in reply to another report and added Jens to the
Cc list.  As the block maintainer he need to review and merge it.


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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-08  9:53         ` Christoph Hellwig
@ 2014-07-08  9:54           ` Jens Axboe
  2014-07-08  9:56             ` Christoph Hellwig
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2014-07-08  9:54 UTC (permalink / raw)
  To: Christoph Hellwig, Hans de Goede
  Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

On 2014-07-08 11:53, Christoph Hellwig wrote:
> On Mon, Jul 07, 2014 at 02:42:40PM +0200, Hans de Goede wrote:
>>> I can't see any sensible way to "fix" the issue.  Struct gendisk keeps a
>>> reference to the requeue_queue, and a struct gendisk reference is held
>>> as long as the block device is open.  So whenever you surprise remove a
>>> device that is open (usually by having a filesystem mounted on it),
>>> the request_queue and it's reference to the tag structure will vastly
>>> outlive the Scsi_Host.
>>
>> Ok, so can we then please move forward with getting your patch merged ?
>
> I've posted the patch in reply to another report and added Jens to the
> Cc list.  As the block maintainer he need to review and merge it.

Which patch is this?


-- 
Jens Axboe


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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-08  9:54           ` Jens Axboe
@ 2014-07-08  9:56             ` Christoph Hellwig
  2014-07-08 10:35               ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2014-07-08  9:56 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Hans de Goede, James E.J. Bottomley,
	Sarah Sharp, linux-scsi

On Tue, Jul 08, 2014 at 11:54:14AM +0200, Jens Axboe wrote:
> >I've posted the patch in reply to another report and added Jens to the
> >Cc list.  As the block maintainer he need to review and merge it.
> 
> Which patch is this?

This one:

---
From: Christoph Hellwig <hch@lst.de>
Subject: block: don't assume last put of shared tags is for the host

There is no inherent reason why the last put of a tag structure must be
the one for the Scsi_Host, as device model objects can be held for
arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
funtion that just release a references and get rid of the BUG() when the
host reference wasn't the last.

Signed-off-by: Christoph Hellwig <hch@lst.de>

diff --git a/block/blk-tag.c b/block/blk-tag.c
index 3f33d86..a185b86 100644
--- a/block/blk-tag.c
+++ b/block/blk-tag.c
@@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag)
 EXPORT_SYMBOL(blk_queue_find_tag);
 
 /**
- * __blk_free_tags - release a given set of tag maintenance info
+ * blk_free_tags - release a given set of tag maintenance info
  * @bqt:	the tag map to free
  *
- * Tries to free the specified @bqt.  Returns true if it was
- * actually freed and false if there are still references using it
+ * Drop the reference count on @bqt and frees it when the last reference
+ * is dropped.
  */
-static int __blk_free_tags(struct blk_queue_tag *bqt)
+void blk_free_tags(struct blk_queue_tag *bqt)
 {
-	int retval;
-
-	retval = atomic_dec_and_test(&bqt->refcnt);
-	if (retval) {
+	if (atomic_dec_and_test(&bqt->refcnt)) {
 		BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) <
 							bqt->max_depth);
 
@@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt)
 
 		kfree(bqt);
 	}
-
-	return retval;
 }
+EXPORT_SYMBOL(blk_free_tags);
 
 /**
  * __blk_queue_free_tags - release tag maintenance info
@@ -69,28 +65,13 @@ void __blk_queue_free_tags(struct request_queue *q)
 	if (!bqt)
 		return;
 
-	__blk_free_tags(bqt);
+	blk_free_tags(bqt);
 
 	q->queue_tags = NULL;
 	queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q);
 }
 
 /**
- * blk_free_tags - release a given set of tag maintenance info
- * @bqt:	the tag map to free
- *
- * For externally managed @bqt frees the map.  Callers of this
- * function must guarantee to have released all the queues that
- * might have been using this tag map.
- */
-void blk_free_tags(struct blk_queue_tag *bqt)
-{
-	if (unlikely(!__blk_free_tags(bqt)))
-		BUG();
-}
-EXPORT_SYMBOL(blk_free_tags);
-
-/**
  * blk_queue_free_tags - release tag maintenance info
  * @q:  the request queue for the device
  *

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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-08  9:56             ` Christoph Hellwig
@ 2014-07-08 10:35               ` Jens Axboe
  2014-07-08 11:25                 ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2014-07-08 10:35 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Hans de Goede, James E.J. Bottomley, Sarah Sharp, linux-scsi

On 2014-07-08 11:56, Christoph Hellwig wrote:
> On Tue, Jul 08, 2014 at 11:54:14AM +0200, Jens Axboe wrote:
>>> I've posted the patch in reply to another report and added Jens to the
>>> Cc list.  As the block maintainer he need to review and merge it.
>>
>> Which patch is this?
>
> This one:
>
> ---
> From: Christoph Hellwig <hch@lst.de>
> Subject: block: don't assume last put of shared tags is for the host
>
> There is no inherent reason why the last put of a tag structure must be
> the one for the Scsi_Host, as device model objects can be held for
> arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
> funtion that just release a references and get rid of the BUG() when the
> host reference wasn't the last.

Thanks, applied. I don't think I was ever CC'ed on this one, though.

-- 
Jens Axboe


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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-08 10:35               ` Jens Axboe
@ 2014-07-08 11:25                 ` Hans de Goede
  2014-07-08 11:40                   ` Jens Axboe
  2014-07-21  8:15                   ` Hans de Goede
  0 siblings, 2 replies; 14+ messages in thread
From: Hans de Goede @ 2014-07-08 11:25 UTC (permalink / raw)
  To: Jens Axboe, Christoph Hellwig
  Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

Hi,

On 07/08/2014 12:35 PM, Jens Axboe wrote:
> On 2014-07-08 11:56, Christoph Hellwig wrote:
>> On Tue, Jul 08, 2014 at 11:54:14AM +0200, Jens Axboe wrote:
>>>> I've posted the patch in reply to another report and added Jens to the
>>>> Cc list.  As the block maintainer he need to review and merge it.
>>>
>>> Which patch is this?
>>
>> This one:
>>
>> ---
>> From: Christoph Hellwig <hch@lst.de>
>> Subject: block: don't assume last put of shared tags is for the host
>>
>> There is no inherent reason why the last put of a tag structure must be
>> the one for the Scsi_Host, as device model objects can be held for
>> arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
>> funtion that just release a references and get rid of the BUG() when the
>> host reference wasn't the last.
> 
> Thanks, applied. I don't think I was ever CC'ed on this one, though.

Thanks, good to hear.

Can you please add a Cc: stable ? This patch should at least be
backported to 3.15, where uas support has been declared stable.

With uas it is trivial to trigger the BUG_ON (and break any further
device hotplugging) since uas allows for tcq, and thus using tags
over usb (with all of its hotplug goodness and badness).

Regards,

Hans

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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-08 11:25                 ` Hans de Goede
@ 2014-07-08 11:40                   ` Jens Axboe
  2014-07-21  8:15                   ` Hans de Goede
  1 sibling, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2014-07-08 11:40 UTC (permalink / raw)
  To: Hans de Goede, Christoph Hellwig
  Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

On 2014-07-08 13:25, Hans de Goede wrote:
> Hi,
>
> On 07/08/2014 12:35 PM, Jens Axboe wrote:
>> On 2014-07-08 11:56, Christoph Hellwig wrote:
>>> On Tue, Jul 08, 2014 at 11:54:14AM +0200, Jens Axboe wrote:
>>>>> I've posted the patch in reply to another report and added Jens to the
>>>>> Cc list.  As the block maintainer he need to review and merge it.
>>>>
>>>> Which patch is this?
>>>
>>> This one:
>>>
>>> ---
>>> From: Christoph Hellwig <hch@lst.de>
>>> Subject: block: don't assume last put of shared tags is for the host
>>>
>>> There is no inherent reason why the last put of a tag structure must be
>>> the one for the Scsi_Host, as device model objects can be held for
>>> arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
>>> funtion that just release a references and get rid of the BUG() when the
>>> host reference wasn't the last.
>>
>> Thanks, applied. I don't think I was ever CC'ed on this one, though.
>
> Thanks, good to hear.
>
> Can you please add a Cc: stable ? This patch should at least be
> backported to 3.15, where uas support has been declared stable.
>
> With uas it is trivial to trigger the BUG_ON (and break any further
> device hotplugging) since uas allows for tcq, and thus using tags
> over usb (with all of its hotplug goodness and badness).

I did mark it stable when queuing it up, so should be all set.


-- 
Jens Axboe


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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-08 11:25                 ` Hans de Goede
  2014-07-08 11:40                   ` Jens Axboe
@ 2014-07-21  8:15                   ` Hans de Goede
  2014-07-21  8:17                     ` Jens Axboe
  1 sibling, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2014-07-21  8:15 UTC (permalink / raw)
  To: Jens Axboe, Christoph Hellwig
  Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

Hi,

On 07/08/2014 01:25 PM, Hans de Goede wrote:
> Hi,
> 
> On 07/08/2014 12:35 PM, Jens Axboe wrote:
>> On 2014-07-08 11:56, Christoph Hellwig wrote:
>>> On Tue, Jul 08, 2014 at 11:54:14AM +0200, Jens Axboe wrote:
>>>>> I've posted the patch in reply to another report and added Jens to the
>>>>> Cc list.  As the block maintainer he need to review and merge it.
>>>>
>>>> Which patch is this?
>>>
>>> This one:
>>>
>>> ---
>>> From: Christoph Hellwig <hch@lst.de>
>>> Subject: block: don't assume last put of shared tags is for the host
>>>
>>> There is no inherent reason why the last put of a tag structure must be
>>> the one for the Scsi_Host, as device model objects can be held for
>>> arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
>>> funtion that just release a references and get rid of the BUG() when the
>>> host reference wasn't the last.
>>
>> Thanks, applied. I don't think I was ever CC'ed on this one, though.
> 
> Thanks, good to hear.

It seems this one has not made it into 3.16-rc6 somehow ?

Regards,

Hans


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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-21  8:15                   ` Hans de Goede
@ 2014-07-21  8:17                     ` Jens Axboe
  2014-07-21  9:10                       ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2014-07-21  8:17 UTC (permalink / raw)
  To: Hans de Goede, Christoph Hellwig
  Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

On 2014-07-21 10:15, Hans de Goede wrote:
> Hi,
>
> On 07/08/2014 01:25 PM, Hans de Goede wrote:
>> Hi,
>>
>> On 07/08/2014 12:35 PM, Jens Axboe wrote:
>>> On 2014-07-08 11:56, Christoph Hellwig wrote:
>>>> On Tue, Jul 08, 2014 at 11:54:14AM +0200, Jens Axboe wrote:
>>>>>> I've posted the patch in reply to another report and added Jens to the
>>>>>> Cc list.  As the block maintainer he need to review and merge it.
>>>>>
>>>>> Which patch is this?
>>>>
>>>> This one:
>>>>
>>>> ---
>>>> From: Christoph Hellwig <hch@lst.de>
>>>> Subject: block: don't assume last put of shared tags is for the host
>>>>
>>>> There is no inherent reason why the last put of a tag structure must be
>>>> the one for the Scsi_Host, as device model objects can be held for
>>>> arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
>>>> funtion that just release a references and get rid of the BUG() when the
>>>> host reference wasn't the last.
>>>
>>> Thanks, applied. I don't think I was ever CC'ed on this one, though.
>>
>> Thanks, good to hear.
>
> It seems this one has not made it into 3.16-rc6 somehow ?

It'll go out shortly, was on vacation last week. It is queued up in 
for-linus.

-- 
Jens Axboe


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

* Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|
  2014-07-21  8:17                     ` Jens Axboe
@ 2014-07-21  9:10                       ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2014-07-21  9:10 UTC (permalink / raw)
  To: Jens Axboe, Christoph Hellwig
  Cc: James E.J. Bottomley, Sarah Sharp, linux-scsi

Hi,

On 07/21/2014 10:17 AM, Jens Axboe wrote:
> On 2014-07-21 10:15, Hans de Goede wrote:
>> Hi,
>>
>> On 07/08/2014 01:25 PM, Hans de Goede wrote:
>>> Hi,
>>>
>>> On 07/08/2014 12:35 PM, Jens Axboe wrote:
>>>> On 2014-07-08 11:56, Christoph Hellwig wrote:
>>>>> On Tue, Jul 08, 2014 at 11:54:14AM +0200, Jens Axboe wrote:
>>>>>>> I've posted the patch in reply to another report and added Jens to the
>>>>>>> Cc list.  As the block maintainer he need to review and merge it.
>>>>>>
>>>>>> Which patch is this?
>>>>>
>>>>> This one:
>>>>>
>>>>> ---
>>>>> From: Christoph Hellwig <hch@lst.de>
>>>>> Subject: block: don't assume last put of shared tags is for the host
>>>>>
>>>>> There is no inherent reason why the last put of a tag structure must be
>>>>> the one for the Scsi_Host, as device model objects can be held for
>>>>> arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
>>>>> funtion that just release a references and get rid of the BUG() when the
>>>>> host reference wasn't the last.
>>>>
>>>> Thanks, applied. I don't think I was ever CC'ed on this one, though.
>>>
>>> Thanks, good to hear.
>>
>> It seems this one has not made it into 3.16-rc6 somehow ?
> 
> It'll go out shortly, was on vacation last week. It is queued up in for-linus.

Ok, thanks for taking care of this. I hope you've enjoyed your vacation.

Regards,

Hans


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

end of thread, other threads:[~2014-07-21  9:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-01 13:16 uas: kernel BUG at block/blk-tag.c:89 is back again :| Hans de Goede
2014-07-03  6:01 ` Christoph Hellwig
2014-07-06 12:24   ` Hans de Goede
2014-07-07 10:10     ` Christoph Hellwig
2014-07-07 12:42       ` Hans de Goede
2014-07-08  9:53         ` Christoph Hellwig
2014-07-08  9:54           ` Jens Axboe
2014-07-08  9:56             ` Christoph Hellwig
2014-07-08 10:35               ` Jens Axboe
2014-07-08 11:25                 ` Hans de Goede
2014-07-08 11:40                   ` Jens Axboe
2014-07-21  8:15                   ` Hans de Goede
2014-07-21  8:17                     ` Jens Axboe
2014-07-21  9:10                       ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).