1. May 27, 2016
  2. May 26, 2016
  3. May 25, 2016
  4. May 24, 2016
    • Dan Carpenter's avatar
      qed: signedness bug in qed_dcbx_process_tlv() · 54b9430f
      Dan Carpenter authored
      "priority" needs to be signed for the error handling to work.
      
      Fixes: 39651abd
      
       ('qed: add support for dcbx.')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      54b9430f
    • Daniel Borkmann's avatar
      bpf, inode: disallow userns mounts · 612bacad
      Daniel Borkmann authored
      Follow-up to commit e27f4a94 ("bpf: Use mount_nodev not mount_ns
      to mount the bpf filesystem"), which removes the FS_USERNS_MOUNT flag.
      
      The original idea was to have a per mountns instance instead of a
      single global fs instance, but that didn't work out and we had to
      switch to mount_nodev() model. The intent of that middle ground was
      that we avoid users who don't play nice to create endless instances
      of bpf fs which are difficult to control and discover from an admin
      point of view, but at the same time it would have allowed us to be
      more flexible with regard to namespaces.
      
      Therefore, since we now did the switch to mount_nodev() as a fix
      where individual instances are created, we also need to remove userns
      mount flag along with it to avoid running into mentioned situation.
      I don't expect any breakage at this early point in time with removing
      the flag and we can revisit this later should the requirement for
      this come up with future users. This and commit e27f4a94...
      612bacad
    • Geert Uytterhoeven's avatar
      MAINTAINERS: Add file patterns for net device tree bindings · 156f4fbc
      Geert Uytterhoeven authored
      
      
      Submitters of device tree binding documentation may forget to CC
      the subsystem maintainer if this is missing.
      
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      156f4fbc
    • Ezequiel Garcia's avatar
      ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n · 049bbf58
      Ezequiel Garcia authored
      Commit fa50d974 ("ipv4: Namespaceify ip_default_ttl sysctl knob")
      moves the default TTL assignment, and as side-effect IPv4 TTL now
      has a default value only if sysctl support is enabled (CONFIG_SYSCTL=y).
      
      The sysctl_ip_default_ttl is fundamental for IP to work properly,
      as it provides the TTL to be used as default. The defautl TTL may be
      used in ip_selected_ttl, through the following flow:
      
        ip_select_ttl
          ip4_dst_hoplimit
            net->ipv4.sysctl_ip_default_ttl
      
      This commit fixes the issue by assigning net->ipv4.sysctl_ip_default_ttl
      in net_init_net, called during ipv4's initialization.
      
      Without this commit, a kernel built without sysctl support will send
      all IP packets with zero TTL (unless a TTL is explicitly set, e.g.
      with setsockopt).
      
      Given a similar issue might appear on the other knobs that were
      namespaceify, this commit also moves them.
      
      Fixes: fa50d974
      
       ("ipv4: Namespaceify ip_default_ttl sysctl knob")
      Signed-off-by: default avatarEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      049bbf58
    • Muhammad Falak R Wani's avatar
      ptp: use memdup_user(). · 2ece068e
      Muhammad Falak R Wani authored
      
      
      Use memdup_user to duplicate a memory region from user-space to
      kernel-space, instead of open coding using kmalloc & copy_from_user.
      
      Signed-off-by: default avatarMuhammad Falak R Wani <falakreyaz@gmail.com>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ece068e
    • xypron.glpk@gmx.de's avatar
      net: hns: avoid null pointer dereference · 8da07a39
      xypron.glpk@gmx.de authored
      
      
      In the statement
        assert(priv || priv->ae_handle);
      the right side of || is only evaluated if priv is null.
      
      v2:
      	As suggested by David Leight and David Miller the assert
      	statements are removed.
      
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8da07a39
    • Stefan Hajnoczi's avatar
      net/atm: sk_err_soft must be positive · c685293a
      Stefan Hajnoczi authored
      
      
      The sk_err and sk_err_soft fields are positive errno values and
      userspace applications rely on this when using getsockopt(SO_ERROR).
      
      ATM code places an -errno into sk_err_soft in sigd_send() and returns it
      from svc_addparty()/svc_dropparty().
      
      Although I am not familiar with ATM code I came to this conclusion
      because:
      
      1. sigd_send() msg->type cases as_okay and as_error both have:
      
         sk->sk_err = -msg->reply;
      
         while the as_addparty and as_dropparty cases have:
      
         sk->sk_err_soft = msg->reply;
      
         This is the source of the inconsistency.
      
      2. svc_addparty() returns an -errno and assumes sk_err_soft is also an
         -errno:
      
             if (flags & O_NONBLOCK) {
                 error = -EINPROGRESS;
                 goto out;
             }
             ...
             error = xchg(&sk->sk_err_soft, 0);
         out:
             release_sock(sk);
             return error;
      
         This shows that sk_err_soft is indeed being treated as an -errno.
      
      This patch ensures that sk_err_soft is always a positive errno.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c685293a