From: Mark Haverkamp <markh@osdl.org>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Mark Salyzyn <mark_salyzyn@adaptec.com>
Subject: [PATCH 6/7] aacraid: unlock around kfree
Date: Wed, 03 Aug 2005 15:39:36 -0700 [thread overview]
Message-ID: <1123108776.24945.40.camel@markh1.pdx.osdl.net> (raw)
Received from Mark Salyzyn from Adaptec:
kfree has the possibility of sleeping. It is generally considered poor
manners to hold on to a lock with the possibility of a system call
induced sleep.
Applies to scsi-misc-2.6 git tree
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Index: scsi-misc-aac-1/drivers/scsi/aacraid/commctrl.c
===================================================================
--- scsi-misc-aac-1.orig/drivers/scsi/aacraid/commctrl.c 2005-07-05 14:18:07.000000000 -0700
+++ scsi-misc-aac-1/drivers/scsi/aacraid/commctrl.c 2005-07-05 14:59:24.000000000 -0700
@@ -324,8 +324,10 @@
/*
* Free the space occupied by this copy of the fib.
*/
+ spin_unlock_irq(&dev->fib_lock);
kfree(fib->hw_fib);
kfree(fib);
+ spin_lock_irq(&dev->fib_lock);
}
/*
* Remove the Context from the AdapterFibContext List
@@ -338,7 +340,9 @@
/*
* Free the space occupied by the Context
*/
+ spin_unlock_irq(&dev->fib_lock);
kfree(fibctx);
+ spin_lock_irq(&dev->fib_lock);
return 0;
}
--
Mark Haverkamp <markh@osdl.org>
next reply other threads:[~2005-08-03 22:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-03 22:39 Mark Haverkamp [this message]
2005-08-03 23:06 ` [PATCH 6/7] aacraid: unlock around kfree James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2005-08-04 11:33 Salyzyn, Mark
2005-08-04 11:47 ` Arjan van de Ven
2005-08-04 12:04 Salyzyn, Mark
2005-08-04 12:34 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1123108776.24945.40.camel@markh1.pdx.osdl.net \
--to=markh@osdl.org \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mark_salyzyn@adaptec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox