lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081109212849.GA12584@isilmar.linta.de>
Date:	Sun, 9 Nov 2008 22:28:49 +0100
From:	Dominik Brodowski <linux@...inikbrodowski.net>
To:	Frans Pop <elendil@...net.nl>
Cc:	linux-kernel@...r.kernel.org, dbrownell@...rs.sourceforge.net,
	linux-pcmcia@...ts.infradead.org
Subject: Re: [PATCH] pcmcia: ensure correct logging in do_io_probe [v2]

Hi,

On Fri, Nov 07, 2008 at 03:22:42PM +0100, Frans Pop wrote:
> I've added parens around the conditions. Maybe not strictly needed,
> but better readable and consistent with similar usage in cs.c.
>
> From: Frans Pop <elendil@...net.nl>
> 
> pcmcia: ensure correct logging in do_io_probe
>     
> During early probing of the parent PCI bridge I/O window no socket
> has been allocated yet.
> In that case print &s->cb_dev->dev instead of &s->dev as device.

similar to the other patch, this won't work: &skt->cb_dev is only available
and set if the parent device is a PCI device; therefore, &skt->dev is the
only thing we can use.

An alternative approach would be to move this initialization code only after
we've set dev_name. Could you test whether this approach works for you,
please?

Thanks,
	Dominik


>From b1769450da0eeae2d95aae5496acbdf4c6ba89b2 Mon Sep 17 00:00:00 2001
From: Dominik Brodowski <linux@...inikbrodowski.net>
Date: Sun, 9 Nov 2008 21:47:47 +0100
Subject: [PATCH] pcmcia: ensure correct logging in do_io_probe

Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>

diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 5d0e60e..0660ad1 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -186,12 +186,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
 
 	spin_lock_init(&socket->lock);
 
-	if (socket->resource_ops->init) {
-		ret = socket->resource_ops->init(socket);
-		if (ret)
-			return (ret);
-	}
-
 	/* try to obtain a socket number [yes, it gets ugly if we
 	 * register more than 2^sizeof(unsigned int) pcmcia
 	 * sockets... but the socket number is deprecated
@@ -239,6 +233,12 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
 	mutex_init(&socket->skt_mutex);
 	spin_lock_init(&socket->thread_lock);
 
+	if (socket->resource_ops->init) {
+		ret = socket->resource_ops->init(socket);
+		if (ret)
+			goto err;
+	}
+
 	tsk = kthread_run(pccardd, socket, "pccardd");
 	if (IS_ERR(tsk)) {
 		ret = PTR_ERR(tsk);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