* [2.6 patch] drivers/scsi/dpt_i2o.c: fix a NULL pointer dereference
@ 2005-11-20 23:00 Adrian Bunk
2005-11-20 23:08 ` [2.6 patch] drivers/message/i2o/pci.c: " Adrian Bunk
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2005-11-20 23:00 UTC (permalink / raw)
To: markus.lidel, James.Bottomley; +Cc: linux-scsi, linux-kernel, stable
The Coverity checker spotted this obvious NULL pointer dereference.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/scsi/dpt_i2o.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- linux-2.6.15-rc1-mm2-full/drivers/scsi/dpt_i2o.c.old 2005-11-20 22:13:37.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/scsi/dpt_i2o.c 2005-11-20 22:16:57.000000000 +0100
@@ -816,7 +816,7 @@
static void adpt_i2o_sys_shutdown(void)
{
adpt_hba *pHba, *pNext;
- struct adpt_i2o_post_wait_data *p1, *p2;
+ struct adpt_i2o_post_wait_data *p1, *old;
printk(KERN_INFO"Shutting down Adaptec I2O controllers.\n");
printk(KERN_INFO" This could take a few minutes if there are many devices attached\n");
@@ -830,13 +830,14 @@
}
/* Remove any timedout entries from the wait queue. */
- p2 = NULL;
// spin_lock_irqsave(&adpt_post_wait_lock, flags);
/* Nothing should be outstanding at this point so just
* free them
*/
- for(p1 = adpt_post_wait_queue; p1; p2 = p1, p1 = p2->next) {
- kfree(p1);
+ for(p1 = adpt_post_wait_queue; p1;) {
+ old = p1;
+ p1 = p1->next;
+ kfree(old);
}
// spin_unlock_irqrestore(&adpt_post_wait_lock, flags);
adpt_post_wait_queue = NULL;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [2.6 patch] drivers/message/i2o/pci.c: fix a NULL pointer dereference
@ 2005-11-20 23:08 ` Adrian Bunk
2005-11-20 23:14 ` [2.6 patch] drivers/infiniband/core/mad.c: " Adrian Bunk
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2005-11-20 23:08 UTC (permalink / raw)
To: markus.lidel; +Cc: linux-kernel, stable
The Coverity checker spotted this obvious NULL pointer dereference.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c.old 2005-11-20 21:50:45.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c 2005-11-20 21:51:08.000000000 +0100
@@ -421,8 +421,8 @@
i2o_pci_free(c);
free_controller:
- i2o_iop_free(c);
put_device(c->device.parent);
+ i2o_iop_free(c);
disable:
pci_disable_device(pdev);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [2.6 patch] drivers/infiniband/core/mad.c: fix a NULL pointer dereference
@ 2005-11-20 23:14 ` Adrian Bunk
2005-11-21 0:24 ` [stable] " Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2005-11-20 23:14 UTC (permalink / raw)
To: rolandd, mshefty, halr; +Cc: openib-general, linux-kernel, stable
The Coverity checker spotted this obvious NULL pointer dereference
caused by a wrong order of the cleanups.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.15-rc1-mm2-full/drivers/infiniband/core/mad.c.old 2005-11-20 22:04:36.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/infiniband/core/mad.c 2005-11-20 22:05:17.000000000 +0100
@@ -355,9 +355,9 @@
spin_unlock_irqrestore(&port_priv->reg_lock, flags);
kfree(reg_req);
error3:
- kfree(mad_agent_priv);
-error2:
ib_dereg_mr(mad_agent_priv->agent.mr);
+error2:
+ kfree(mad_agent_priv);
error1:
return ret;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [stable] [2.6 patch] drivers/infiniband/core/mad.c: fix a NULL pointer dereference
2005-11-20 23:14 ` [2.6 patch] drivers/infiniband/core/mad.c: " Adrian Bunk
@ 2005-11-21 0:24 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2005-11-21 0:24 UTC (permalink / raw)
To: Adrian Bunk
Cc: rolandd, mshefty, halr, linux-kernel, openib-general, stable,
markus.lidel, James.Bottomley, linux-scsi
Please send these again to the stable@ address when they have been
accepted into upstream.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [2.6 patch] drivers/message/i2o/pci.c: fix a NULL pointer dereference
@ 2005-11-23 22:34 Adrian Bunk
0 siblings, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2005-11-23 22:34 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: markus.lidel, linux-kernel
The Coverity checker spotted this obvious NULL pointer dereference.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 21 Nov 2005
--- linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c.old 2005-11-20 21:50:45.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c 2005-11-20 21:51:08.000000000 +0100
@@ -421,8 +421,8 @@
i2o_pci_free(c);
free_controller:
- i2o_iop_free(c);
put_device(c->device.parent);
+ i2o_iop_free(c);
disable:
pci_disable_device(pdev);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [2.6 patch] drivers/message/i2o/pci.c: fix a NULL pointer dereference
@ 2005-11-26 23:37 Adrian Bunk
2005-11-27 16:32 ` Markus Lidel
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2005-11-26 23:37 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: markus.lidel, linux-kernel
The Coverity checker spotted this obvious NULL pointer dereference.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 23 Nov 2005
- 21 Nov 2005
--- linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c.old 2005-11-20 21:50:45.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c 2005-11-20 21:51:08.000000000 +0100
@@ -421,8 +421,8 @@
i2o_pci_free(c);
free_controller:
- i2o_iop_free(c);
put_device(c->device.parent);
+ i2o_iop_free(c);
disable:
pci_disable_device(pdev);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [2.6 patch] drivers/message/i2o/pci.c: fix a NULL pointer dereference
2005-11-26 23:37 Adrian Bunk
@ 2005-11-27 16:32 ` Markus Lidel
0 siblings, 0 replies; 7+ messages in thread
From: Markus Lidel @ 2005-11-27 16:32 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Linus Torvalds, Andrew Morton, linux-kernel
Hello,
Adrian Bunk wrote:
> The Coverity checker spotted this obvious NULL pointer dereference.
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com
> This patch was already sent on:
> - 23 Nov 2005
> - 21 Nov 2005
Sorry, didn't know i have to answer to it. Next time i will respond earlier.
Thank you very much for this patch!
> --- linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c.old 2005-11-20 21:50:45.000000000 +0100
> +++ linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c 2005-11-20 21:51:08.000000000 +0100
> @@ -421,8 +421,8 @@
> i2o_pci_free(c);
>
> free_controller:
> - i2o_iop_free(c);
> put_device(c->device.parent);
> + i2o_iop_free(c);
>
> disable:
> pci_disable_device(pdev);
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-11-27 16:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-20 23:00 [2.6 patch] drivers/scsi/dpt_i2o.c: fix a NULL pointer dereference Adrian Bunk
2005-11-20 23:08 ` [2.6 patch] drivers/message/i2o/pci.c: " Adrian Bunk
2005-11-20 23:14 ` [2.6 patch] drivers/infiniband/core/mad.c: " Adrian Bunk
2005-11-21 0:24 ` [stable] " Greg KH
-- strict thread matches above, loose matches on Subject: below --
2005-11-23 22:34 [2.6 patch] drivers/message/i2o/pci.c: " Adrian Bunk
2005-11-26 23:37 Adrian Bunk
2005-11-27 16:32 ` Markus Lidel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox