__pnp_add_device dereferences a bad pointer when it traverses
the dev->id chain, because id->next is not initialized in certain cases,
causing my Sony Picturebook pcg-c1vn to crash at boot. Here is a patch.
--
Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
--DocE+STaALJfprDB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
--- linux-2.5.51/drivers/pnp/driver.c 2002-12-09 18:46:14.000000000 -0800
+++ linux/drivers/pnp/driver.c 2002-12-15 02:52:47.000000000 -0800
@@ -164,6 +164,7 @@
return -EINVAL;
if (!dev)
return -EINVAL;
+ id->next = NULL;
ptr = dev->id;
while (ptr && ptr->next)
ptr = ptr->next;
--DocE+STaALJfprDB--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/