aboutsummaryrefslogtreecommitdiff
path: root/net/decnet
AgeCommit message (Collapse)AuthorFilesLines
2007-03-25[DECNet] fib: Fix out of bound access of dn_fib_props[]Thomas Graf1-1/+4
Fixes a typo which caused fib_props[] to have the wrong size and makes sure the value used to index the array which is provided by userspace via netlink is checked to avoid out of bound access. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-03-25[NET]: Fix fib_rules compatibility breakageThomas Graf1-7/+6
Based upon a patch from Patrick McHardy. The fib_rules netlink attribute policy introduced in 2.6.19 broke userspace compatibilty. When specifying a rule with "from all" or "to all", iproute adds a zero byte long netlink attribute, but the policy requires all addresses to have a size equal to sizeof(struct in_addr)/sizeof(struct in6_addr), resulting in a validation error. Check attribute length of FRA_SRC/FRA_DST in the generic framework by letting the family specific rules implementation provide the length of an address. Report an error if address length is non zero but no address attribute is provided. Fix actual bug by checking address length for non-zero instead of relying on availability of attribute. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-02-14[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tablesEric W. Biederman1-5/+0
It isn't needed anymore, all of the users are gone, and all of the ctl_table initializers have been converted to use explicit names of the fields they are initializing. [[email protected]: NTFS fix] Signed-off-by: Eric W. Biederman <[email protected]> Acked-by: Stephen Smalley <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-14[PATCH] sysctl: remove insert_at_head from register_sysctlEric W. Biederman2-2/+2
The semantic effect of insert_at_head is that it would allow new registered sysctl entries to override existing sysctl entries of the same name. Which is pain for caching and the proc interface never implemented. I have done an audit and discovered that none of the current users of register_sysctl care as (excpet for directories) they do not register duplicate sysctl entries. So this patch simply removes the support for overriding existing entries in the sys_sysctl interface since no one uses it or cares and it makes future enhancments harder. Signed-off-by: Eric W. Biederman <[email protected]> Acked-by: Ralf Baechle <[email protected]> Acked-by: Martin Schwidefsky <[email protected]> Cc: Russell King <[email protected]> Cc: David Howells <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Corey Minyard <[email protected]> Cc: Neil Brown <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: James Bottomley <[email protected]> Cc: Jan Kara <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: David Chinner <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Patrick McHardy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-14[PATCH] sysctl: decnet: remove unnecessary insert_at_head flagEric W. Biederman1-1/+1
The sysctl numbers used are unique so setting the insert_at_head flag does not succeed in overriding any sysctls, and is just confusing because it doesn't. Clear the flag. Signed-off-by: Eric W. Biederman <[email protected]> Cc: Patrick Caulfield <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-14[PATCH] remove many unneeded #includes of sched.hTim Schmielau2-2/+0
After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <[email protected]> Acked-by: Russell King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-12[PATCH] mark struct file_operations const 7Arjan van de Ven4-4/+4
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-11Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds10-523/+523
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits) [IPV4]: Restore multipath routing after rt_next changes. [XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch. [NET]: Reorder fields of struct dst_entry [DECNET]: Convert decnet route to use the new dst_entry 'next' pointer [IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer [IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer [NET]: Introduce union in struct dst_entry to hold 'next' pointer [DECNET]: fix misannotation of linkinfo_dn [DECNET]: FRA_{DST,SRC} are le16 for decnet [UDP]: UDP can use sk_hash to speedup lookups [NET]: Fix whitespace errors. [NET] XFRM: Fix whitespace errors. [NET] X25: Fix whitespace errors. [NET] WANROUTER: Fix whitespace errors. [NET] UNIX: Fix whitespace errors. [NET] TIPC: Fix whitespace errors. [NET] SUNRPC: Fix whitespace errors. [NET] SCTP: Fix whitespace errors. [NET] SCHED: Fix whitespace errors. [NET] RXRPC: Fix whitespace errors. ...
2007-02-11[PATCH] FRA_{DST,SRC} are le16 for decnetAl Viro1-6/+6
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-11[PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc().Robert P. J. Day1-3/+1
Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the corresponding "kmem_cache_zalloc()" call. Signed-off-by: Robert P. J. Day <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Roland McGrath <[email protected]> Cc: James Bottomley <[email protected]> Cc: Greg KH <[email protected]> Acked-by: Joel Becker <[email protected]> Cc: Steven Whitehouse <[email protected]> Cc: Jan Kara <[email protected]> Cc: Michael Halcrow <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Stephen Smalley <[email protected]> Cc: James Morris <[email protected]> Cc: Chris Wright <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-10[DECNET]: Convert decnet route to use the new dst_entry 'next' pointerEric Dumazet1-16/+16
This patch removes the next pointer from 'struct dn_route.u' union, and renames u.rt_next to u.dst.dn_next. It also moves 'struct flowi' right after 'struct dst_entry' to prepare speedup lookups. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-02-10[DECNET]: FRA_{DST,SRC} are le16 for decnetAl Viro1-6/+6
Signed-off-by: Al Viro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-02-10[NET] DECNET: Fix whitespace errors.YOSHIFUJI Hideaki10-507/+507
Signed-off-by: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-02-08[NETLINK]: Don't BUG on undersized allocationsPatrick McHardy2-9/+16
Currently netlink users BUG when the allocated skb for an event notification is undersized. While this is certainly a kernel bug, its not critical and crashing the kernel is too drastic, especially when considering that these errors have appeared multiple times in the past and it BUGs even if no listeners are present. This patch replaces BUG by WARN_ON and changes the notification functions to inform potential listeners of undersized allocations using a unique error code (EMSGSIZE). Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-01-25[DECNET]: Handle a failure in neigh_parms_alloc (take 2)Eric W. Biederman1-2/+9
While enhancing the neighbour code to handle multiple network namespaces I noticed that decnet is assuming neigh_parms_alloc will allways succeed, which is clearly wrong. So handle the failure. Signed-off-by: Eric W. Biederman <[email protected]> Acked-by: Steven Whitehouse <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-10[PATCH] sysctl: remove unused "context" paramAlexey Dobriyan2-8/+4
Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Andi Kleen <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: David Howells <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-07[PATCH] slab: remove kmem_cache_tChristoph Lameter1-1/+1
Replace all uses of kmem_cache_t with struct kmem_cache. The patch was generated using the following script: #!/bin/sh # # Replace one string by another in all the kernel sources. # set -e for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do quilt add $file sed -e "1,\$s/$1/$2/g" $file >/tmp/$$ mv /tmp/$$ $file quilt refresh done The script was run like this sh replace kmem_cache_t "struct kmem_cache" Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-07[PATCH] slab: remove SLAB_KERNELChristoph Lameter1-1/+1
SLAB_KERNEL is an alias of GFP_KERNEL. Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-02[RTNETLINK]: Add rtnl_put_cacheinfo() to unify some codeThomas Graf1-11/+5
IPv4, IPv6, and DECNet all use struct rta_cacheinfo in a similiar way, therefore rtnl_put_cacheinfo() is added to reuse code. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[NETLINK]: Remove unused dst_pid field in netlink_skb_parmsThomas Graf1-2/+0
The destination PID is passed directly to netlink_unicast() respectively netlink_multicast(). Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[DECNET] address: Convert to new netlink interfaceThomas Graf1-57/+85
Extends the netlink interface to support the __le16 type and converts address addition, deletion and, dumping to use the new netlink interface. Fixes multiple occasions of possible illegal memory references due to not validated netlink attributes. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[DECNET] address: Rename rtmsg_ifa() to dn_ifaddr_notify()Thomas Graf1-4/+4
The name rtmsg_ifa is heavly overused and confusing. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[DECNET] address: Calculate accurate message size for netlink notificationsThomas Graf1-7/+12
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[DECNET]: Use kzalloc where applicableArnaldo Carvalho de Melo1-4/+4
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2006-12-02[DECNET]: Use kmemdupArnaldo Carvalho de Melo1-3/+1
Code diff stats: [acme@newtoy net-2.6.20]$ codiff /tmp/decnet.ko.before /tmp/decnet.ko.after /pub/scm/linux/kernel/git/acme/net-2.6.20/net/decnet/dn_dev.c: dn_dev_sysctl_register | -51 1 function changed, 51 bytes removed [acme@newtoy net-2.6.20]$ Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2006-12-02[NET]: Conditionally use bh_lock_sock_nested in sk_receive_skbArnaldo Carvalho de Melo1-1/+1
Spotted by Ian McDonald, tentatively fixed by Gerrit Renker: http://www.mail-archive.com/dccp%40vger.kernel.org/msg00599.html Rewritten not to unroll sk_receive_skb, in the common case, i.e. no lock debugging, its optimized away. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2006-12-02[DECNET]: Fix build regressions.David S. Miller2-8/+2
Spotted by Arnaldo. Signed-off-by: David S. Miller <[email protected]>
2006-12-02[NETLINK]: Do precise netlink message allocations where possibleThomas Graf2-5/+35
Account for the netlink message header size directly in nlmsg_new() instead of relying on the caller calculate it correctly. Replaces error handling of message construction functions when constructing notifications with bug traps since a failure implies a bug in calculating the size of the skb. Signed-off-by: Thomas Graf <[email protected]> Acked-by: Paul Moore <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[NET] rules: Share common attribute validation policyThomas Graf1-5/+1
Move the attribute policy for the non-specific attributes into net/fib_rules.h and include it in the respective protocols. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[NET] rules: Protocol independant mark selectorThomas Graf1-27/+0
Move mark selector currently implemented per protocol into the protocol independant part. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[NET]: Rethink mark field in struct flowiThomas Graf3-39/+9
Now that all protocols have been made aware of the mark field it can be moved out of the union thus simplyfing its usage. The config options in the IPv4/IPv6/DECnet subsystems to enable respectively disable mark based routing only obfuscate the code with ifdefs, the cost for the additional comparison in the flow key is insignificant, and most distributions have all these options enabled by default anyway. Therefore it makes sense to remove the config options and enable mark based routing by default. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[NET]: Turn nfmark into generic markThomas Graf1-2/+2
nfmark is being used in various subsystems and has become the defacto mark field for all kinds of packets. Therefore it makes sense to rename it to `mark' and remove the dependency on CONFIG_NETFILTER. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[DECNET]: Don't clear memory twice.Ralf Baechle1-1/+0
When dn_neigh.c was converted from kmalloc to kzalloc in commit 0da974f4f303a6842516b764507e3c0a03f41e5a it was missed that dn_neigh_seq_open was actually clearing the allocation twice was missed. Signed-off-by: Ralf Baechle <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-11-07[DECNET]: Endianess fixes (try #2)Steven Whitehouse4-19/+20
Here are some fixes to endianess problems spotted by Al Viro. Signed-off-by: Steven Whitehouse <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-10-18[DECNET]: Fix input routing bugSteven Whitehouse1-2/+1
This patch fixes a silly bug that has been in the input routing code for some time. It results in trying to send to a node directly when the origin of the packet is via the default router. Its been tested by Alan Kemmerer <[email protected]> who reported the bug and its a fairly obvious fix for a typo. Signed-off-by: Steven Whitehouse <[email protected]> Signed-off-by: Patrick Caulfield <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-10-15[DECNET]: Use correct config option for routing by fwmark in compare_keys()Patrick McHardy1-1/+1
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-10-12[DECNET]: Fix sfuzz hanging on 2.6.18Patrick McHardy1-1/+3
Dave Jones wrote: > sfuzz D 724EF62A 2828 28717 28691 (NOTLB) > cd69fe98 00000082 0000012d 724ef62a 0001971a 00000010 00000007 df6d22b0 > dfd81080 725bbc5e 0001971a 000cc634 00000001 df6d23bc c140e260 00000202 > de1d5ba0 cd69fea0 de1d5ba0 00000000 00000000 de1d5b60 de1d5b8c de1d5ba0 > Call Trace: > [<c05b1708>] lock_sock+0x75/0xa6 > [<e0b0b604>] dn_getname+0x18/0x5f [decnet] > [<c05b083b>] sys_getsockname+0x5c/0xb0 > [<c05b0b46>] sys_socketcall+0xef/0x261 > [<c0403f97>] syscall_call+0x7/0xb > DWARF2 unwinder stuck at syscall_call+0x7/0xb > > I wonder if the plethora of lockdep related changes inadvertantly broke something? Looks like unbalanced locking. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-10-12[NET]: Do not memcmp() over pad bytes of struct flowi.David S. Miller1-3/+8
They are not necessarily initialized to zero by the compiler, for example when using run-time initializers of automatic on-stack variables. Noticed by Eric Dumazet and Patrick McHardy. Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Fix sk->sk_filter field accessDmitry Mishin1-1/+1
Function sk_filter() is called from tcp_v{4,6}_rcv() functions with arg needlock = 0, while socket is not locked at that moment. In order to avoid this and similar issues in the future, use rcu for sk->sk_filter field read protection. Signed-off-by: Dmitry Mishin <[email protected]> Signed-off-by: Alexey Kuznetsov <[email protected]> Signed-off-by: Kirill Korotaev <[email protected]>
2006-09-22[NETLINK]: Make use of NLA_STRING/NLA_NUL_STRING attribute validationThomas Graf1-1/+1
Converts existing NLA_STRING attributes to use the new validation features, saving a couple of temporary buffers. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Use SLAB_PANICAlexey Dobriyan1-8/+3
Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[DECNET]: Add support for fwmark masks in routing rulesPatrick McHardy1-2/+18
Add support for fwmark masks. For compatibility a mask of 0xFFFFFFFF is used when a mark value != 0 is sent without a mask. Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Steven Whitehouse <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[DECNET]: Convert DECnet notifications to use rtnl_notify()Thomas Graf2-25/+28
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[RTNETLINK]: Use rtnl_unicast() for rtnetlink unicastsThomas Graf1-3/+1
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[DECNET]: cleanupsAdrian Bunk2-6/+7
- make the following needlessly global functions static: - dn_fib.c: dn_fib_sync_down() - dn_fib.c: dn_fib_sync_up() - dn_rules.c: dn_fib_rule_action() - remove the following unneeded prototype: - dn_fib.c: dn_cache_dump() Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[DECNET] Fix to decnet rules compare functionSteven Whitehouse1-2/+2
Here is a fix to the DECnet rules compare function where we used 32bit values rather than 16bit values. Spotted by Patrick McHardy. Signed-off-by: Steven Whitehouse <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[DECNET] Fix to multiple tables routingSteven Whitehouse1-0/+1
Here is a fix to Patrick McHardy's increase number of routing tables patch for DECnet. I did just test this and it appears to be working fine with this patch. Signed-off-by: Steven Whitehouse <[email protected]> Acked-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[DECNET]: Increase number of possible routing tables to 2^32Patrick McHardy3-84/+92
Increase the number of possible routing tables to 2^32 by replacing the fixed sized array of pointers by a hash table and replacing iterations over all possible table IDs by hash table walking. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Introduce RTA_TABLE/FRA_TABLE attributesPatrick McHardy3-3/+6
Introduce RTA_TABLE route attribute and FRA_TABLE routing rule attribute to hold 32 bit routing table IDs. Usespace compatibility is provided by continuing to accept and send the rtm_table field, but because of its limited size it can only carry the low 8 bits of the table ID. This implies that if larger IDs are used, _all_ userspace programs using them need to use RTA_TABLE. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Use u32 for routing table IDsPatrick McHardy2-8/+8
Use u32 for routing table IDs in net/ipv4 and net/decnet in preparation of support for a larger number of routing tables. net/ipv6 already uses u32 everywhere and needs no further changes. No functional changes are made by this patch. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>