From: Linus Torvalds Date: Mon, 14 Sep 2009 17:37:28 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7e9660ad9d5e0845f52848bce31bcf5cdcdea6b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge git://git./linux/kernel/git/davem/net-next-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits) netxen: update copyright netxen: fix tx timeout recovery netxen: fix file firmware leak netxen: improve pci memory access netxen: change firmware write size tg3: Fix return ring size breakage netxen: build fix for INET=n cdc-phonet: autoconfigure Phonet address Phonet: back-end for autoconfigured addresses Phonet: fix netlink address dump error handling ipv6: Add IFA_F_DADFAILED flag net: Add DEVTYPE support for Ethernet based devices mv643xx_eth.c: remove unused txq_set_wrr() ucc_geth: Fix hangs after switching from full to half duplex ucc_geth: Rearrange some code to avoid forward declarations phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs drivers/net/phy: introduce missing kfree drivers/net/wan: introduce missing kfree net: force bridge module(s) to be GPL Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded ... Fixed up trivial conflicts: - arch/x86/include/asm/socket.h converted to in the x86 tree. The generic header has the same new #define's, so that works out fine. - drivers/net/tun.c fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that switched over to using 'tun->socket.sk' instead of the redundantly available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks to the TUN driver") which added a new 'tun->sk' use. Noted in 'next' by Stephen Rothwell. --- d7e9660ad9d5e0845f52848bce31bcf5cdcdea6b diff --cc drivers/net/tun.c index 87214a257d2a,589a44acdc76..3f5d28851aa2 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@@ -930,14 -935,6 +930,14 @@@ static int tun_set_iff(struct net *net else return -EINVAL; + if (((tun->owner != -1 && cred->euid != tun->owner) || + (tun->group != -1 && !in_egroup_p(tun->group))) && + !capable(CAP_NET_ADMIN)) + return -EPERM; - err = security_tun_dev_attach(tun->sk); ++ err = security_tun_dev_attach(tun->socket.sk); + if (err < 0) + return err; + err = tun_attach(tun, file); if (err < 0) return err; @@@ -992,11 -986,8 +992,10 @@@ sk->sk_write_space = tun_sock_write_space; sk->sk_sndbuf = INT_MAX; - tun->sk = sk; container_of(sk, struct tun_sock, sk)->tun = tun; + security_tun_dev_post_create(sk); + tun_net_init(dev); if (strchr(dev->name, '%')) { diff --cc net/core/dev.c index 278d489aad3b,f843a0c5ecf9..84945470ab38 --- a/net/core/dev.c +++ b/net/core/dev.c @@@ -1031,9 -1041,10 +1041,10 @@@ void dev_load(struct net *net, const ch dev = __dev_get_by_name(net, name); read_unlock(&dev_base_lock); - if (!dev && capable(CAP_SYS_MODULE)) + if (!dev && capable(CAP_NET_ADMIN)) request_module("%s", name); } + EXPORT_SYMBOL(dev_load); /** * dev_open - prepare an interface for use.