]> err.no Git - systemd/commit
udevadm: enumerate - update prev pointer properly
authorKei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Tue, 15 Feb 2011 09:59:24 +0000 (18:59 +0900)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 15 Feb 2011 21:28:31 +0000 (22:28 +0100)
commitc54b43e2c233e724f840c4f6a0a81bdd549e40bb
tree75d001404d4fb865861ee867167db590873a9043
parentf3f70f8d9ef6a901bf1bdff10008d76e72bb6692
udevadm: enumerate - update prev pointer properly

When I tried to boot a system with 256 disks x 4 paths with
device-mapper, udevadm trigger (--type=devices) that was called
from start_udev ended up dumping a core due to a segmentation
fault.

In udev_enumerate_get_list_entry(), if it finds the devices that
should be delayed, it calls syspath_add().  If realloc() in
syspath_add() allocates the required memory at a different memory
address, referring prev->len afterward causes the segmentation
fault.

Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
libudev/libudev-enumerate.c