linux/include/net
Wei Yongjun a454f0ccef xfrm: Fix initialize repl field of struct xfrm_state
Commit 'xfrm: Move IPsec replay detection functions to a separate file'
  (9fdc4883d9)
introduce repl field to struct xfrm_state, and only initialize it
under SA's netlink create path, the other path, such as pf_key,
ipcomp/ipcomp6 etc, the repl field remaining uninitialize. So if
the SA is created by pf_key, any input packet with SA's encryption
algorithm will cause panic.

    int xfrm_input()
    {
        ...
        x->repl->advance(x, seq);
        ...
    }

This patch fixed it by introduce new function __xfrm_init_state().

Pid: 0, comm: swapper Not tainted 2.6.38-next+ #14 Bochs Bochs
EIP: 0060:[<c078e5d5>] EFLAGS: 00010206 CPU: 0
EIP is at xfrm_input+0x31c/0x4cc
EAX: dd839c00 EBX: 00000084 ECX: 00000000 EDX: 01000000
ESI: dd839c00 EDI: de3a0780 EBP: dec1de88 ESP: dec1de64
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process swapper (pid: 0, ti=dec1c000 task=c09c0f20 task.ti=c0992000)
Stack:
 00000000 00000000 00000002 c0ba27c0 00100000 01000000 de3a0798 c0ba27c0
 00000033 dec1de98 c0786848 00000000 de3a0780 dec1dea4 c0786868 00000000
 dec1debc c074ee56 e1da6b8c de3a0780 c074ed44 de3a07a8 dec1decc c074ef32
