From: Nicu Ioan Petru Date: Fri, 13 Apr 2007 06:26:29 +0000 (-0500) Subject: ucc_geth: fixes for ucc_geth_memclean X-Git-Tag: v2.6.22-rc1~1110^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a8205ead4dc4b05fbc164eeb852b8f8921d11d3;p=pandora-kernel.git ucc_geth: fixes for ucc_geth_memclean The ucc_geth_memclean function can be called before the Tx BD rings, Rx BD rings and associated socket buffers are allocated (for example if ucc_fast_init fails). The current code doesn't check if p_tx_bd_ring[i] is null, generating a kernel panic when trying to free the associated socket buffers. The function can also fail when accessing the uninitialized list_head structures ugeth->group_hash_q and ugeth->ind_hash_q. In the current implementation the list heads are initialized only when maxGroupAddrInHash and maxIndAddrInHash are positive values, although I think it's better to always initialize them. Signed-off-by: Ionut Nicu Signed-off-by: Kim Phillips Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed