aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* [TCP]: high_seq parameter removed (all callers use tp->high_seq)Ilpo Järvinen2007-10-15
| | | | | Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Uninline netfilter okfnsPatrick McHardy2007-10-15
| | | | | | | | | | | | | | | | | | | Uninline netfilter okfns for those cases where gcc can generate tail-calls. Before: text data bss dec hex filename 8994153 1016524 524652 10535329 a0c1a1 vmlinux After: text data bss dec hex filename 8992761 1016524 524652 10533937 a0bc31 vmlinux ------------------------------------------------------- -1392 All cases have been verified to generate tail-calls with and without netfilter. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BRIDGE]: Remove SKB share checks in br_nf_pre_routing().Patrick McHardy2007-10-15
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV4]: Uninline netfilter okfnsPatrick McHardy2007-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | Now that we don't pass double skb pointers to nf_hook_slow anymore, gcc can generate tail calls for some of the netfilter hook okfn invocations, so there is no need to inline the functions anymore. This caused huge code bloat since we ended up with one inlined version and one out-of-line version since we pass the address to nf_hook_slow. Before: text data bss dec hex filename 8997385 1016524 524652 10538561 a0ce41 vmlinux After: text data bss dec hex filename 8994009 1016524 524652 10535185 a0c111 vmlinux ------------------------------------------------------- -3376 All cases have been verified to generate tail-calls with and without netfilter. The okfns in ipmr and xfrm4_input still remain inline because gcc can't generate tail-calls for them. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Avoid copying TCP packets unnecessarilyHerbert Xu2007-10-15
| | | | | | | | | | | | | | | TCP packets all have writable heads, that is, even though it's cloned, it is writable up to the end of the TCP header. This patch makes skb_checksum_help aware of this fact by using skb_clone_writable and avoiding a copy for TCP. I've also modified the BUG_ON tests to be unsigned. The only case where this makes a difference is if csum_start points to a location before skb->data. Since skb->data should always include the header where the checksum field is (and all currently callers adhere to that), this change is safe and may uncover bugs later. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Fix csum_start update in pskb_expand_headHerbert Xu2007-10-15
| | | | | | | | | | I got confused by the dual nature of the off variable in the function pskb_expand_head. The csum_start offset should use nhead instead of off which can change depending on whether we are using offsets or pointers. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NIU]: getting rid of __ucmpdi2 in niu.oAl Viro2007-10-15
| | | | | | | | By the time we get to that switch by PHY type, we have 8bit value. No need to keep it in u64 when u8 would do. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETLINK]: Don't leak 'listeners' in netlink_kernel_create()Jesper Juhl2007-10-15
| | | | | | | | | | | | | The Coverity checker spotted that we'll leak the storage allocated to 'listeners' in netlink_kernel_create() when the if (!nl_table[unit].registered) check is false. This patch avoids the leak. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6] __inet6_csk_dst_store(): fix check-after-useAdrian Bunk2007-10-15
| | | | | | | | | | | | | The Coverity checker spotted that we have already oops'ed if "dst" was NULL. Since "dst" being NULL doesn't seem to be possible at this point this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Acked-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NIU]: Fix write past end of array in niu_pci_probe_sprom().David S. Miller2007-10-15
| | | | | | Noticed by Coverity checker and reported by Adrian Bunk. Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Avoid skb_copy/pskb_copy/skb_realloc_headroom on inputHerbert Xu2007-10-15
| | | | | | | | | | This patch replaces unnecessary uses of skb_copy by pskb_expand_head on the IPv6 input path. This allows us to remove the double pointers later. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Make ipv6_frag_rcv return the same packetHerbert Xu2007-10-15
| | | | | | | | | | | This patch implements the same change taht was done to ip_defrag. It makes ipv6_frag_rcv return the last packet received of a train of fragments rather than the head of that sequence. This allows us to get rid of the sk_buff ** argument later. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER]: Replace sk_buff ** with sk_buff *Herbert Xu2007-10-15
| | | | | | | | | With all the users of the double pointers removed, this patch mops up by finally replacing all occurances of sk_buff ** in the netfilter API by sk_buff *. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER]: Avoid skb_copy/pskb_copy/skb_realloc_headroomHerbert Xu2007-10-15
| | | | | | | | | | | This patch replaces unnecessary uses of skb_copy, pskb_copy and skb_realloc_headroom by functions such as skb_make_writable and pskb_expand_head. This allows us to remove the double pointers later. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPVS]: Replace local version of skb_make_writableHerbert Xu2007-10-15
| | | | | | | | This patch removes the IPVS-specific version of skb_make_writable and replaces it with the netfilter one. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER]: Do not copy skb in skb_make_writableHerbert Xu2007-10-15
| | | | | | | | Now that all callers of netfilter can guarantee that the skb is not shared, we no longer have to copy the skb in skb_make_writable. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BRIDGE]: Unshare skb upon entryHerbert Xu2007-10-15
| | | | | | | | | | Due to the special location of the bridging hook, it should never see a shared packet anyway (certainly not with any in-kernel code). So it makes sense to unshare the skb there if necessary as that will greatly simplify the code below it (in particular, netfilter). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Avoid unnecessary cloning for ingress filteringHerbert Xu2007-10-15
| | | | | | | | | | | As it is we always invoke pt_prev before ing_filter, even if there are no ingress filters attached. This can cause unnecessary cloning in pt_prev. This patch changes it so that we only invoke pt_prev if there are ingress filters attached. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV4]: Change ip_defrag to return an integerHerbert Xu2007-10-15
| | | | | | | | | Now that ip_frag always returns the packet given to it on input, we can change it to return an integer indicating error instead. This patch does that and updates all its callers accordingly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV4]: Make ip_defrag return the same packetHerbert Xu2007-10-15
| | | | | | | | | | | | | This patch is a bit of a hack. However it is worth it if you consider that this is the only reason why we have to carry around the struct sk_buff ** pointers in netfilter. It makes ip_defrag always return the packet that was given to it on input. It does this by cloning the packet and replacing its original contents with the head fragment if necessary. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKBUFF]: Add skb_morphHerbert Xu2007-10-15
| | | | | | | | | | | | | This patch creates a new function skb_morph that's just like skb_clone except that it lets user provide the spare skb that will be overwritten by the one that's to be cloned. This will be used by IP fragment reassembly so that we get back the same skb that went in last (rather than the head skb that we get now which requires us to carry around double pointers all over the place). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKBUFF]: Merge common code between copy_skb_header and skb_cloneHerbert Xu2007-10-15
| | | | | | | | | | | | | | | | This patch creates a new function __copy_skb_header to merge the common code between copy_skb_header and skb_clone. Having two functions which are largely the same is a source of wasted labour as well as confusion. In fact the tc_verd stuff is almost certainly a bug since it's treated differently in skb_clone compared to the callers of copy_skb_header (skb_copy/pskb_copy/skb_copy_expand). I've kept that difference in tact with a comment added asking for clarification. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.linux-nfs.org/pub/linux/nfs-2.6Linus Torvalds2007-10-15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.linux-nfs.org/pub/linux/nfs-2.6: (131 commits) NFSv4: Fix a typo in nfs_inode_reclaim_delegation NFS: Add a boot parameter to disable 64 bit inode numbers NFS: nfs_refresh_inode should clear cache_validity flags on success NFS: Fix a connectathon regression in NFSv3 and NFSv4 NFS: Use nfs_refresh_inode() in ops that aren't expected to change the inode SUNRPC: Don't call xprt_release in call refresh SUNRPC: Don't call xprt_release() if call_allocate fails SUNRPC: Fix buggy UDP transmission [23/37] Clean up duplicate includes in [2.6 patch] net/sunrpc/rpcb_clnt.c: make struct rpcb_program static SUNRPC: Use correct type in buffer length calculations SUNRPC: Fix default hostname created in rpc_create() nfs: add server port to rpc_pipe info file NFS: Get rid of some obsolete macros NFS: Simplify filehandle revalidation NFS: Ensure that nfs_link() returns a hashed dentry NFS: Be strict about dentry revalidation when doing exclusive create NFS: Don't zap the readdir caches upon error NFS: Remove the redundant nfs_reval_fsid() NFSv3: Always use directory post-op attributes in nfs3_proc_lookup ... Fix up trivial conflict due to sock_owned_by_user() cleanup manually in net/sunrpc/xprtsock.c
| * NFSv4: Fix a typo in nfs_inode_reclaim_delegationTrond Myklebust2007-10-11
| | | | | | | | | | | | | | | | | | We were intending to put the previous instance of delegation->cred before setting a new one. Thanks to David Howells for spotting this. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Add a boot parameter to disable 64 bit inode numbersTrond Myklebust2007-10-09
| | | | | | | | | | | | | | | | This boot parameter will allow legacy 32-bit applications which call stat() to continue to function even if the NFSv3/v4 server uses 64-bit inode numbers. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: nfs_refresh_inode should clear cache_validity flags on successTrond Myklebust2007-10-09
| | | | | | | | | | | | | | If the cached attributes match the ones supplied in the fattr, then assume we've revalidated the inode. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix a connectathon regression in NFSv3 and NFSv4Trond Myklebust2007-10-09
| | | | | | | | | | | | | | | | | | We're failing basic test6 against Linux servers because they lack a correct change attribute. The fix is to assume that we always want to invalidate the readdir caches when we call update_changeattr and/or nfs_post_op_update_inode on a directory. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Use nfs_refresh_inode() in ops that aren't expected to change the inodeTrond Myklebust2007-10-09
| | | | | | | | | | | | | | nfs_post_op_update_inode() is really only meant to be used if we expect the inode and its attributes to have changed in some way. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * SUNRPC: Don't call xprt_release in call refreshTrond Myklebust2007-10-09
| | | | | | | | | | | | Call it from call_verify() instead... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * SUNRPC: Don't call xprt_release() if call_allocate failsTrond Myklebust2007-10-09
| | | | | | | | | | | | | | It completely fouls up the RPC call statistics, and serves no useful purpose. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * SUNRPC: Fix buggy UDP transmissionTrond Myklebust2007-10-09
| | | | | | | | | | | | | | xs_sendpages() may return a negative result. We sure as hell don't want to add that to the 'tk_bytes_sent' tally... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * [23/37] Clean up duplicate includes inJesper Juhl2007-10-09
| | | | | | | | | | | | | | | | | | | | Hi, This patch cleans up duplicate includes in include/linux/nfs_fs.h Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * [2.6 patch] net/sunrpc/rpcb_clnt.c: make struct rpcb_program staticAdrian Bunk2007-10-09
| | | | | | | | | | | | | | This patch makes the needlessly global struct rpcb_program static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * SUNRPC: Use correct type in buffer length calculationsChuck Lever2007-10-09
| | | | | | | | | | | | | | | | | | | | | | Use correct type signage in gss_krb5_remove_padding() when doing length calculations. Both xdr_buf.len and iov.iov_len are size_t, which is unsigned; so use an unsigned type for our temporary length variable to ensure we don't overflow it.. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * SUNRPC: Fix default hostname created in rpc_create()J. Bruce Fields2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 43780b87fa7..., rpc_create() fills in a default hostname based on the ip address if the servername passed in is null. A small typo made that default incorrect. (But this information appears to be used only for debugging right now, so I don't believe the typo causes any bugs in the current kernel.) Thanks to Olga Kornievskaia for bug report and testing. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Olga Kornievskaia <aglo@citi.umich.edu> Cc: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * nfs: add server port to rpc_pipe info fileJ. Bruce Fields2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the client, when an alternate server port is specified on the mount commandline, we need to make sure gssd knows about it. Also, on the server side, when we're sending krb5 callbacks to the client, we'll use the same mechanism to let gssd know about the callback port. Thanks to Olga Kornievskaia for testing and for an earlier implementation. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Cc: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Get rid of some obsolete macrosTrond Myklebust2007-10-09
| | | | | | | | | | | | | | - NFS_READTIME, NFS_CHANGE_ATTR are completely unused. - Inline the few remaining uses of NFS_ATTRTIMEO, and remove. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Simplify filehandle revalidationTrond Myklebust2007-10-09
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Ensure that nfs_link() returns a hashed dentryTrond Myklebust2007-10-09
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Be strict about dentry revalidation when doing exclusive createTrond Myklebust2007-10-09
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Don't zap the readdir caches upon errorTrond Myklebust2007-10-09
| | | | | | | | | | | | If necessary, the caches will get zapped under normal revalidation. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Remove the redundant nfs_reval_fsid()Trond Myklebust2007-10-09
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv3: Always use directory post-op attributes in nfs3_proc_lookupTrond Myklebust2007-10-09
| | | | | | | | | | | | | | LOOKUP returns the directory post-op attributes whether or not the operation was successful. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Fix nfs_atomic_open() to set the verifier on negative dentries tooTrond Myklebust2007-10-09
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Use NFSv2/v3 rules for negative dentries in nfs_open_revalidateTrond Myklebust2007-10-09
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Don't revalidate the directory in nfs_atomic_lookup()Trond Myklebust2007-10-09
| | | | | | | | | | | | Why bother, since the call to nfs4_atomic_open() will do it for us. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Optimise nfs_lookup_revalidate()Trond Myklebust2007-10-09
| | | | | | | | | | | | | | We don't need to call nfs_revalidate_inode() on the directory if we already know that the verifiers don't match. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Reset nfsi->last_updated only if the attribute changedTrond Myklebust2007-10-09
| | | | | | | | | | | | | | Otherwise set it to nfsi->read_cache_jiffies in order to prevent jiffy wraparound issues. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Remove nfs_begin_data_update/nfs_end_data_updateTrond Myklebust2007-10-09
| | | | | | | | | | | | | | The lower level routines in fs/nfs/proc.c, fs/nfs/nfs3proc.c and fs/nfs/nfs4proc.c should already be dealing with the revalidation issues. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Remove NFS_I(inode)->data_updatesTrond Myklebust2007-10-09
| | | | | | | | | | | | We have no more users... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>