Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1217993 > unrolled thread
| Started by | Anish Bhatt <anish@chelsio.com> |
|---|---|
| First post | 2015-09-03 03:40 +0200 |
| Last post | 2015-09-04 22:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: [PATCH] csiostor:Fix locking issues in the function csio_scsim_cleanup_io_lnode Anish Bhatt <anish@chelsio.com> - 2015-09-03 03:40 +0200
RE: [PATCH] csiostor:Fix locking issues in the function csio_scsim_cleanup_io_lnode Praveen Madhavan <praveenm@chelsio.com> - 2015-09-04 15:20 +0200
RE: [PATCH] csiostor:Fix locking issues in the function csio_scsim_cleanup_io_lnode Anish Bhatt <anish@chelsio.com> - 2015-09-04 22:50 +0200
| From | Anish Bhatt <anish@chelsio.com> |
|---|---|
| Date | 2015-09-03 03:40 +0200 |
| Subject | RE: [PATCH] csiostor:Fix locking issues in the function csio_scsim_cleanup_io_lnode |
| Message-ID | <q4rFo-5Gh-1@gated-at.bofh.it> |
> -----Original Message----- > From: Nicholas Krause [mailto:xerofoify@gmail.com] > Sent: Wednesday, September 2, 2015 10:36 AM > To: JBottomley@odin.com > Cc: hare@suse.de; michaelc@cs.wisc.edu; davem@davemloft.net; Anish > Bhatt; Hariprasad S; linux-scsi@vger.kernel.org; linux- > kernel@vger.kernel.org > Subject: [PATCH] csiostor:Fix locking issues in the function > csio_scsim_cleanup_io_lnode > > This fixes locking issues in the function csio_scsim_cleanup_io_lnode by > locking around the call to the function csio_csci_gather_active_ios with the > function pair spin_lock_irq/spin_unlock_irq as any function calling this > particular function must do in order to avoid concurrent threads of execution > on the passed structure pointer of type csio_hw as this structure pointer can > be shared across mutliple threads in the kernel. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > drivers/scsi/csiostor/csio_scsi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c > index 2c4562d..c318855 100644 > --- a/drivers/scsi/csiostor/csio_scsi.c > +++ b/drivers/scsi/csiostor/csio_scsi.c > @@ -1327,7 +1327,9 @@ csio_scsim_cleanup_io_lnode(struct csio_scsim > *scm, struct csio_lnode *ln) > sld.level = CSIO_LEV_LNODE; > sld.lnode = ln; > INIT_LIST_HEAD(&ln->cmpl_q); > + spin_lock_irq(&hw->lock); > csio_scsi_gather_active_ios(scm, &sld, &ln->cmpl_q); > + spin_unlock_irq(&hw->lock); > > /* No I/Os pending on this lnode */ > if (list_empty(&ln->cmpl_q)) > -- > 2.1.4 Acked-By: Anish Bhatt <anish@chelsio.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Praveen Madhavan <praveenm@chelsio.com> |
|---|---|
| Date | 2015-09-04 15:20 +0200 |
| Message-ID | <q4Z4m-39P-31@gated-at.bofh.it> |
| In reply to | #1217993 |
csio_scsim_cleanup_io_lnode always called with spin_lock_irq held. Please refer: csio_attr.c:624: csio_scsim_cleanup_io_lnode(csio_hw_to_scsim(hw), ln); csio_attr.c:649: csio_scsim_cleanup_io_lnode(csio_hw_to_scsim(hw), ln); -----Original Message----- From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Anish Bhatt Sent: Thursday, September 03, 2015 7:07 AM To: Nicholas Krause; JBottomley@odin.com Cc: hare@suse.de; michaelc@cs.wisc.edu; davem@davemloft.net; Hariprasad S; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org Subject: RE: [PATCH] csiostor:Fix locking issues in the function csio_scsim_cleanup_io_lnode > -----Original Message----- > From: Nicholas Krause [mailto:xerofoify@gmail.com] > Sent: Wednesday, September 2, 2015 10:36 AM > To: JBottomley@odin.com > Cc: hare@suse.de; michaelc@cs.wisc.edu; davem@davemloft.net; Anish > Bhatt; Hariprasad S; linux-scsi@vger.kernel.org; linux- > kernel@vger.kernel.org > Subject: [PATCH] csiostor:Fix locking issues in the function > csio_scsim_cleanup_io_lnode > > This fixes locking issues in the function csio_scsim_cleanup_io_lnode > by locking around the call to the function csio_csci_gather_active_ios > with the function pair spin_lock_irq/spin_unlock_irq as any function > calling this particular function must do in order to avoid concurrent > threads of execution on the passed structure pointer of type csio_hw > as this structure pointer can be shared across mutliple threads in the kernel. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > drivers/scsi/csiostor/csio_scsi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/scsi/csiostor/csio_scsi.c > b/drivers/scsi/csiostor/csio_scsi.c > index 2c4562d..c318855 100644 > --- a/drivers/scsi/csiostor/csio_scsi.c > +++ b/drivers/scsi/csiostor/csio_scsi.c > @@ -1327,7 +1327,9 @@ csio_scsim_cleanup_io_lnode(struct csio_scsim > *scm, struct csio_lnode *ln) > sld.level = CSIO_LEV_LNODE; > sld.lnode = ln; > INIT_LIST_HEAD(&ln->cmpl_q); > + spin_lock_irq(&hw->lock); > csio_scsi_gather_active_ios(scm, &sld, &ln->cmpl_q); > + spin_unlock_irq(&hw->lock); > > /* No I/Os pending on this lnode */ > if (list_empty(&ln->cmpl_q)) > -- > 2.1.4 Acked-By: Anish Bhatt <anish@chelsio.com> -- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Anish Bhatt <anish@chelsio.com> |
|---|---|
| Date | 2015-09-04 22:50 +0200 |
| Message-ID | <q565Q-4De-3@gated-at.bofh.it> |
| In reply to | #1218925 |
> -----Original Message----- > From: Praveen Madhavan > Sent: Friday, September 4, 2015 6:12 AM > To: Anish Bhatt; Nicholas Krause; JBottomley@odin.com > Cc: hare@suse.de; michaelc@cs.wisc.edu; davem@davemloft.net; > Hariprasad S; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH] csiostor:Fix locking issues in the function > csio_scsim_cleanup_io_lnode > > csio_scsim_cleanup_io_lnode always called with spin_lock_irq held. > Please refer: > csio_attr.c:624: csio_scsim_cleanup_io_lnode(csio_hw_to_scsim(hw), > ln); > csio_attr.c:649: > csio_scsim_cleanup_io_lnode(csio_hw_to_scsim(hw), ln); > > -----Original Message----- > From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi- > owner@vger.kernel.org] On Behalf Of Anish Bhatt > Sent: Thursday, September 03, 2015 7:07 AM > To: Nicholas Krause; JBottomley@odin.com > Cc: hare@suse.de; michaelc@cs.wisc.edu; davem@davemloft.net; > Hariprasad S; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH] csiostor:Fix locking issues in the function > csio_scsim_cleanup_io_lnode > > > -----Original Message----- > > From: Nicholas Krause [mailto:xerofoify@gmail.com] > > Sent: Wednesday, September 2, 2015 10:36 AM > > To: JBottomley@odin.com > > Cc: hare@suse.de; michaelc@cs.wisc.edu; davem@davemloft.net; Anish > > Bhatt; Hariprasad S; linux-scsi@vger.kernel.org; linux- > > kernel@vger.kernel.org > > Subject: [PATCH] csiostor:Fix locking issues in the function > > csio_scsim_cleanup_io_lnode > > > > This fixes locking issues in the function csio_scsim_cleanup_io_lnode > > by locking around the call to the function csio_csci_gather_active_ios > > with the function pair spin_lock_irq/spin_unlock_irq as any function > > calling this particular function must do in order to avoid concurrent > > threads of execution on the passed structure pointer of type csio_hw > > as this structure pointer can be shared across mutliple threads in the > kernel. > > > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > > --- > > drivers/scsi/csiostor/csio_scsi.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/scsi/csiostor/csio_scsi.c > > b/drivers/scsi/csiostor/csio_scsi.c > > index 2c4562d..c318855 100644 > > --- a/drivers/scsi/csiostor/csio_scsi.c > > +++ b/drivers/scsi/csiostor/csio_scsi.c > > @@ -1327,7 +1327,9 @@ csio_scsim_cleanup_io_lnode(struct csio_scsim > > *scm, struct csio_lnode *ln) > > sld.level = CSIO_LEV_LNODE; > > sld.lnode = ln; > > INIT_LIST_HEAD(&ln->cmpl_q); > > + spin_lock_irq(&hw->lock); > > csio_scsi_gather_active_ios(scm, &sld, &ln->cmpl_q); > > + spin_unlock_irq(&hw->lock); > > > > /* No I/Os pending on this lnode */ > > if (list_empty(&ln->cmpl_q)) > > -- > > 2.1.4 > > Acked-By: Anish Bhatt <anish@chelsio.com> My bad, NACK. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web