Call Trace:
 [<c0786848>] xfrm4_rcv_encap+0x22/0x27
 [<c0786868>] xfrm4_rcv+0x1b/0x1d
 [<c074ee56>] ip_local_deliver_finish+0x112/0x1b1
 [<c074ed44>] ? ip_local_deliver_finish+0x0/0x1b1
 [<c074ef32>] NF_HOOK.clone.1+0x3d/0x44
 [<c074ef77>] ip_local_deliver+0x3e/0x44
 [<c074ed44>] ? ip_local_deliver_finish+0x0/0x1b1
 [<c074ec03>] ip_rcv_finish+0x30a/0x332
 [<c074e8f9>] ? ip_rcv_finish+0x0/0x332
 [<c074ef32>] NF_HOOK.clone.1+0x3d/0x44
 [<c074f188>] ip_rcv+0x20b/0x247
 [<c074e8f9>] ? ip_rcv_finish+0x0/0x332
 [<c072797d>] __netif_receive_skb+0x373/0x399
 [<c0727bc1>] netif_receive_skb+0x4b/0x51
 [<e0817e2a>] cp_rx_poll+0x210/0x2c4 [8139cp]
 [<c072818f>] net_rx_action+0x9a/0x17d
 [<c0445b5c>] __do_softirq+0xa1/0x149
 [<c0445abb>] ? __do_softirq+0x0/0x149

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-21 18:08:28 -07:00
..
9p net/9p: Implement syncfs 9P operation 2011-03-15 09:57:38 -05:00
bluetooth Bluetooth: Move index to common header in management interface 2011-02-27 16:56:41 -03:00
caif include/net/caif/cfctrl.h: Remove unnecessary semicolons 2010-11-15 11:07:16 -08:00
irda tty: now phase out the ioctl file pointer for good 2011-02-17 11:59:56 -08:00
iucv
netfilter Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-02-19 19:17:35 -08:00
netns ipvs: move struct netns_ipvs 2011-03-15 09:36:50 +09:00
phonet Phonet: allocate sock from accept syscall rather than soft IRQ 2011-03-09 11:59:32 -08:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2011-01-19 20:25:45 -08:00
tc_act net/sched: add ACT_CSUM action to update packets checksums 2010-08-20 01:42:59 -07:00
act_api.h pkt_sched: gen_kill_estimator() rcu fixes 2010-06-11 18:37:08 -07:00
addrconf.h net: kill unused macros from head file 2010-12-02 13:27:33 -08:00
af_ieee802154.h
af_rxrpc.h
af_unix.h af_unix: limit recursion level 2010-11-29 09:45:15 -08:00
ah.h ipsec: update MAX_AH_AUTH_LEN to support sha512 2011-01-13 21:48:25 -08:00
arp.h arp: allow to invalidate specific ARP entries 2011-01-10 16:10:37 -08:00
atmclip.h
ax25.h
ax88796.h
cfg80211.h wireless: add support for ethtool_ops->{get,set}_ringparam 2011-03-11 14:16:58 -05:00
checksum.h
cipso_ipv4.h
cls_cgroup.h Merge commit 'v2.6.36-rc7' into core/rcu 2010-10-07 09:43:45 +02:00
compat.h
datalink.h
dcbevent.h net_dcb: add application notifiers 2010-12-31 10:47:46 -08:00
dcbnl.h dcbnl: add support for retrieving peer configuration - cee 2011-03-02 21:58:55 -08:00
dn.h decnet: Convert to use flowidn where applicable. 2011-03-12 15:08:55 -08:00
dn_dev.h decnet: RCU conversion and get rid of dev_base_lock 2010-11-08 13:50:08 -08:00
dn_fib.h decnet: Convert to use flowidn where applicable. 2011-03-12 15:08:55 -08:00
dn_neigh.h
dn_nsp.h net: use __packed annotation 2010-06-03 03:21:52 -07:00
dn_route.h decnet: Convert to use flowidn where applicable. 2011-03-12 15:08:55 -08:00
dsa.h
dsfield.h
dst.h xfrm: Return dst directly from xfrm_lookup() 2011-03-02 13:27:41 -08:00
dst_ops.h net: Implement read-only protection and COW'ing of metrics. 2011-01-26 20:51:05 -08:00
esp.h
ethoc.h
fib_rules.h fib_rules: __rcu annotates ctarget 2010-10-27 11:37:32 -07:00
flow.h decnet: Convert to use flowidn where applicable. 2011-03-12 15:08:55 -08:00
garp.h net/802: add __rcu annotations 2010-10-25 13:09:44 -07:00
gen_stats.h
genetlink.h include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argument 2011-02-03 20:47:08 -08:00
gre.h PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol) 2010-08-21 23:05:39 -07:00
icmp.h inetpeer: Move ICMP rate limiting state into inet_peer entries. 2011-02-04 15:59:53 -08:00
ieee80211_radiotap.h mac80211: add MCS information to radiotap 2011-01-28 15:44:29 -05:00
ieee802154.h
ieee802154_netdev.h
if_inet6.h ipv6: mcast: RCU conversion 2010-11-24 11:16:42 -08:00
inet6_connection_sock.h ipv6: Create inet6_csk_route_req(). 2010-12-02 10:59:22 -08:00
inet6_hashtables.h
inet_common.h inet, inet6: make tcp_sendmsg() and tcp_sendpage() through inet_sendmsg() and inet_sendpage() 2010-07-12 20:21:46 -07:00
inet_connection_sock.h net: kill unused macros 2010-12-19 21:59:35 -08:00
inet_ecn.h net: return operator cleanup 2010-09-23 14:33:39 -07:00
inet_frag.h fragment: add fast path for in-order fragments 2010-06-30 13:44:29 -07:00
inet_hashtables.h tproxy: fix hash locking issue when using port redirection in __inet_inherit_port() 2010-10-21 13:06:43 +02:00
inet_sock.h inet: Remove explicit write references to sk/inet in ip_append_data 2011-03-01 12:35:02 -08:00
inet_timewait_sock.h net: optimize INET input path further 2010-12-09 20:05:58 -08:00
inetpeer.h inetpeer: Add redirect and PMTU discovery cached info. 2011-02-10 13:29:30 -08:00
ip.h inet: Add ip_make_skb and ip_finish_skb 2011-03-01 12:35:03 -08:00
ip6_checksum.h
ip6_fib.h ipv6: Convert to use flowi6 where applicable. 2011-03-12 15:08:54 -08:00
ip6_route.h ipv6: Convert to use flowi6 where applicable. 2011-03-12 15:08:54 -08:00
ip6_tunnel.h tunnels: add _rcu annotations 2010-10-25 13:09:45 -07:00
ip_fib.h ipv4: Pass ipv4 flow objects into fib_lookup() paths. 2011-03-12 15:08:47 -08:00
ip_vs.h IPVS: Conditionally include sysctl members of struct netns_ipvs 2011-03-15 09:37:02 +09:00
ipcomp.h
ipconfig.h
ipip.h tunnels: add __rcu annotations 2010-10-27 11:37:32 -07:00
ipv6.h ipv6: Convert to use flowi6 where applicable. 2011-03-12 15:08:54 -08:00
ipx.h net: use __packed annotation 2010-06-03 03:21:52 -07:00
iw_handler.h
lapb.h
lib80211.h lib80211: remove unused host_build_iv option 2010-07-26 15:09:04 -04:00
llc.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
mac80211.h mac80211: implement support for cfg80211_ops->{get,set}_ringparam 2011-03-11 15:34:10 -05:00
mip6.h net: use __packed annotation 2010-06-03 03:21:52 -07:00
mld.h ipv6 mcast: Introduce include/net/mld.h for MLD definitions. 2010-04-23 13:35:55 +09:00
ndisc.h net: kill unused macros from head file 2010-12-02 13:27:33 -08:00
neighbour.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-11-19 13:13:47 -08:00
net_namespace.h ipvs: move struct netns_ipvs 2011-03-15 09:36:50 +09:00
netdma.h
netevent.h net: Kill NETEVENT_PMTU_UPDATE. 2011-02-08 16:17:55 -08:00
netlabel.h
netlink.h netfilter: NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros 2011-02-01 15:20:14 +01:00
netrom.h
nexthop.h
nl802154.h
p8022.h
pkt_cls.h net: Fix range checks in tcf_valid_offset(). 2010-12-21 12:43:16 -08:00
pkt_sched.h net: Define accessors to manipulate QDISC_STATE_RUNNING 2010-06-02 03:23:51 -07:00
protocol.h net: change netdev->features to u32 2011-01-24 15:32:47 -08:00
psnap.h
raw.h include/net/raw.h: Convert raw_seq_private macro to inline 2010-09-08 13:42:22 -07:00
rawv6.h
red.h sched: remove unused backlog in RED stats 2011-01-12 19:00:39 -08:00
regulatory.h cfg80211: Fix regulatory bug with multiple cards and delays 2010-11-22 15:48:51 -05:00
request_sock.h
rose.h
route.h net: Put fl4_* macros to struct flowi4 and use them again. 2011-03-12 15:08:54 -08:00
rtnetlink.h rtnl: make link af-specific updates atomic 2010-11-27 22:56:08 -08:00
sch_generic.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-03-03 21:27:42 -08:00
scm.h scm: lower SCM_MAX_FD 2010-11-24 11:16:43 -08:00
slhc_vj.h
snmp.h net: kill unused macros from head file 2010-12-02 13:27:33 -08:00
sock.h net: add __rcu annotations to sk_wq and wq 2011-02-22 10:19:31 -08:00
stp.h
tcp.h tcp: Remove debug macro of TCP_CHECK_TIMER 2011-02-20 11:10:14 -08:00
tcp_states.h
timewait_sock.h timewait_sock: Create and use getpeer op. 2010-12-01 18:09:13 -08:00
transp_v6.h ipv6: Convert to use flowi6 where applicable. 2011-03-12 15:08:54 -08:00
udp.h udp: Switch to ip_finish_skb 2011-03-01 12:35:03 -08:00
udplite.h udp: Switch to ip_finish_skb 2011-03-01 12:35:03 -08:00
wext.h
wimax.h
wpan-phy.h
x25.h X25 remove bkl in subscription ioctls 2010-11-28 11:12:20 -08:00
x25device.h X25: Add if_x25.h and x25 to device identifiers 2010-04-22 16:12:36 -07:00
xfrm.h xfrm: Fix initialize repl field of struct xfrm_state 2011-03-21 18:08:28 -07:00