1. 26 May, 2016 13 commits
  2. 25 May, 2016 13 commits
  3. 24 May, 2016 5 commits
  4. 23 May, 2016 9 commits
    • 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 have
      been split to facilitate tracking should any of them run into the
      unlikely case of causing a regression.
      
      Fixes: b2197755 ("bpf: add support for persistent maps/progs")
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      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
    • xypron.glpk@gmx.de's avatar
      net: pegasus: simplify logical constraint · bbf178e0
      xypron.glpk@gmx.de authored
      If !count is true, count < 4 is also true.
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bbf178e0
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 7639dad9
      Linus Torvalds authored
      Pull motr tracing updates from Steven Rostedt:
       "Three more changes.
      
         - I forgot that I had another selftest to stress test the ftrace
           instance creation.  It was actually suppose to go into the 4.6
           merge window, but I never committed it.  I almost forgot about it
           again, but noticed it was missing from your tree.
      
         - Soumya PN sent me a clean up patch to not disable interrupts when
           taking the tasklist_lock for read, as it's unnecessary because that
           lock is never taken for write in irq context.
      
         - Newer gcc's can cause the jump in the function_graph code to the
           global ftrace_stub label to be a short jump instead of a long one.
           As that jump is dynamically converted to jump to the trace code to
           do function graph tracing, and that conversion expects a long jump
           it can corrupt the ftrace_stub itself (it's directly after that
           call).  One way to prevent gcc from using a short jump is to
           declare the ftrace_stub as a weak function, which we do here to
           keep gcc from optimizing too much"
      
      * tag 'trace-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace/x86: Set ftrace_stub to weak to prevent gcc from using short jumps to it
        ftrace: Don't disable irqs when taking the tasklist_lock read_lock
        ftracetest: Add instance created, delete, read and enable event test
      7639dad9