]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'net-next/master'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Sep 2012 01:29:00 +0000 (11:29 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Sep 2012 01:29:05 +0000 (11:29 +1000)
Conflicts:
net/ipv4/fib_frontend.c
net/ipv4/route.c
net/socket.c

44 files changed:
1  2 
Documentation/feature-removal-schedule.txt
arch/mips/configs/nlm_xlp_defconfig
arch/powerpc/configs/ppc64_defconfig
drivers/infiniband/hw/cxgb4/qp.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/intel/e1000/e1000_main.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
drivers/net/ethernet/realtek/r8169.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/debug.c
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/pci.c
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
drivers/net/wireless/iwlegacy/common.h
drivers/net/wireless/iwlwifi/pcie/trans.c
drivers/net/wireless/rtlwifi/pci.c
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
include/linux/net.h
include/net/ip6_fib.h
include/net/net_namespace.h
include/net/netns/ipv4.h
include/net/sock.h
init/Kconfig
kernel/pid_namespace.c
net/9p/trans_fd.c
net/core/dev.c
net/ipv4/route.c
net/ipv4/tcp_input.c
net/ipv6/route.c
net/sctp/socket.c
net/socket.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_user.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c8a9708d4d6604199478aba8511360ae07419208,99276c3dc89aef2f3d2014ca87b427877247d6f8..a3831f30e120a77970654c4e77a748df02dd0119
@@@ -247,7 -246,7 +247,8 @@@ extern int              sock_sendmsg(struct 
                                  size_t len);
  extern int         sock_recvmsg(struct socket *sock, struct msghdr *msg,
                                  size_t size, int flags);
- extern struct file  *sock_alloc_file(struct socket *sock, int flags);
 -extern int         sock_map_fd(struct socket *sock, int flags);
++extern struct file  *sock_alloc_file(struct socket *sock, int flags,
++                                   const char *dname);
  extern struct socket *sockfd_lookup(int fd, int *err);
  extern struct socket *sock_from_file(struct file *file, int *err);
  #define                    sockfd_put(sock) fput(sock->file)
Simple merge
index fd87963a0ea5878cecae892541b9fc9f79e64814,5ae57f1ab7551e556c0145dcb51206d5de08ecc6..037190a1368467b7c1a2d359b98a5717a38ce86c
@@@ -102,9 -107,15 +107,16 @@@ struct net 
  #endif
        struct netns_ipvs       *ipvs;
        struct sock             *diag_nlsk;
 +      atomic_t                rt_genid;
  };
  
+ /*
+  * ifindex generation is per-net namespace, and loopback is
+  * always the 1st device in ns (see net_dev_init), thus any
+  * loopback device should get ifindex 1
+  */
+ #define LOOPBACK_IFINDEX      1
  
  #include <linux/seq_file_net.h>
  
index eb24dbccd81e81aff5fac76c8792e93df66e7bb6,7d00583d53da21f0aec0557f00df736d881fbbc6..2ae2b8372cfdc1a64210218fe3824d7f7973b60c
@@@ -62,9 -61,10 +61,9 @@@ struct netns_ipv4 
        int sysctl_icmp_ratemask;
        int sysctl_icmp_errors_use_inbound_ifaddr;
  
-       unsigned int sysctl_ping_group_range[2];
+       kgid_t sysctl_ping_group_range[2];
        long sysctl_tcp_mem[3];
  
 -      atomic_t rt_genid;
        atomic_t dev_addr_genid;
  
  #ifdef CONFIG_IP_MROUTE
