From 3a8205ead4dc4b05fbc164eeb852b8f8921d11d3 Mon Sep 17 00:00:00 2001 From: Nicu Ioan Petru Date: Fri, 13 Apr 2007 01:26:29 -0500 Subject: [PATCH] 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-format-patch failed