netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH Linux-2.6.8-rc1] prism54 Fix reference to uninitialized pointer
@ 2004-07-15 13:52 Margit Schubert-While
  2004-07-27 16:26 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Margit Schubert-While @ 2004-07-15 13:52 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, prism54-devel

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

2004-07-15 Margit Schubert-While <margitsw@t-online.de>

* oid_mgt.c is calling islpci_mgt_transaction passing the address
  of a pointer to the management frame. This is not being
  initialized by the caller. The callee only updates this
  pointer when successful. When not, boom.

* Being ultracautious again, not only initialize in the caller,
  also null out the pointer unconditionally in the callee.


Margit









[-- Attachment #2: mgtframeptr.patch --]
[-- Type: text/x-diff, Size: 1266 bytes --]

diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/islpci_mgt.c linux-2.6.8-03/drivers/net/wireless/prism54/islpci_mgt.c
--- linux-2.6.8-01/drivers/net/wireless/prism54/islpci_mgt.c	2004-06-25 19:48:40.000000000 +0200
+++ linux-2.6.8-03/drivers/net/wireless/prism54/islpci_mgt.c	2004-07-15 15:17:21.000000000 +0200
@@ -458,6 +458,8 @@
 	int err;
 	DEFINE_WAIT(wait);
 
+	*recvframe = NULL;
+
 	if (down_interruptible(&priv->mgmt_sem))
 		return -ERESTARTSYS;
 
diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.8-03/drivers/net/wireless/prism54/oid_mgt.c
--- linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c	2004-07-14 21:55:11.000000000 +0200
+++ linux-2.6.8-03/drivers/net/wireless/prism54/oid_mgt.c	2004-07-15 15:13:53.000000000 +0200
@@ -408,7 +408,7 @@
 mgt_set_request(islpci_private *priv, enum oid_num_t n, int extra, void *data)
 {
 	int ret = 0;
-	struct islpci_mgmtframe *response;
+	struct islpci_mgmtframe *response = NULL;
 	int response_op = PIMFOR_OP_ERROR;
 	int dlen;
 	void *cache, *_data = data;
@@ -620,7 +620,7 @@
 static int
 mgt_update_addr(islpci_private *priv)
 {
-	struct islpci_mgmtframe *res;
+	struct islpci_mgmtframe *res = NULL;
 	int ret;
 
 	ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,

[-- Attachment #3: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Prism54-devel mailing list
Prism54-devel@prism54.org
http://prism54.org/mailman/listinfo/prism54-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH Linux-2.6.8-rc1] prism54 Fix reference to uninitialized pointer
  2004-07-15 13:52 [PATCH Linux-2.6.8-rc1] prism54 Fix reference to uninitialized pointer Margit Schubert-While
@ 2004-07-27 16:26 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2004-07-27 16:26 UTC (permalink / raw)
  To: Margit Schubert-While; +Cc: netdev, prism54-devel

applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-27 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-15 13:52 [PATCH Linux-2.6.8-rc1] prism54 Fix reference to uninitialized pointer Margit Schubert-While
2004-07-27 16:26 ` Jeff Garzik

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).