Simple merge
diff --cc init/Kconfig
Simple merge
Simple merge
index 4c3be8f6337c3ee170d3d1052650971f0d08d88a,6449bae157023c182de306d862a6c0a11f0b04e9..7bea6da41abef4ded633118f9844d35ce6fb4444
@@@ -803,8 -800,8 +803,8 @@@ static int p9_socket_open(struct p9_cli
                return -ENOMEM;
  
        csocket->sk->sk_allocation = GFP_NOIO;
-       file = sock_alloc_file(csocket, 0);
 -      fd = sock_map_fd(csocket, 0);
 -      if (fd < 0) {
++      file = sock_alloc_file(csocket, 0, NULL);
 +      if (IS_ERR(file)) {
                pr_err("%s (%d): failed to map fd\n",
                       __func__, task_pid_nr(current));
                sock_release(csocket);
diff --cc net/core/dev.c
Simple merge
Simple merge
Simple merge
Simple merge
index fb5931ca50d0fc4aad0ac49d60b7591d981ea30f,d37d24ff197f094d5200fd9e51a692a08112157e..59d16ea927f0f83d706d3a59c79d13be0a95c1e8
@@@ -4297,13 -4311,6 +4313,13 @@@ static int sctp_getsockopt_peeloff(stru
                goto out;
        }
  
-       newfile = sock_alloc_file(newsock, 0);
++      newfile = sock_alloc_file(newsock, 0, NULL);
 +      if (unlikely(IS_ERR(newfile))) {
 +              put_unused_fd(retval);
 +              sock_release(newsock);
 +              return PTR_ERR(newfile);
 +      }
 +
        SCTP_DEBUG_PRINTK("%s: sk: %p newsk: %p sd: %d\n",
                          __func__, sk, newsock->sk, retval);
  
diff --cc net/socket.c
index 38a14311f3a6ffc0f21a2500a826f39b4ec0271b,c641549a13e2902ecfa277fb0e41082aa0f3576e..06c4dbeeacf27ba088182f6dedb52b8639e094bf
@@@ -346,15 -347,30 +347,23 @@@ static struct file_system_type sock_fs_
   *    but we take care of internal coherence yet.
   */
  
- struct file *sock_alloc_file(struct socket *sock, int flags)
 -static int sock_alloc_file(struct socket *sock, struct file **f, int flags,
 -                         const char *dname)
++struct file *sock_alloc_file(struct socket *sock, int flags,
++                           const char *dname)
  {
        struct qstr name = { .name = "" };
        struct path path;
        struct file *file;
 -      int fd;
 -
 -      fd = get_unused_fd_flags(flags);
 -      if (unlikely(fd < 0))
 -              return fd;
  
+       if (dname) {
+               name.name = dname;
+               name.len = strlen(name.name);
+       } else if (sock->sk) {
+               name.name = sock->sk->sk_prot_creator->name;
+               name.len = strlen(name.name);
+       }
        path.dentry = d_alloc_pseudo(sock_mnt->mnt_sb, &name);
 -      if (unlikely(!path.dentry)) {
 -              put_unused_fd(fd);
 -              return -ENOMEM;
 -      }
 +      if (unlikely(!path.dentry))
 +              return ERR_PTR(-ENOMEM);
        path.mnt = mntget(sock_mnt);
  
        d_instantiate(path.dentry, SOCK_INODE(sock));
        file->f_flags = O_RDWR | (flags & O_NONBLOCK);
        file->f_pos = 0;
        file->private_data = sock;
 -
 -      *f = file;
 -      return fd;
 +      return file;
  }
 +EXPORT_SYMBOL(sock_alloc_file);
  
 -int sock_map_fd(struct socket *sock, int flags)
 +static int sock_map_fd(struct socket *sock, int flags)
  {
        struct file *newfile;
 -      int fd = sock_alloc_file(sock, &newfile, flags, NULL);
 +      int fd = get_unused_fd_flags(flags);
 +      if (unlikely(fd < 0))
 +              return fd;
  
-       newfile = sock_alloc_file(sock, flags);
 -      if (likely(fd >= 0))
++      newfile = sock_alloc_file(sock, flags, NULL);
 +      if (likely(!IS_ERR(newfile))) {
                fd_install(fd, newfile);
 +              return fd;
 +      }
  
 -      return fd;
 +      put_unused_fd(fd);
 +      return PTR_ERR(newfile);
  }
 -EXPORT_SYMBOL(sock_map_fd);
  
  struct socket *sock_from_file(struct file *file, int *err)
  {
@@@ -1395,27 -1471,12 +1467,27 @@@ SYSCALL_DEFINE4(socketpair, int, family
                err = fd1;
                goto out_release_both;
        }
 -
 -      fd2 = sock_alloc_file(sock2, &newfile2, flags, NULL);
 +      fd2 = get_unused_fd_flags(flags);
        if (unlikely(fd2 < 0)) {
                err = fd2;
-       newfile1 = sock_alloc_file(sock1, flags);
 +              put_unused_fd(fd1);
 +              goto out_release_both;
 +      }
 +
-       newfile2 = sock_alloc_file(sock2, flags);
++      newfile1 = sock_alloc_file(sock1, flags, NULL);
 +      if (unlikely(IS_ERR(newfile1))) {
 +              err = PTR_ERR(newfile1);
 +              put_unused_fd(fd1);
 +              put_unused_fd(fd2);
 +              goto out_release_both;
 +      }
 +
++      newfile2 = sock_alloc_file(sock2, flags, NULL);
 +      if (IS_ERR(newfile2)) {
 +              err = PTR_ERR(newfile2);
                fput(newfile1);
                put_unused_fd(fd1);
 +              put_unused_fd(fd2);
                sock_release(sock2);
                goto out;
        }
@@@ -1553,13 -1615,6 +1625,14 @@@ SYSCALL_DEFINE4(accept4, int, fd, struc
                sock_release(newsock);
                goto out_put;
        }
-       newfile = sock_alloc_file(newsock, flags);
++      newfile = sock_alloc_file(newsock, flags,
++                                sock->sk->sk_prot_creator->name);
 +      if (unlikely(IS_ERR(newfile))) {
 +              err = PTR_ERR(newfile);
 +              put_unused_fd(newfd);
 +              sock_release(newsock);
 +              goto out_put;
 +      }
  
        err = security_socket_accept(sock, newsock);
        if (err)
Simple merge
Simple merge