diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-04-09 13:37:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-11 04:53:06 -0400 |
commit | 499923c7a3254971873e55a1690d07d3700eea47 (patch) | |
tree | 42c5c7281d9edd02e8130ee72306a5f5d8a2f367 /net/ipv4 | |
parent | 48f6e8990858fc9a0ca7d3c9347e6774eb941dba (diff) |
ipv6: Fix NULL pointer dereference with time-wait sockets
Commit b2f5e7cd3dee2ed721bf0675e1a1ddebb849aee6
(ipv6: Fix conflict resolutions during ipv6 binding)
introduced a regression where time-wait sockets were
not treated correctly. This resulted in the following:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000062
IP: [<ffffffff805d7d61>] ipv4_rcv_saddr_equal+0x61/0x70
...
Call Trace:
[<ffffffffa033847b>] ipv6_rcv_saddr_equal+0x1bb/0x250 [ipv6]
[<ffffffffa03505a8>] inet6_csk_bind_conflict+0x88/0xd0 [ipv6]
[<ffffffff805bb18e>] inet_csk_get_port+0x1ee/0x400
[<ffffffffa0319b7f>] inet6_bind+0x1cf/0x3a0 [ipv6]
[<ffffffff8056d17c>] ? sockfd_lookup_light+0x3c/0xd0
[<ffffffff8056ed49>] sys_bind+0x89/0x100
[<ffffffff80613ea2>] ? trace_hardirqs_on_thunk+0x3a/0x3c
[<ffffffff8020bf9b>] system_call_fastpath+0x16/0x1b
Tested-by: Brian Haley <brian.haley@hp.com>
Tested-by: Ed Tomlinson <edt@aei.ca>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/udp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index bda08a09357d..7a1d1ce22e66 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -222,7 +222,7 @@ fail: | |||
222 | return error; | 222 | return error; |
223 | } | 223 | } |
224 | 224 | ||
225 | int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2) | 225 | static int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2) |
226 | { | 226 | { |
227 | struct inet_sock *inet1 = inet_sk(sk1), *inet2 = inet_sk(sk2); | 227 | struct inet_sock *inet1 = inet_sk(sk1), *inet2 = inet_sk(sk2); |
228 | 228 | ||
@@ -1823,7 +1823,6 @@ EXPORT_SYMBOL(udp_lib_getsockopt); | |||
1823 | EXPORT_SYMBOL(udp_lib_setsockopt); | 1823 | EXPORT_SYMBOL(udp_lib_setsockopt); |
1824 | EXPORT_SYMBOL(udp_poll); | 1824 | EXPORT_SYMBOL(udp_poll); |
1825 | EXPORT_SYMBOL(udp_lib_get_port); | 1825 | EXPORT_SYMBOL(udp_lib_get_port); |
1826 | EXPORT_SYMBOL(ipv4_rcv_saddr_equal); | ||
1827 | 1826 | ||
1828 | #ifdef CONFIG_PROC_FS | 1827 | #ifdef CONFIG_PROC_FS |
1829 | EXPORT_SYMBOL(udp_proc_register); | 1828 | EXPORT_SYMBOL(udp_proc_register); |