netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: margitsw@t-online.de (Margit Schubert-While)
To: jgarzik@pobox.com
Cc: netdev@oss.sgi.com, prism54-devel@prism54.org
Subject: [PATCH Linux-2.6.8-rc1] prism54 Fix null pointer reference (Bug 100)
Date: Mon, 26 Jul 2004 15:10:45 +0200	[thread overview]
Message-ID: <200407261510.45615.margitsw@t-online.de> (raw)

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

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

* prism54_get/set_debug_oid are missing checks for a null pointer.
  Reported in Bugzilla number 100.

Margit





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

diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c
--- linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c	2004-07-01 07:23:52.000000000 +0200
+++ linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c	2004-07-26 10:35:17.000000000 +0200
@@ -1942,7 +1942,7 @@
 {
 	islpci_private *priv = netdev_priv(ndev);
 	struct islpci_mgmtframe *response = NULL;
-	int ret = -EIO, response_op = PIMFOR_OP_ERROR;
+	int ret = -EIO;
 
 	printk("%s: get_oid 0x%08X\n", ndev->name, priv->priv_oid);
 	data->length = 0;
@@ -1952,9 +1952,7 @@
 		    islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
 					   priv->priv_oid, extra, 256,
 					   &response);
-		response_op = response->header->operation;
 		printk("%s: ret: %i\n", ndev->name, ret);
-		printk("%s: response_op: %i\n", ndev->name, response_op);
 		if (ret || !response
 		    || response->header->operation == PIMFOR_OP_ERROR) {
 			if (response) {
@@ -1991,16 +1989,20 @@
 					   priv->priv_oid, extra, data->length,
 					   &response);
 		printk("%s: ret: %i\n", ndev->name, ret);
+		if (ret || !response
+		    || response->header->operation == PIMFOR_OP_ERROR) {
+			if (response) {
+				islpci_mgt_release(response);
+			}
+			printk("%s: EIO\n", ndev->name);
+			ret = -EIO;
+		}
 		if (!ret) {
 			response_op = response->header->operation;
 			printk("%s: response_op: %i\n", ndev->name,
 			       response_op);
 			islpci_mgt_release(response);
 		}
-		if (ret || response_op == PIMFOR_OP_ERROR) {
-			printk("%s: EIO\n", ndev->name);
-			ret = -EIO;
-		}
 	}
 
 	return (ret ? ret : -EINPROGRESS);

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

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

             reply	other threads:[~2004-07-26 13:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-26 13:10 Margit Schubert-While [this message]
2004-07-27 16:26 ` [PATCH Linux-2.6.8-rc1] prism54 Fix null pointer reference (Bug 100) Jeff Garzik

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=200407261510.45615.margitsw@t-online.de \
    --to=margitsw@t-online.de \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    --cc=prism54-devel@prism54.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;
as well as URLs for NNTP newsgroup(s).