]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'net-next/master'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Sep 2012 02:31:30 +0000 (12:31 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Sep 2012 02:31:35 +0000 (12:31 +1000)
Conflicts:
net/socket.c

36 files changed:
1  2 
Documentation/feature-removal-schedule.txt
arch/mips/configs/nlm_xlp_defconfig
drivers/bluetooth/btusb.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/t4_hw.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/realtek/r8169.c
drivers/net/ethernet/ti/davinci_mdio.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/iwlegacy/common.h
drivers/net/wireless/iwlwifi/pcie/trans.c
drivers/net/wireless/mwifiex/cmdevt.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rtlwifi/pci.c
include/linux/net.h
include/net/bluetooth/smp.h
include/net/xfrm.h
init/Kconfig
net/9p/trans_fd.c
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c
net/core/sock.c
net/ipv6/tcp_ipv6.c
net/l2tp/l2tp_eth.c
net/mac80211/cfg.c
net/mac80211/mlme.c
net/openvswitch/actions.c
net/openvswitch/datapath.c
net/openvswitch/flow.h
net/sctp/output.c
net/sctp/socket.c
net/socket.c
net/wireless/nl80211.c
net/xfrm/xfrm_state.c

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
Simple merge
diff --cc init/Kconfig
Simple merge
index 8c4e0b538a8a1b354d950ce6c018b515431e9fde,6449bae157023c182de306d862a6c0a11f0b04e9..1c8b557a3b18346e278e542fcc60ad303231db8e
@@@ -801,8 -800,8 +801,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);
Simple merge
Simple merge
diff --cc net/core/sock.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
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 79170dcdcef2e4ca8f1a19f26c095759eafba487,977c0f48c8d6c3efa655a91a69f7911445b313a9..08a91f15f220b63d50ce473896f5cfad2f86e724
@@@ -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