From: Masahide NAKAMURA <nakam@linux-ipv6.org>
To: Adrian Bunk <bunk@kernel.org>, David Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
nakam@linux-ipv6.org
Subject: Re: [-mm patch] IPV6 must select XFRM
Date: Mon, 03 Sep 2007 19:43:51 +0900 [thread overview]
Message-ID: <20070903193711.6A1D.NAKAM@linux-ipv6.org> (raw)
In-Reply-To: <20070902112557.GK16016@stusta.de>
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
Hello,
On Sun, 2 Sep 2007 13:25:57 +0200
Adrian Bunk <bunk@kernel.org> wrote:
> On Fri, Aug 31, 2007 at 09:58:22PM -0700, Andrew Morton wrote:
> >...
> > Changes since 2.6.23-rc3-mm1:
> >...
> > git-net.patch
> >...
> > git trees
> >...
>
> This patch fixes the following compile error:
>
> <-- snip -->
>
> ...
> LD .tmp_vmlinux1
> net/built-in.o: In function `inet6_csk_xmit':
> (.text+0x72b0f): undefined reference to `flow_cache_genid'
> net/built-in.o: In function `inet6_csk_xmit':
> (.text+0x72be5): undefined reference to `flow_cache_genid'
> make[1]: *** [.tmp_vmlinux1] Error 1
>
> <-- snip -->
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
> --- a/net/ipv6/Kconfig
> +++ b/net/ipv6/Kconfig
> @@ -5,6 +5,7 @@
> # IPv6 as module will cause a CRASH if you try to unload it
> config IPV6
> tristate "The IPv6 protocol"
> + select XFRM
> default m
> ---help---
> This is complemental support for the IP version 6.
>
> -
Thank you for catching this. the issue is caused with patch
"[IPV6] XFRM: Fix connected socket to use transformation."
which I sent to netdev.
(a85d5450ddeb959bdf9e4603f9c06e9d79217cfa on net-2.6.24).
I'd prefer to modify the original patch to use "ifdef CONFIG_XFRM"
than changing kernel config depends. Does it make sense?
Please review the attached patch.
--
Masahide NAKAMURA
[-- Attachment #2: 0001-PATCH-IPV6-XFRM-Fix-dependency-issue-at-inet6_csk_xmit.txt --]
[-- Type: application/octet-stream, Size: 2113 bytes --]
From c9b0d15f8222de7854a6ad504c4562004b99e487 Mon Sep 17 00:00:00 2001
From: Masahide NAKAMURA <nakam@linux-ipv6.org>
Date: Mon, 3 Sep 2007 19:31:32 +0900
Subject: [PATCH] [IPV6] XFRM: Fix dependency issue at inet6_csk_xmit.
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
---
include/net/ip6_fib.h | 2 ++
net/ipv6/inet6_connection_sock.c | 31 ++++++++++++++++++-------------
2 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 85d6d9f..8578213 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -106,7 +106,9 @@ struct rt6_info
u8 rt6i_protocol;
+#ifdef CONFIG_XFRM
u32 rt6i_flow_cache_genid;
+#endif
};
static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index f389322..25b9317 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -143,29 +143,34 @@ static inline
void __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst,
struct in6_addr *daddr, struct in6_addr *saddr)
{
- struct rt6_info *rt = (struct rt6_info *)dst;
-
__ip6_dst_store(sk, dst, daddr, saddr);
- rt->rt6i_flow_cache_genid = atomic_read(&flow_cache_genid);
+
+#ifdef CONFIG_XFRM
+ if (dst) {
+ struct rt6_info *rt = (struct rt6_info *)dst;
+ rt->rt6i_flow_cache_genid = atomic_read(&flow_cache_genid);
+ }
+#endif
}
static inline
struct dst_entry *__inet6_csk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst;
- struct rt6_info *rt;
dst = __sk_dst_check(sk, cookie);
- if (!dst)
- goto end;
-
- rt = (struct rt6_info *)dst;
- if (rt->rt6i_flow_cache_genid != atomic_read(&flow_cache_genid)) {
- sk->sk_dst_cache = NULL;
- dst_release(dst);
- dst = NULL;
+
+#ifdef CONFIG_XFRM
+ if (dst) {
+ struct rt6_info *rt = (struct rt6_info *)dst;
+ if (rt->rt6i_flow_cache_genid != atomic_read(&flow_cache_genid)) {
+ sk->sk_dst_cache = NULL;
+ dst_release(dst);
+ dst = NULL;
+ }
}
- end:
+#endif
+
return dst;
}
--
1.4.4.2
next prev parent reply other threads:[~2007-09-03 10:41 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070831215822.26e1432b.akpm@linux-foundation.org>
[not found] ` <20070901155353.8a09db69.kamezawa.hiroyu@jp.fujitsu.com>
2007-09-01 6:58 ` 2.6.23-rc4-mm1 Andrew Morton
2007-09-01 8:54 ` 2.6.23-rc4-mm1 Herbert Xu
2007-09-01 11:55 ` 2.6.23-rc4-mm1 Kamalesh Babulal
[not found] ` <20070901181352.GA4156@amd64.of.nowhere>
2007-09-01 19:05 ` 2.6.23-rc4-mm1 OOPS in forcedeth? Jeff Garzik
2007-09-02 0:54 ` Satyam Sharma
2007-09-02 5:36 ` thunder7
2007-09-02 6:19 ` thunder7
2007-09-02 9:55 ` Satyam Sharma
2007-09-14 3:51 ` Andrew James Wade
2007-09-17 13:57 ` Dhaval Giani
2007-09-17 14:07 ` Denis V. Lunev
2007-09-17 21:00 ` Vlad Yasevich
2007-09-17 23:56 ` Satyam Sharma
2007-09-01 22:06 ` 2.6.23-rc4-mm1 "no CRC" MODPOST warnings Satyam Sharma
2007-09-01 22:40 ` Adrian Bunk
2007-09-01 23:15 ` Sam Ravnborg
2007-09-02 1:30 ` [PATCH -mm] net/sched/sch_cbq.c: Shut up uninitialized variable warning Satyam Sharma
2007-09-02 11:36 ` Patrick McHardy
2007-09-02 2:36 ` 2.6.23-rc4-mm1: unpingable box and NULL dereference at tcp_rto_min() Alexey Dobriyan
2007-09-02 5:02 ` Satyam Sharma
2007-09-02 20:52 ` Andrew Morton
2007-09-02 21:19 ` Alexey Dobriyan
2007-09-02 9:14 ` 2.6.23-rc4-mm1 net bitops compile error Adrian Bunk
2007-09-04 17:53 ` Jiri Slaby
2007-09-02 11:25 ` [-mm patch] IPV6 must select XFRM Adrian Bunk
2007-09-03 10:43 ` Masahide NAKAMURA [this message]
2007-09-06 10:01 ` net-26.24 broken with XFRM off Noriaki TAKAMIYA
2007-09-04 17:54 ` 2.6.23-rc4-mm1 Zach Carter
2007-09-04 21:36 ` 2.6.23-rc4-mm1 Stephen Hemminger
2007-09-09 20:25 ` [-mm patch] really unexport do_softirq Adrian Bunk
2007-09-12 13:14 ` David Miller
2007-09-09 20:25 ` [-mm patch] unexport raise_softirq_irqoff Adrian Bunk
2007-09-09 20:41 ` Christoph Hellwig
2007-09-12 13:15 ` David Miller
2007-09-09 20:25 ` [-mm patch] net/sctp/socket.c: make 3 variables static Adrian Bunk
2007-09-10 14:05 ` [Lksctp-developers] " Neil Horman
2007-09-12 13:18 ` David Miller
2007-09-09 20:25 ` [-mm patch] make tcp_splice_data_recv() static Adrian Bunk
2007-09-12 13:21 ` David Miller
2007-09-12 17:44 ` Jens Axboe
2007-09-06 7:25 net-26.24 broken with XFRM off Divy Le Ray
2007-09-06 8:13 ` Eric Dumazet
2007-09-06 9:50 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070903193711.6A1D.NAKAM@linux-ipv6.org \
--to=nakam@linux-ipv6.org \
--cc=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).