From: Kylene Hall <kjhall@us.ibm.com>
To: Chris Wright <chrisw@osdl.org>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com,
Emily Ratliff <emilyr@us.ibm.com>, Tom Lendacky <toml@us.ibm.com>,
tpmdd-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/1] tpm: fix cause of SMP stack traces
Date: Tue, 18 Jan 2005 16:44:16 -0600 [thread overview]
Message-ID: <1106088256.2324.14.camel@jo.austin.ibm.com> (raw)
In-Reply-To: <20050118143705.F469@build.pdx.osdl.net>
On Tue, 2005-01-18 at 16:37, Chris Wright wrote:
> * Kylene Hall (kjhall@us.ibm.com) wrote:
> > There were misplaced spinlock acquires and releases in the probe, open,
> > close and release paths which were causing might_sleep and schedule while
> > atomic error messages accompanied by stack traces when the kernel was
> > compiled with SMP support. Bug reported by Reben Jenster
> > <ruben@hotheads.de>
> >
> > Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
> > ---
> > diff -uprN linux-2.6.10/drivers/char/tpm/tpm.c linux-2.6.10-tpm/drivers/char/tpm/tpm.c
> > --- linux-2.6.10/drivers/char/tpm/tpm.c 2005-01-18 16:42:17.000000000 -0600
> > +++ linux-2.6.10-tpm/drivers/char/tpm/tpm.c 2005-01-18 12:52:53.000000000 -0600
> > @@ -373,8 +372,9 @@ int tpm_open(struct inode *inode, struct
> > {
> > int rc = 0, minor = iminor(inode);
> > struct tpm_chip *chip = NULL, *pos;
> > + unsigned long flags;
> >
> > - spin_lock(&driver_lock);
> > + spin_lock_irqsave(&driver_lock, flags);
>
> Hmm, unless I'm missing something, this is only worse (for might sleep
> warnings). Now you've disabled irq's too.
I actually had to move the location of some of the locks to remove the
might sleep warnings. Since I didn't know much about the might sleep
warnings before, my first course of action was to try using the disable
irq mechanism and I went ahead and just left them in once it was working
with the new lock placements. I assume you believe they shouldn't be
necessary at all?
Thanks,
Kylie
>
> thanks,
> -chris
next prev parent reply other threads:[~2005-01-18 22:44 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-09 15:25 [PATCH 1/1] driver: Tpm hardware enablement Kylene Hall
2004-12-09 15:48 ` Arjan van de Ven
2004-12-09 17:06 ` Kylie Hall
2004-12-11 8:31 ` Nish Aravamudan
2004-12-10 20:45 ` Alan Cox
2004-12-10 10:56 ` Ian Campbell
2004-12-10 15:28 ` Kylene Hall
2004-12-10 15:41 ` Ian Campbell
2004-12-10 18:39 ` [tpmdd-devel] " Kylene Hall
2004-12-14 9:59 ` Ian Campbell
2004-12-16 22:37 ` [PATCH 1/1] driver: Tpm hardware enablement --updated version Kylene Hall
2004-12-16 22:48 ` Greg KH
2004-12-17 22:47 ` [tpmdd-devel] " Kylene Hall
2004-12-17 0:53 ` Chris Wright
2004-12-17 22:47 ` [tpmdd-devel] " Kylene Hall
2004-12-17 22:47 ` Kylene Hall
2004-12-17 22:59 ` Greg KH
2004-12-20 17:50 ` Kylene Hall
2004-12-21 16:51 ` Nish Aravamudan
2004-12-21 18:19 ` Kylene Hall
2005-01-12 18:45 ` Kylene Hall
2005-01-12 23:28 ` Greg KH
2005-01-18 22:29 ` [PATCH 1/1] tpm: fix cause of SMP stack traces Kylene Hall
2005-01-18 22:37 ` Chris Wright
2005-01-18 22:44 ` Kylene Hall [this message]
2005-01-18 22:47 ` Chris Wright
2005-01-18 22:47 ` Greg KH
2005-01-18 23:07 ` Kylene Hall
2005-01-18 23:39 ` [PATCH 1/1] tpm: fix cause of SMP stack traces -- updated version Kylene Hall
2005-01-28 21:45 ` [PATCH 1/1] tpm: insert missing up mutex in an error path Kylene Hall
2005-01-31 19:27 ` [PATCH 1/1] tpm: insert missing up mutex in an error path, typo build fix -- updated version Kylene Hall
2005-02-03 16:40 ` [PATCH 1/1] tpm: remove pci specific stuff from the underlying generic driver Kylene Hall
2005-02-04 20:12 ` [PATCH 1/1] tpm: implement use of sysfs classes Kylene Hall
2005-02-04 20:52 ` Greg KH
2005-02-04 21:37 ` Kylene Hall
2005-02-04 21:51 ` Greg KH
2005-02-09 18:05 ` [PATCH 1/1] tpm: update tpm sysfs file ownership Kylene Hall
2005-02-09 18:17 ` Greg KH
2005-02-09 20:35 ` [tpmdd-devel] Re: [PATCH 1/1] tpm: update tpm sysfs file ownership - updated version Kylene Hall
2005-02-09 22:04 ` Chris Wright
2005-02-10 15:40 ` Kylene Hall
2005-02-01 8:28 ` [PATCH 1/1] tpm: fix cause of SMP stack traces -- " Greg KH
2004-12-19 19:48 ` [PATCH 1/1] driver: Tpm hardware enablement --updated version Pavel Machek
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=1106088256.2324.14.camel@jo.austin.ibm.com \
--to=kjhall@us.ibm.com \
--cc=chrisw@osdl.org \
--cc=emilyr@us.ibm.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=toml@us.ibm.com \
--cc=tpmdd-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®