From: Dominik Brodowski <linux@brodo.de>
To: Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Re: stuff-up in pcmcia/cardbus stuff
Date: Tue, 18 Feb 2003 09:15:29 +0100 [thread overview]
Message-ID: <20030218081529.GA2334@brodo.de> (raw)
In-Reply-To: <15953.37244.263505.214325@argo.ozlabs.ibm.com>
On Tue, Feb 18, 2003 at 12:50:52PM +1100, Paul Mackerras wrote:
> Recent 2.5 kernels will crash with a null pointer dereference on my
> powerbook (PowerPC laptop) when I try to suspend. I tracked it down
> to cardbus_suspend() in drivers/pcmcia/pci-socket.c calling
> pcmcia_suspend_socket() with a NULL argument. It turns out that
> socket->pcmcia_socket is never set in the current code.
Indeed. socket->pcmcia_socket (old) == socket->cls_d.s_info[0] (new)
Could you please check whether this patch helps?
Dominik
diff -ruN linux-original/drivers/pcmcia/pci_socket.c linux/drivers/pcmcia/pci_socket.c
--- linux-original/drivers/pcmcia/pci_socket.c 2003-02-18 09:08:00.000000000 +0100
+++ linux/drivers/pcmcia/pci_socket.c 2003-02-18 09:12:02.000000000 +0100
@@ -230,14 +230,16 @@
static int cardbus_suspend (struct pci_dev *dev, u32 state)
{
pci_socket_t *socket = pci_get_drvdata(dev);
- pcmcia_suspend_socket (socket->pcmcia_socket);
+ if (socket && socket->cls_d.s_info[0])
+ pcmcia_suspend_socket (socket->cls_d.s_info[0]);
return 0;
}
static int cardbus_resume (struct pci_dev *dev)
{
pci_socket_t *socket = pci_get_drvdata(dev);
- pcmcia_resume_socket (socket->pcmcia_socket);
+ if (socket && socket->cls_d.s_info[0])
+ pcmcia_resume_socket (socket->cls_d.s_info[0]);
return 0;
}
diff -ruN linux-original/drivers/pcmcia/pci_socket.h linux/drivers/pcmcia/pci_socket.h
--- linux-original/drivers/pcmcia/pci_socket.h 2003-02-18 09:08:00.000000000 +0100
+++ linux/drivers/pcmcia/pci_socket.h 2003-02-18 09:10:29.000000000 +0100
@@ -20,7 +20,6 @@
socket_cap_t cap;
spinlock_t event_lock;
unsigned int events;
- struct socket_info_t *pcmcia_socket;
struct work_struct tq_task;
struct timer_list poll_timer;
next prev parent reply other threads:[~2003-02-18 8:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-18 1:50 stuff-up in pcmcia/cardbus stuff Paul Mackerras
2003-02-18 8:15 ` Dominik Brodowski [this message]
2003-02-18 9:23 ` [PATCH] " Jeff Garzik
2003-02-18 14:55 ` Dominik Brodowski
2003-02-18 22:14 ` [PATCH, updated] " Dominik Brodowski
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=20030218081529.GA2334@brodo.de \
--to=linux@brodo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
/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