1. 30 Sep, 2016 36 commits
  2. 24 Sep, 2016 4 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.7.5 · 6c21842b
      Greg Kroah-Hartman authored
      6c21842b
    • Guenter Roeck's avatar
      openrisc: fix the fix of copy_from_user() · 352906f9
      Guenter Roeck authored
      commit 8e4b7205 upstream.
      
      Since commit acb2505d ("openrisc: fix copy_from_user()"),
      copy_from_user() returns the number of bytes requested, not the
      number of bytes not copied.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Fixes: acb2505d ("openrisc: fix copy_from_user()")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      352906f9
    • Guenter Roeck's avatar
      avr32: fix 'undefined reference to `___copy_from_user' · d48163c4
      Guenter Roeck authored
      commit 65c0044c upstream.
      
      avr32 builds fail with:
      
      arch/avr32/kernel/built-in.o: In function `arch_ptrace':
      (.text+0x650): undefined reference to `___copy_from_user'
      arch/avr32/kernel/built-in.o:(___ksymtab+___copy_from_user+0x0): undefined
      reference to `___copy_from_user'
      kernel/built-in.o: In function `proc_doulongvec_ms_jiffies_minmax':
      (.text+0x5dd8): undefined reference to `___copy_from_user'
      kernel/built-in.o: In function `proc_dointvec_minmax_sysadmin':
      sysctl.c:(.text+0x6174): undefined reference to `___copy_from_user'
      kernel/built-in.o: In function `ptrace_has_cap':
      ptrace.c:(.text+0x69c0): undefined reference to `___copy_from_user'
      kernel/built-in.o:ptrace.c:(.text+0x6b90): more undefined references to
      `___copy_from_user' follow
      
      Fixes: 8630c322 ("avr32: fix copy_from_user()")
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Acked-by: default avatarHavard Skinnemoen <hskinnemoen@gmail.com>
      Acked-by: default avatarHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d48163c4
    • Linus Torvalds's avatar
      Add braces to avoid "ambiguous ‘else’" compiler warnings · ea719094
      Linus Torvalds authored
      commit 194dc870 upstream.
      
      Some of our "for_each_xyz()" macro constructs make gcc unhappy about
      lack of braces around if-statements inside or outside the loop, because
      the loop construct itself has a "if-then-else" statement inside of it.
      
      The resulting warnings look something like this:
      
        drivers/gpu/drm/i915/i915_debugfs.c: In function ‘i915_dump_lrc’:
        drivers/gpu/drm/i915/i915_debugfs.c:2103:6: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
           if (ctx != dev_priv->kernel_context)
              ^
      
      even if the code itself is fine.
      
      Since the warning is fairly easy to avoid by adding a braces around the
      if-statement near the for_each_xyz() construct, do so, rather than
      disabling the otherwise potentially useful warning.
      
      (The if-then-else statements used in the "for_each_xyz()" constructs are
      designed to be inherently safe even with no braces, but in this case
      it's quite understandable that gcc isn't really able to tell that).
      
      This finally leaves the standard "allmodconfig" build with just a
      handful of remaining warnings, so new and valid warnings hopefully will
      stand out.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ea719094