Skip to contentSkip to conversation

fix typo in 2.4 ipsec backport

PATCH Applied Patrick McHardy 3 participants 3 messages May 13, 2003 – May 15, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix typo in 2.4 ipsec backport

This patch fixes a 0x10-ptr dereference in __xfrm4_find_acq ;)

0x231 <__xfrm4_find_acq+241>: incl 0x10

Best regards,
Patrick

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1210 -> 1.1211
# net/ipv4/xfrm4_state.c 1.3 -> 1.4
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/13 [email protected] 1.1211
# [IPSEC] fix typo
# --------------------------------------------
#

net/ipv4/xfrm4_state.c +1 -1
diff -Nru a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c
@@ -101,7 +101,7 @@
 		x0->lft.hard_add_expires_seconds = XFRM_ACQ_EXPIRES;
 		xfrm_state_hold(x0);
 		mod_timer(&x0->timer, jiffies + XFRM_ACQ_EXPIRES*HZ);
-		xfrm_state_hold(0);
+		xfrm_state_hold(x0);
 		list_add_tail(&x0->bydst, xfrm4_state_afinfo.state_bydst+h);
 		wake_up(&km_waitq);
 	}
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Tue, 13 May 2003 04:28:09 +0200

This patch fixes a 0x10-ptr dereference in __xfrm4_find_acq ;)

The same bug is in 2.5.x too. It's fallout from James Morris's atomic_inc() --> xfrm_state_get() cleanup.

Applied, thanks a lot.

#2 lore raw
In reply to Patrick McHardy

net/ipv4/xfrm4_state.c line 104

Quoted 8 lines · Patrick McHardy
net/ipv4/xfrm4_state.c +1 -1
@@ -101,7 +101,7 @@
 		x0->lft.hard_add_expires_seconds = XFRM_ACQ_EXPIRES;
 		xfrm_state_hold(x0);
 		mod_timer(&x0->timer, jiffies + XFRM_ACQ_EXPIRES*HZ);
-		xfrm_state_hold(0);
+		xfrm_state_hold(x0);

What a blecherous variable name. Somebody is going to try 'fixing' it to 0x0 one of these days.. ;)