From: Kautuk Consul Date: Mon, 19 Sep 2011 23:53:12 +0000 (-0700) Subject: xhci-mem.c: Check for ring->first_seg != NULL X-Git-Tag: v3.2-rc1~183^2~139 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e6c7f746ea99089fb3263709075c20485a479ae;p=pandora-kernel.git xhci-mem.c: Check for ring->first_seg != NULL There are 2 situations wherein the xhci_ring* might not get freed: - When xhci_ring_alloc() -> xhci_segment_alloc() returns NULL and we goto the fail: label in xhci_ring_alloc. In this case, the ring will not get kfreed. - When the num_segs argument to xhci_ring_alloc is passed as 0 and we try to free the rung after that. ( This doesn't really happen as of now in the code but we seem to be entertaining num_segs=0 in xhci_ring_alloc ) This should be backported to kernels as old as 2.6.31. Signed-off-by: Kautuk Consul Signed-off-by: Sarah Sharp Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed