Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1378397
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [-next] BUG_ON in scsi_target_destroy() |
| Date | 2016-04-14 04:10 +0200 |
| Message-ID | <rnETf-2DA-15@gated-at.bofh.it> (permalink) |
| References | <rmG14-3kL-5@gated-at.bofh.it> <rnoEP-6Uh-35@gated-at.bofh.it> <rnuKe-3cP-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello, On (04/13/16 08:14), James Bottomley wrote: [..] > How about good grief no! A device with multiple targets will get it's > lists screwed with this > > The STARGET_REMOVE state you added only applies to the case we're > trying to kill a target. In the natural operation case, which is what > everyone else is running into, we will try to remove a running target > when it has no more scsi devices left on it. So the correct patch > should be to make the BUG_ON see this: works for me. Reported-and-tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> -ss > James > > --- > > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c > index 27df7e7..e0a78f5 100644 > --- a/drivers/scsi/scsi_scan.c > +++ b/drivers/scsi/scsi_scan.c > @@ -319,8 +319,7 @@ static void scsi_target_destroy(struct scsi_target *starget) > struct Scsi_Host *shost = dev_to_shost(dev->parent); > unsigned long flags; > > - BUG_ON(starget->state != STARGET_REMOVE && > - starget->state != STARGET_CREATED); > + BUG_ON(starget->state == STARGET_DEL); > starget->state = STARGET_DEL; > transport_destroy_device(dev); > spin_lock_irqsave(shost->host_lock, flags); >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[-next] BUG_ON in scsi_target_destroy() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-04-11 11:10 +0200
Re: [-next] BUG_ON in scsi_target_destroy() Johannes Thumshirn <jthumshirn@suse.de> - 2016-04-13 10:50 +0200
Re: [-next] BUG_ON in scsi_target_destroy() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-04-13 15:50 +0200
Re: [-next] BUG_ON in scsi_target_destroy() Johannes Thumshirn <jthumshirn@suse.de> - 2016-04-13 16:10 +0200
Re: [-next] BUG_ON in scsi_target_destroy() James Bottomley <jejb@linux.vnet.ibm.com> - 2016-04-13 17:20 +0200
Re: [-next] BUG_ON in scsi_target_destroy() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-04-14 04:10 +0200
Re: [-next] BUG_ON in scsi_target_destroy() Xiong Zhou <jencce.kernel@gmail.com> - 2016-04-15 08:00 +0200
Re: [-next] BUG_ON in scsi_target_destroy() Xiong Zhou <jencce.kernel@gmail.com> - 2016-04-15 06:40 +0200
csiph-web