* [-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: 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* 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