* [-mm patch] net/: make code static
[not found] <20060806030809.2cfb0b1e.akpm@osdl.org>
@ 2006-08-07 15:49 ` Adrian Bunk
2006-08-08 4:51 ` David Miller
2006-08-07 21:04 ` [RFC: -mm patch] bcm43xx_main.c: remove 3 functions Adrian Bunk
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2006-08-07 15:49 UTC (permalink / raw)
To: Andrew Morton, davem; +Cc: linux-kernel, netdev
This patch makes needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
BTW:
It doesn't seem to be intended that the new
ipv4/fib_rules.c:fib4_rules_cleanup() is completely unused?
include/net/ip6_fib.h | 4 ----
net/ipv4/cipso_ipv4.c | 2 +-
net/ipv4/fib_rules.c | 4 ++--
net/ipv6/fib6_rules.c | 4 ++--
net/ipv6/ip6_fib.c | 6 +++---
net/ipv6/route.c | 6 +++---
net/netlabel/netlabel_domainhash.c | 4 ++--
7 files changed, 13 insertions(+), 17 deletions(-)
--- linux-2.6.18-rc3-mm2-full/net/ipv4/cipso_ipv4.c.old 2006-08-07 16:39:05.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/net/ipv4/cipso_ipv4.c 2006-08-07 16:39:15.000000000 +0200
@@ -60,7 +60,7 @@
* if in practice there are a lot of different DOIs this list should
* probably be turned into a hash table or something similar so we
* can do quick lookups. */
-DEFINE_SPINLOCK(cipso_v4_doi_list_lock);
+static DEFINE_SPINLOCK(cipso_v4_doi_list_lock);
static struct list_head cipso_v4_doi_list = LIST_HEAD_INIT(cipso_v4_doi_list);
/* Label mapping cache */
--- linux-2.6.18-rc3-mm2-full/net/ipv4/fib_rules.c.old 2006-08-07 16:39:33.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/net/ipv4/fib_rules.c 2006-08-07 16:39:51.000000000 +0200
@@ -101,8 +101,8 @@
return err;
}
-int fib4_rule_action(struct fib_rule *rule, struct flowi *flp, int flags,
- struct fib_lookup_arg *arg)
+static int fib4_rule_action(struct fib_rule *rule, struct flowi *flp,
+ int flags, struct fib_lookup_arg *arg)
{
int err = -EAGAIN;
struct fib_table *tbl;
--- linux-2.6.18-rc3-mm2-full/net/ipv6/fib6_rules.c.old 2006-08-07 16:41:07.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/net/ipv6/fib6_rules.c 2006-08-07 16:41:16.000000000 +0200
@@ -66,8 +66,8 @@
return (struct dst_entry *) arg.result;
}
-int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
- int flags, struct fib_lookup_arg *arg)
+static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
+ int flags, struct fib_lookup_arg *arg)
{
struct rt6_info *rt = NULL;
struct fib6_table *table;
--- linux-2.6.18-rc3-mm2-full/include/net/ip6_fib.h.old 2006-08-07 16:41:36.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/include/net/ip6_fib.h 2006-08-07 16:41:43.000000000 +0200
@@ -192,10 +192,6 @@
struct in6_addr *daddr, int dst_len,
struct in6_addr *saddr, int src_len);
-extern void fib6_clean_tree(struct fib6_node *root,
- int (*func)(struct rt6_info *, void *arg),
- int prune, void *arg);
-
extern void fib6_clean_all(int (*func)(struct rt6_info *, void *arg),
int prune, void *arg);
--- linux-2.6.18-rc3-mm2-full/net/ipv6/ip6_fib.c.old 2006-08-07 16:41:51.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/net/ipv6/ip6_fib.c 2006-08-07 16:42:05.000000000 +0200
@@ -1169,9 +1169,9 @@
* ignoring pure split nodes) will be scanned.
*/
-void fib6_clean_tree(struct fib6_node *root,
- int (*func)(struct rt6_info *, void *arg),
- int prune, void *arg)
+static void fib6_clean_tree(struct fib6_node *root,
+ int (*func)(struct rt6_info *, void *arg),
+ int prune, void *arg)
{
struct fib6_cleaner_t c;
--- linux-2.6.18-rc3-mm2-full/net/ipv6/route.c.old 2006-08-07 16:42:24.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/net/ipv6/route.c 2006-08-07 16:43:05.000000000 +0200
@@ -613,8 +613,8 @@
return rt;
}
-struct rt6_info *ip6_pol_route_input(struct fib6_table *table, struct flowi *fl,
- int flags)
+static struct rt6_info *ip6_pol_route_input(struct fib6_table *table,
+ struct flowi *fl, int flags)
{
struct fib6_node *fn;
struct rt6_info *rt, *nrt;
@@ -872,7 +872,7 @@
}
static struct dst_entry *ndisc_dst_gc_list;
-DEFINE_SPINLOCK(ndisc_lock);
+static DEFINE_SPINLOCK(ndisc_lock);
struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
struct neighbour *neigh,
--- linux-2.6.18-rc3-mm2-full/net/netlabel/netlabel_domainhash.c.old 2006-08-07 16:43:27.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/net/netlabel/netlabel_domainhash.c 2006-08-07 16:43:53.000000000 +0200
@@ -50,11 +50,11 @@
/* Domain hash table */
/* XXX - updates should be so rare that having one spinlock for the entire
* hash table should be okay */
-DEFINE_SPINLOCK(netlbl_domhsh_lock);
+static DEFINE_SPINLOCK(netlbl_domhsh_lock);
static struct netlbl_domhsh_tbl *netlbl_domhsh = NULL;
/* Default domain mapping */
-DEFINE_SPINLOCK(netlbl_domhsh_def_lock);
+static DEFINE_SPINLOCK(netlbl_domhsh_def_lock);
static struct netlbl_dom_map *netlbl_domhsh_def = NULL;
/*
^ permalink raw reply [flat|nested] 12+ messages in thread
* [RFC: -mm patch] bcm43xx_main.c: remove 3 functions
[not found] <20060806030809.2cfb0b1e.akpm@osdl.org>
2006-08-07 15:49 ` [-mm patch] net/: make code static Adrian Bunk
@ 2006-08-07 21:04 ` Adrian Bunk
2006-08-08 18:32 ` Michael Buesch
2006-08-10 17:38 ` 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked Valdis.Kletnieks
2006-08-11 2:15 ` 2.6.18-rc3-mm2 - BUG in rt6_lookup() from ipv6_del_addr() Valdis.Kletnieks
3 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2006-08-07 21:04 UTC (permalink / raw)
To: Andrew Morton, Michael Buesch, linville, jgarzik; +Cc: linux-kernel, netdev
This patch removes three no longer used functions (that are even
generating gcc warnings).
This patch doesn't look right, but it is the result of
58e5528ee464d38040b9489e10033c9387a10d56 in git-netdev...
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/wireless/bcm43xx/bcm43xx_main.c | 33 --------------------
1 file changed, 33 deletions(-)
--- linux-2.6.18-rc3-mm2-full/drivers/net/wireless/bcm43xx/bcm43xx_main.c.old 2006-08-07 18:21:31.000000000 +0200
+++ linux-2.6.18-rc3-mm2-full/drivers/net/wireless/bcm43xx/bcm43xx_main.c 2006-08-07 18:23:36.000000000 +0200
@@ -3194,39 +3194,6 @@
bcm43xx_clear_keys(bcm);
}
-static int bcm43xx_rng_read(struct hwrng *rng, u32 *data)
-{
- struct bcm43xx_private *bcm = (struct bcm43xx_private *)rng->priv;
- unsigned long flags;
-
- spin_lock_irqsave(&(bcm)->irq_lock, flags);
- *data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG);
- spin_unlock_irqrestore(&(bcm)->irq_lock, flags);
-
- return (sizeof(u16));
-}
-
-static void bcm43xx_rng_exit(struct bcm43xx_private *bcm)
-{
- hwrng_unregister(&bcm->rng);
-}
-
-static int bcm43xx_rng_init(struct bcm43xx_private *bcm)
-{
- int err;
-
- snprintf(bcm->rng_name, ARRAY_SIZE(bcm->rng_name),
- "%s_%s", KBUILD_MODNAME, bcm->net_dev->name);
- bcm->rng.name = bcm->rng_name;
- bcm->rng.data_read = bcm43xx_rng_read;
- bcm->rng.priv = (unsigned long)bcm;
- err = hwrng_register(&bcm->rng);
- if (err)
- printk(KERN_ERR PFX "RNG init failed (%d)\n", err);
-
- return err;
-}
-
static int bcm43xx_shutdown_all_wireless_cores(struct bcm43xx_private *bcm)
{
int ret = 0;
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [-mm patch] net/: make code static
2006-08-07 15:49 ` [-mm patch] net/: make code static Adrian Bunk
@ 2006-08-08 4:51 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2006-08-08 4:51 UTC (permalink / raw)
To: bunk; +Cc: akpm, linux-kernel, netdev
From: Adrian Bunk <bunk@stusta.de>
Date: Mon, 7 Aug 2006 17:49:47 +0200
> This patch makes needlessly global code static.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Looks reasonable, applied.
> It doesn't seem to be intended that the new
> ipv4/fib_rules.c:fib4_rules_cleanup() is completely unused?
I'll kill it off.
IPv4 can't be built as a module and therefore there is no
relevant exit or module load error path for ipv4 for which
this function should be called.
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC: -mm patch] bcm43xx_main.c: remove 3 functions
2006-08-07 21:04 ` [RFC: -mm patch] bcm43xx_main.c: remove 3 functions Adrian Bunk
@ 2006-08-08 18:32 ` Michael Buesch
2006-08-08 19:42 ` Adrian Bunk
2006-08-08 22:14 ` Jeff Garzik
0 siblings, 2 replies; 12+ messages in thread
From: Michael Buesch @ 2006-08-08 18:32 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel, netdev, Andrew Morton, linville, jgarzik
On Monday 07 August 2006 23:04, Adrian Bunk wrote:
> This patch removes three no longer used functions (that are even
> generating gcc warnings).
>
> This patch doesn't look right, but it is the result of
> 58e5528ee464d38040b9489e10033c9387a10d56 in git-netdev...
Hm, can't find that commit in a tree.
I looked at linus', netdev-2.6.
But one thing is for sure. This patch is _wrong_. ;)
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
NACK.
> drivers/net/wireless/bcm43xx/bcm43xx_main.c | 33 --------------------
> 1 file changed, 33 deletions(-)
>
> --- linux-2.6.18-rc3-mm2-full/drivers/net/wireless/bcm43xx/bcm43xx_main.c.old 2006-08-07 18:21:31.000000000 +0200
> +++ linux-2.6.18-rc3-mm2-full/drivers/net/wireless/bcm43xx/bcm43xx_main.c 2006-08-07 18:23:36.000000000 +0200
> @@ -3194,39 +3194,6 @@
> bcm43xx_clear_keys(bcm);
> }
>
> -static int bcm43xx_rng_read(struct hwrng *rng, u32 *data)
> -{
> - struct bcm43xx_private *bcm = (struct bcm43xx_private *)rng->priv;
> - unsigned long flags;
> -
> - spin_lock_irqsave(&(bcm)->irq_lock, flags);
> - *data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG);
> - spin_unlock_irqrestore(&(bcm)->irq_lock, flags);
> -
> - return (sizeof(u16));
> -}
> -
> -static void bcm43xx_rng_exit(struct bcm43xx_private *bcm)
> -{
> - hwrng_unregister(&bcm->rng);
> -}
> -
> -static int bcm43xx_rng_init(struct bcm43xx_private *bcm)
> -{
> - int err;
> -
> - snprintf(bcm->rng_name, ARRAY_SIZE(bcm->rng_name),
> - "%s_%s", KBUILD_MODNAME, bcm->net_dev->name);
> - bcm->rng.name = bcm->rng_name;
> - bcm->rng.data_read = bcm43xx_rng_read;
> - bcm->rng.priv = (unsigned long)bcm;
> - err = hwrng_register(&bcm->rng);
> - if (err)
> - printk(KERN_ERR PFX "RNG init failed (%d)\n", err);
> -
> - return err;
> -}
> -
> static int bcm43xx_shutdown_all_wireless_cores(struct bcm43xx_private *bcm)
> {
--
Greetings Michael.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC: -mm patch] bcm43xx_main.c: remove 3 functions
2006-08-08 18:32 ` Michael Buesch
@ 2006-08-08 19:42 ` Adrian Bunk
2006-08-09 4:47 ` Michael Buesch
2006-08-08 22:14 ` Jeff Garzik
1 sibling, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2006-08-08 19:42 UTC (permalink / raw)
To: Michael Buesch; +Cc: linux-kernel, netdev, Andrew Morton, linville, jgarzik
On Tue, Aug 08, 2006 at 08:32:37PM +0200, Michael Buesch wrote:
> On Monday 07 August 2006 23:04, Adrian Bunk wrote:
> > This patch removes three no longer used functions (that are even
> > generating gcc warnings).
> >
> > This patch doesn't look right, but it is the result of
> > 58e5528ee464d38040b9489e10033c9387a10d56 in git-netdev...
>
> Hm, can't find that commit in a tree.
> I looked at linus', netdev-2.6.
It's in netdev-2.6.git#ALL that gets included in -mm.
> But one thing is for sure. This patch is _wrong_. ;)
>...
And it seems to be your fault. ;-)
commit 58e5528ee464d38040b9489e10033c9387a10d56
Author: Michael Buesch <mb@bu3sch.de>
Date: Sat Jul 8 22:02:18 2006 +0200
[PATCH] bcm43xx: init routine rewrite
Rewrite of the bcm43xx initialization routines.
This fixes several issues:
* up-down-up-down-up... stale data issue
(May fix some DHCP issues)
* Fix the init vs IRQ handler race (and remove the workaround)
* Fix init for cards with multiple cores (APHY)
As softmac has no internal PHY handling (unlike dscape),
this adds the file "phymode" to sysfs.
The active PHY can be selected by writing either a, b or g
to this file. Current PHY can be determined by reading from it.
* Fix the controller restart code.
Controller restart can now also be triggered through
echo 1 > /debug/bcm43xx/ethX/restart
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
> Greetings Michael.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC: -mm patch] bcm43xx_main.c: remove 3 functions
2006-08-08 18:32 ` Michael Buesch
2006-08-08 19:42 ` Adrian Bunk
@ 2006-08-08 22:14 ` Jeff Garzik
1 sibling, 0 replies; 12+ messages in thread
From: Jeff Garzik @ 2006-08-08 22:14 UTC (permalink / raw)
To: Michael Buesch; +Cc: Adrian Bunk, linux-kernel, netdev, Andrew Morton, linville
Michael Buesch wrote:
> On Monday 07 August 2006 23:04, Adrian Bunk wrote:
>> This patch removes three no longer used functions (that are even
>> generating gcc warnings).
>>
>> This patch doesn't look right, but it is the result of
>> 58e5528ee464d38040b9489e10033c9387a10d56 in git-netdev...
>
> Hm, can't find that commit in a tree.
> I looked at linus', netdev-2.6.
It's clearly in netdev-2.6.git#upstream:
commit 58e5528ee464d38040b9489e10033c9387a10d56
Author: Michael Buesch <mb@bu3sch.de>
Date: Sat Jul 8 22:02:18 2006 +0200
[PATCH] bcm43xx: init routine rewrite
Rewrite of the bcm43xx initialization routines.
This fixes several issues:
* up-down-up-down-up... stale data issue
(May fix some DHCP issues)
* Fix the init vs IRQ handler race (and remove the workaround)
* Fix init for cards with multiple cores (APHY)
As softmac has no internal PHY handling (unlike dscape),
this adds the file "phymode" to sysfs.
The active PHY can be selected by writing either a, b or g
to this file. Current PHY can be determined by reading from it.
* Fix the controller restart code.
Controller restart can now also be triggered through
echo 1 > /debug/bcm43xx/ethX/restart
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC: -mm patch] bcm43xx_main.c: remove 3 functions
2006-08-08 19:42 ` Adrian Bunk
@ 2006-08-09 4:47 ` Michael Buesch
0 siblings, 0 replies; 12+ messages in thread
From: Michael Buesch @ 2006-08-09 4:47 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel, netdev, Andrew Morton, linville, jgarzik
On Tuesday 08 August 2006 21:42, you wrote:
> And it seems to be your fault. ;-)
Uh, oh. I'm trapped.
> commit 58e5528ee464d38040b9489e10033c9387a10d56
> Author: Michael Buesch <mb@bu3sch.de>
> Date: Sat Jul 8 22:02:18 2006 +0200
>
> [PATCH] bcm43xx: init routine rewrite
Ah, I guessed it.
This was caused by some merge-race ;)
Will send a fix for this, soon.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked....
[not found] <20060806030809.2cfb0b1e.akpm@osdl.org>
2006-08-07 15:49 ` [-mm patch] net/: make code static Adrian Bunk
2006-08-07 21:04 ` [RFC: -mm patch] bcm43xx_main.c: remove 3 functions Adrian Bunk
@ 2006-08-10 17:38 ` Valdis.Kletnieks
2006-08-10 20:02 ` Patrick McHardy
2006-08-11 2:15 ` 2.6.18-rc3-mm2 - BUG in rt6_lookup() from ipv6_del_addr() Valdis.Kletnieks
3 siblings, 1 reply; 12+ messages in thread
From: Valdis.Kletnieks @ 2006-08-10 17:38 UTC (permalink / raw)
To: Andrew Morton, davem, Thomas Graf; +Cc: linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 4418 bytes --]
On Sun, 06 Aug 2006 03:08:09 PDT, Andrew Morton said:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/
Building a kernel with IPV6_MULTIPLE_TABLES=y breaks my IPv6 connectivity
quite badly. It basically totally refuses to answer an IPv6 Neighbor Solicit
packet or IPv6 Echo Request packet. I run a 'tcpdump -n ipv6', and I see the
requests come in, and no packets leaving. Interestingly enough, if I try to
ping6 *out* of the box, it's totally willing to send a Neighbor Solicit outbound
(although it appears to totally ignore the Neighbor Advert packet that comes
back). Of course, things don't work very well at all with busticated Neighbor
Solicit.
A kernel built with IPV6_MULTIPLE_TABLES=n works just fine.
The relevant ifconfig (eth3 is a 100mbit port, eth5 is a wireless card):
eth3 Link encap:Ethernet HWaddr 00:06:5B:EA:8E:4E
inet addr:128.173.14.107 Bcast:128.173.15.255 Mask:255.255.252.0
inet6 addr: 2001:468:c80:2103:206:5bff:feea:8e4e/64 Scope:Global
inet6 addr: fe80::206:5bff:feea:8e4e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15529 errors:0 dropped:0 overruns:1 frame:0
TX packets:2073 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2333290 (2.2 MiB) TX bytes:228862 (223.4 KiB)
Interrupt:11 Base address:0x6800
eth5 Link encap:Ethernet HWaddr 00:02:2D:5C:11:48
inet addr:198.82.168.129 Bcast:198.82.168.255 Mask:255.255.255.0
inet6 addr: 2001:468:c80:2181:202:2dff:fe5c:1148/64 Scope:Global
inet6 addr: fe80::202:2dff:fe5c:1148/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2096 errors:0 dropped:0 overruns:0 frame:0
TX packets:144 errors:1 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:280919 (274.3 KiB) TX bytes:22184 (21.6 KiB)
Interrupt:11 Base address:0xe100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1583 errors:0 dropped:0 overruns:0 frame:0
TX packets:1583 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:642598 (627.5 KiB) TX bytes:642598 (627.5 KiB)
A working routing table:
netstat -r -n -A inet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
::1/128 :: U 0 12 1 lo
2001:468:c80:2103:206:5bff:feea:8e4e/128 :: U 0 4 1 lo
2001:468:c80:2103::/64 :: UA 256 113 0 eth3
2001:468:c80:2181:202:2dff:fe5c:1148/128 :: U 0 0 1 lo
2001:468:c80:2181::/64 :: UA 256 11 0 eth5
fe80::202:2dff:fe5c:1148/128 :: U 0 0 1 lo
fe80::206:5bff:feea:8e4e/128 :: U 0 2 1 lo
fe80::/64 :: U 256 0 0 eth3
fe80::/64 :: U 256 0 0 eth5
ff02::1/128 ff02::1 UC 0 113 0 eth3
ff02::1/128 ff02::1 UC 0 1 0 eth5
ff00::/8 :: U 256 0 0 eth3
ff00::/8 :: U 256 0 0 eth5
::/0 fe80::20f:35ff:fe3e:d41a UGDA 1024 1 0 eth3
::/0 fe80::20f:35ff:fe3e:d41a UGDA 1024 1 0 eth5
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked....
2006-08-10 17:38 ` 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked Valdis.Kletnieks
@ 2006-08-10 20:02 ` Patrick McHardy
2006-08-10 21:44 ` Valdis.Kletnieks
0 siblings, 1 reply; 12+ messages in thread
From: Patrick McHardy @ 2006-08-10 20:02 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: Andrew Morton, davem, Thomas Graf, linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
Valdis.Kletnieks@vt.edu wrote:
> On Sun, 06 Aug 2006 03:08:09 PDT, Andrew Morton said:
>
>>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/
>
>
> Building a kernel with IPV6_MULTIPLE_TABLES=y breaks my IPv6 connectivity
> quite badly. It basically totally refuses to answer an IPv6 Neighbor Solicit
> packet or IPv6 Echo Request packet. I run a 'tcpdump -n ipv6', and I see the
> requests come in, and no packets leaving. Interestingly enough, if I try to
> ping6 *out* of the box, it's totally willing to send a Neighbor Solicit outbound
> (although it appears to totally ignore the Neighbor Advert packet that comes
> back). Of course, things don't work very well at all with busticated Neighbor
> Solicit.
>
> A kernel built with IPV6_MULTIPLE_TABLES=n works just fine.
It should be fixed by this patch (already contained in net-2.6.19).
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1060 bytes --]
[IPV6]: Fix policy routing lookup
When the lookup in a table returns ip6_null_entry the policy routing lookup
returns it instead of continuing in the next table, which effectively means
it only searches the local table.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
commit 2b885e76c2b2c74d2dfe86a8140f0b41149f327c
tree 767711f03ea3e990ce02b3720718b77490027793
parent 5bd721a145d02a89a9b69adf3ede9d0b3647ae8b
author Patrick McHardy <kaber@trash.net> Sun, 06 Aug 2006 22:24:08 -0700
committer David S. Miller <davem@davemloft.net> Sun, 06 Aug 2006 22:24:08 -0700
net/ipv6/fib6_rules.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index c3c8195..94a46ec 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -94,8 +94,10 @@ int fib6_rule_action(struct fib_rule *ru
if (rt != &ip6_null_entry)
goto out;
-
dst_release(&rt->u.dst);
+ rt = NULL;
+ goto out;
+
discard_pkt:
dst_hold(&rt->u.dst);
out:
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked....
2006-08-10 20:02 ` Patrick McHardy
@ 2006-08-10 21:44 ` Valdis.Kletnieks
0 siblings, 0 replies; 12+ messages in thread
From: Valdis.Kletnieks @ 2006-08-10 21:44 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Andrew Morton, davem, Thomas Graf, linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
On Thu, 10 Aug 2006 22:02:03 +0200, Patrick McHardy said:
> Valdis.Kletnieks@vt.edu wrote:
> > On Sun, 06 Aug 2006 03:08:09 PDT, Andrew Morton said:
> >
> >>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/
> >
> >
> > Building a kernel with IPV6_MULTIPLE_TABLES=y breaks my IPv6 connectivity
> It should be fixed by this patch (already contained in net-2.6.19).
Confirmed fixed, thanks...
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* 2.6.18-rc3-mm2 - BUG in rt6_lookup() from ipv6_del_addr()
[not found] <20060806030809.2cfb0b1e.akpm@osdl.org>
` (2 preceding siblings ...)
2006-08-10 17:38 ` 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked Valdis.Kletnieks
@ 2006-08-11 2:15 ` Valdis.Kletnieks
2006-08-11 4:20 ` David Miller
3 siblings, 1 reply; 12+ messages in thread
From: Valdis.Kletnieks @ 2006-08-11 2:15 UTC (permalink / raw)
To: Andrew Morton, davem; +Cc: linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 4141 bytes --]
On Sun, 06 Aug 2006 03:08:09 PDT, Andrew Morton said:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/
After applying the patch that Patrick McHardy pointed me at, it lived
longer. However, I'm now seeing problems at system shutdown (or anytime
you try to 'ifdown ethX' where ethX has an IPv6 address attached to it):
[ 196.346000] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000014
[ 196.347000] printing eip:
[ 196.348000] c032c436
[ 196.348000] *pde = 00000000
[ 196.349000] Oops: 0000 [#1]
[ 196.349000] 4K_STACKS PREEMPT
[ 196.349000] last sysfs file: /class/net/eth1/address
[ 196.349000] Modules linked in: thermal sony_acpi processor fan button battery ac nfnetlink i8k floppy nvram orinoco_cs orinoco hermes pcmcia firmware_class ohci1394 ieee1394 intel_agp agpgart iTCO_wdt yenta_socket rsrc_nonstatic pcmcia_core rtc
[ 196.349000] CPU: 0
[ 196.349000] EIP: 0060:[<c032c436>] Not tainted VLI
[ 196.349000] EFLAGS: 00010246 (2.6.18-rc3-mm2 #4)
[ 196.349000] EIP is at rt6_lookup+0x47/0x83
[ 196.349000] eax: 00000000 ebx: 00000000 ecx: 00000005 edx: 00000000
[ 196.349000] esi: e8b25c98 edi: e8b25c20 ebp: e8b25c78 esp: e8b25c20
[ 196.349000] ds: 007b es: 007b ss: 0068
[ 196.349000] Process ip (pid: 2511, ti=e8b25000 task=effb0aa0 task.ti=e8b25000)
[ 196.349000] Stack: 00000005 00000000 000080fe 00000000 00000000 00000000 00000000 00000000
[ 196.349000] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 196.349000] 00000000 00000000 00000000 00000008 eb6e98c8 e8b25ca8 e8b25cb4 c0327c04
[ 196.349000] Call Trace:
[ 196.349000] [<c0327c04>] ipv6_del_addr+0x2ef/0x3a7
[ 196.349000] [<c0327d3f>] inet6_addr_del+0x83/0xbb
[ 196.349000] [<c0327dd6>] inet6_rtm_deladdr+0x5f/0x6b
[ 196.349000] [<c02da097>] rtnetlink_rcv_msg+0x1b3/0x1d6
[ 196.349000] [<c02e011c>] netlink_run_queue+0x5a/0xc6
[ 196.349000] [<c02d9e9d>] rtnetlink_rcv+0x29/0x42
[ 196.349000] [<c02e0576>] netlink_data_ready+0x12/0x49
[ 196.349000] [<c02df518>] netlink_sendskb+0x1c/0x4d
[ 196.349000] [<c02dfea0>] netlink_unicast+0x1c4/0x1d0
[ 196.349000] [<c02e0557>] netlink_sendmsg+0x274/0x281
[ 196.349000] [<c02ca57e>] sock_sendmsg+0xeb/0x106
[ 196.349000] [<c02cad99>] sys_sendto+0xbe/0xdc
[ 196.349000] [<c02cb522>] sys_socketcall+0xfb/0x186
[ 196.349000] [<c0102849>] sysenter_past_esp+0x56/0x79
[ 196.349000] DWARF2 unwinder stuck at sysenter_past_esp+0x56/0x79
[ 196.349000] Leftover inexact backtrace:
[ 196.349000] [<c01036c7>] show_stack_log_lvl+0x8c/0x97
[ 196.349000] [<c010381f>] show_registers+0x14d/0x1de
[ 196.349000] [<c0103a5b>] die+0x1ab/0x26d
[ 196.349000] [<c0352205>] do_page_fault+0x3f8/0x4c5
[ 196.349000] [<c0351271>] error_code+0x39/0x40
[ 196.349000] [<c0327c04>] ipv6_del_addr+0x2ef/0x3a7
[ 196.349000] [<c0327d3f>] inet6_addr_del+0x83/0xbb
[ 196.349000] [<c0327dd6>] inet6_rtm_deladdr+0x5f/0x6b
[ 196.349000] [<c02da097>] rtnetlink_rcv_msg+0x1b3/0x1d6
[ 196.349000] [<c02e011c>] netlink_run_queue+0x5a/0xc6
[ 196.349000] [<c02d9e9d>] rtnetlink_rcv+0x29/0x42
[ 196.349000] [<c02e0576>] netlink_data_ready+0x12/0x49
[ 196.349000] [<c02df518>] netlink_sendskb+0x1c/0x4d
[ 196.349000] [<c02dfea0>] netlink_unicast+0x1c4/0x1d0
[ 196.349000] [<c02e0557>] netlink_sendmsg+0x274/0x281
[ 196.349000] [<c02ca57e>] sock_sendmsg+0xeb/0x106
[ 196.349000] [<c02cad99>] sys_sendto+0xbe/0xdc
[ 196.349000] [<c02cb522>] sys_socketcall+0xfb/0x186
[ 196.349000] [<c0102849>] sysenter_past_esp+0x56/0x79
[ 196.349000] Code: eb ff 89 5d a8 8d 45 b0 b9 10 00 00 00 89 f2 e8 c9 e0 eb ff 31 d2 83 7d 08 00 0f 95 c2 b9 ad cc 32 c0 89 f8 e8 47 7c 01 00 89 c3 <66> 83 7b 14 00 74 2d 8b 43 04 85 c0 7f 21 68 c4 19 37 c0 68 99
[ 196.349000] EIP: [<c032c436>] rt6_lookup+0x47/0x83 SS:ESP 0068:e8b25c20
The unlucky 'ip' process then gets a SIGSEGV and dies while holding a lock
of some sort, so later 'ip' processes get hung in 'D' state.
Checking the lkml and netdev archives didn't find any useful hits for
'ipv6_addr_rel'...
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.18-rc3-mm2 - BUG in rt6_lookup() from ipv6_del_addr()
2006-08-11 2:15 ` 2.6.18-rc3-mm2 - BUG in rt6_lookup() from ipv6_del_addr() Valdis.Kletnieks
@ 2006-08-11 4:20 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2006-08-11 4:20 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: akpm, linux-kernel, netdev
From: Valdis.Kletnieks@vt.edu
Date: Thu, 10 Aug 2006 22:15:26 -0400
> On Sun, 06 Aug 2006 03:08:09 PDT, Andrew Morton said:
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/
>
> After applying the patch that Patrick McHardy pointed me at, it lived
> longer. However, I'm now seeing problems at system shutdown (or anytime
> you try to 'ifdown ethX' where ethX has an IPv6 address attached to it):
This is cured by yet another fix already in the net-2.6.19
tree:
>From 7a3a5e6b0e6847749c756cbe4bf554eda063a577 Mon Sep 17 00:00:00 2001
From: Ville Nuorvala <vnuorval@tcs.hut.fi>
Date: Tue, 8 Aug 2006 16:44:17 -0700
Subject: [PATCH] [IPV6]: Make sure fib6_rule_lookup doesn't return NULL
The callers of fib6_rule_lookup don't expect it to return NULL,
therefore it must return ip6_null_entry whenever fib_rule_lookup fails.
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv6/fib6_rules.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index bf9bba8..22a2fdb 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -63,7 +63,11 @@ struct dst_entry *fib6_rule_lookup(struc
if (arg.rule)
fib_rule_put(arg.rule);
- return (struct dst_entry *) arg.result;
+ if (arg.result)
+ return (struct dst_entry *) arg.result;
+
+ dst_hold(&ip6_null_entry.u.dst);
+ return &ip6_null_entry.u.dst;
}
static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
--
1.4.2.rc2.g3e042
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-08-11 4:20 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060806030809.2cfb0b1e.akpm@osdl.org>
2006-08-07 15:49 ` [-mm patch] net/: make code static Adrian Bunk
2006-08-08 4:51 ` David Miller
2006-08-07 21:04 ` [RFC: -mm patch] bcm43xx_main.c: remove 3 functions Adrian Bunk
2006-08-08 18:32 ` Michael Buesch
2006-08-08 19:42 ` Adrian Bunk
2006-08-09 4:47 ` Michael Buesch
2006-08-08 22:14 ` Jeff Garzik
2006-08-10 17:38 ` 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked Valdis.Kletnieks
2006-08-10 20:02 ` Patrick McHardy
2006-08-10 21:44 ` Valdis.Kletnieks
2006-08-11 2:15 ` 2.6.18-rc3-mm2 - BUG in rt6_lookup() from ipv6_del_addr() Valdis.Kletnieks
2006-08-11 4:20 ` David Miller
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).