OpenBCM V1.08-5-g2f4a (Linux)

Packet Radio Mailbox

IZ3LSV

[San Dona' di P. JN]

 Login: GUEST





  
VK7AX  > LINHAM   14.04.08 12:30l 46 Lines 1453 Bytes #999 (0) @ VKNET
BID : VK7AX-1404KS
Read: GUEST
Subj: [PATCH][AX25]: Potential ax25_uid_assoc-s leaks on module un
Path: IZ3LSV<IK6IHL<I0TVL<F4BWT<PY1AYH<PY1AYH<PY4WVZ<CX2SA<VK2DOT<VK4TRS<
      VK7NW
Sent: 080414/1036Z @:VK7NW.#ULV.TAS.AUS.OC #:43274 [NWTARIG] FBB7.00g $:VK7AX-1
From: VK7AX@VK7NW.#ULV.TAS.AUS.OC
To  : LINHAM@VKNET


From: Pavel Emelyanov <xemul@openvz.org>
Date: Sat, 12 Apr 2008 16:05:44 +0400
To: Ralf Baechle <ralf@linux-mips.org>
CC: David Miller <davem@davemloft.net>, Linux Netdev List <netdev@vger.kernel.org>, linux-hams@vger.kernel.org


The ax25_uid_free call walks the ax25_uid_list and releases
entries from it. The problem is that after the fisrt call to
hlist_del_init the hlist_for_each_entry (which hides behind
the ax25_uid_for_each) will consider the current position to
be the last and will return.

Thus, the whole list will be left not freed.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c
index 5f4eb73..57aeba7 100644
--- a/net/ax25/ax25_uid.c
+++ b/net/ax25/ax25_uid.c
@@ -218,9 +218,11 @@ void __exit ax25_uid_free(void)
 	struct hlist_node *node;
 
 	write_lock(&ax25_uid_lock);
+again:
 	ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
 		hlist_del_init(&ax25_uid->uid_node);
 		ax25_uid_put(ax25_uid);
+		goto again;
 	}
 	write_unlock(&ax25_uid_lock);
 }
--

**************************************************************************
 ABOVE IS A CROSS POST TO THE PACKET RADIO NETWORK IN AN ATTEMPT TO PROMOTE
 FURTHER INTEREST IN HAM SOFTWARE USING LINUX OPERATING SYSTEMS & PACKET RADIO
 Courtesy Tony VK7AX  VK7AX@VK7NW.#ULV.TAS.AUS.OC 
**************************************************************************


Read previous mail | Read next mail


 22.12.2024 21:39:59lGo back Go up