]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add qla2xxx fix from Andrew Vasquez and rocket.c ldisc fix from Michal
authorChris Wright <chrisw@osdl.org>
Fri, 15 Jul 2005 00:39:53 +0000 (17:39 -0700)
committerChris Wright <chrisw@osdl.org>
Fri, 15 Jul 2005 00:39:53 +0000 (17:39 -0700)
Ostrowski (sent via akpm).  Also add series file for this new batch.

queue/qla2xxx-fc_remote_port_add-failure-fix.patch [new file with mode: 0644]
queue/rocket_c-fix-ldisc-ref-count.patch [new file with mode: 0644]
queue/series [new file with mode: 0644]

diff --git a/queue/qla2xxx-fc_remote_port_add-failure-fix.patch b/queue/qla2xxx-fc_remote_port_add-failure-fix.patch
new file mode 100644 (file)
index 0000000..d278b39
--- /dev/null
@@ -0,0 +1,34 @@
+From stable-bounces@linux.kernel.org  Thu Jul 14 16:42:44 2005
+Date: Thu, 14 Jul 2005 16:40:04 -0700
+From: Andrew Vasquez <andrew.vasquez@qlogic.com>
+To: stable@kernel.org
+Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>, Michael Reed <mdr@sgi.com>
+Subject: [PATCH] qla2xxx: Correct handling of fc_remote_port_add() failure case.
+
+Correct handling of fc_remote_port_add() failure case.
+
+Immediately return if fc_remote_port_add() fails to allocate
+resources for the rport.  Original code would result in NULL
+pointer dereference upon failure.
+
+Reported-by: Michael Reed <mdr@sgi.com>
+
+Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+---
+
+--- linux-2.6.12.2/drivers/scsi/qla2xxx/qla_init.c.orig        2005-07-14 15:14:14.000000000 -0700
++++ linux-2.6.12.2/drivers/scsi/qla2xxx/qla_init.c     2005-07-14 15:14:54.000000000 -0700
+@@ -1914,9 +1914,11 @@ qla2x00_reg_remote_port(scsi_qla_host_t 
+               rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
+       fcport->rport = rport = fc_remote_port_add(ha->host, 0, &rport_ids);
+-      if (!rport)
++      if (!rport) {
+               qla_printk(KERN_WARNING, ha,
+                   "Unable to allocate fc remote port!\n");
++              return;
++      }
+       if (rport->scsi_target_id != -1 && rport->scsi_target_id < MAX_TARGETS)
+               fcport->os_target_id = rport->scsi_target_id;
diff --git a/queue/rocket_c-fix-ldisc-ref-count.patch b/queue/rocket_c-fix-ldisc-ref-count.patch
new file mode 100644 (file)
index 0000000..9cff972
--- /dev/null
@@ -0,0 +1,42 @@
+From stable-bounces@linux.kernel.org  Thu Jul 14 16:54:10 2005
+To: stable@kernel.org
+From: akpm@osdl.org
+Date: Thu, 14 Jul 2005 16:46:26 -0700
+Cc: akpm@osdl.org, mostrows@watson.ibm.com
+Subject: [patch] rocket.c: Fix ldisc ref count handling
+
+From: Michal Ostrowski <mostrows@watson.ibm.com>
+
+If bailing out because there is nothing to receive in rp_do_receive(),
+tty_ldisc_deref is not called.  Failure to do so increases the ref count=20
+and causes release_dev() to hang since it can't get the ref count to 0.
+
+Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+---
+
+ drivers/char/rocket.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletion(-)
+
+Index: linux-2.6.12.y/drivers/char/rocket.c
+===================================================================
+--- linux-2.6.12.y.orig/drivers/char/rocket.c
++++ linux-2.6.12.y/drivers/char/rocket.c
+@@ -277,7 +277,7 @@ static void rp_do_receive(struct r_port 
+               ToRecv = space;
+       if (ToRecv <= 0)
+-              return;
++              goto done;
+       /*
+        * if status indicates there are errored characters in the
+@@ -359,6 +359,7 @@ static void rp_do_receive(struct r_port 
+       }
+       /*  Push the data up to the tty layer */
+       ld->receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count);
++done:
+       tty_ldisc_deref(ld);
+ }
diff --git a/queue/series b/queue/series
new file mode 100644 (file)
index 0000000..9911b90
--- /dev/null
@@ -0,0 +1,3 @@
+kbuild-fix-tags-problem-with-o.patch
+qla2xxx-fc_remote_port_add-failure-fix.patch
+rocket_c-fix-ldisc-ref-count.patch