From: Tejun Heo <htejun@gmail.com>
To: Komuro <komurojun-mbn@nifty.com>
Cc: Jeff Garzik <jeff@garzik.org>,
linux-pcmcia <linux-pcmcia@lists.infradead.org>,
linux-kernel@vger.kernel.org,
Dominik Brodowski <linux@dominikbrodowski.net>,
linux-ide@vger.kernel.org,
Kristoffer Ericson <kristoffer.ericson@gmail.com>,
jgarzik@redhat.com, rjw@sisk.pl
Subject: Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB
Date: Sun, 06 Jul 2008 23:19:24 +0900 [thread overview]
Message-ID: <4870D46C.7000604@gmail.com> (raw)
In-Reply-To: <20080706103752.13935ffd.komurojun-mbn@nifty.com>
Hello, Komuro.
Komuro wrote:
> Hi, Tejun
>
> The patch below fixes the pata_pcmcia problem.
>
> I think the ap->lock points to bogus address.
>
> Any comment?
>
> --- linux-2.6.26-rc8/drivers/ata/libata-core.c.orig 2008-07-06 10:05:46.000000000 +0900
> +++ linux-2.6.26-rc8/drivers/ata/libata-core.c 2008-07-06 10:09:16.000000000 +0900
> @@ -5304,6 +5304,8 @@ struct ata_host *ata_host_alloc(struct d
> goto err_out;
>
> ap->port_no = i;
> + ap->lock = &ap->__lock;
> + spin_lock_init(ap->lock);
> host->ports[i] = ap;
> }
>
> --- linux-2.6.26-rc8/include/linux/libata.h.orig 2008-07-06 10:03:54.000000000 +0900
> +++ linux-2.6.26-rc8/include/linux/libata.h 2008-07-06 10:04:35.000000000 +0900
> @@ -639,6 +639,7 @@ struct ata_port {
> struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
> struct ata_port_operations *ops;
> spinlock_t *lock;
> + spinlock_t __lock;
> unsigned long flags; /* ATA_FLAG_xxx */
> unsigned int pflags; /* ATA_PFLAG_xxx */
> unsigned int print_id; /* user visible unique port ID */
Hmmm... Strange. From ata_port_alloc(),
struct ata_port *ata_port_alloc(struct ata_host *host)
{
struct ata_port *ap;
DPRINTK("ENTER\n");
ap = kzalloc(sizeof(*ap), GFP_KERNEL);
if (!ap)
return NULL;
ap->pflags |= ATA_PFLAG_INITIALIZING;
ap->lock = &host->lock;
^^^^^^^^^^^^^^^^^^^^^^^
How come ap->lock can get set to bogus address? Can you please printk
&host->lock and ap->lock after ata_host_alloc() without the patch?
Thanks.
--
tejun
next prev parent reply other threads:[~2008-07-06 14:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080528225049.9a134e0d.Kristoffer.Ericson@Gmail.com>
[not found] ` <20080528222740.GB20893@isilmar.linta.de>
[not found] ` <20080530135728.be02d3dc.Kristoffer.Ericson@Gmail.com>
[not found] ` <20080607223716.7d142072.komurojun-mbn@nifty.com>
2008-06-11 7:20 ` [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB Dominik Brodowski
2008-06-14 3:00 ` Komuro
2008-06-14 7:20 ` Jeff Garzik
2008-06-14 12:36 ` Komuro
2008-06-16 3:07 ` Tejun Heo
2008-06-16 13:11 ` Komuro
2008-06-16 13:24 ` Tejun Heo
2008-06-17 12:23 ` Komuro
2008-06-17 14:09 ` Tejun Heo
2008-06-17 14:15 ` Dominik Brodowski
2008-06-18 12:23 ` Komuro
2008-07-06 1:37 ` Komuro
2008-07-06 14:19 ` Tejun Heo [this message]
2008-07-07 12:42 ` Komuro
2008-07-09 4:10 ` Tejun Heo
2008-07-12 2:39 ` Komuro
2008-06-22 1:07 ` Komuro
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=4870D46C.7000604@gmail.com \
--to=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=jgarzik@redhat.com \
--cc=komurojun-mbn@nifty.com \
--cc=kristoffer.ericson@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=linux@dominikbrodowski.net \
--cc=rjw@sisk.pl \
/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;
as well as URLs for NNTP newsgroup(s).