1. 25 Feb, 2018 33 commits
  2. 22 Feb, 2018 7 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.4.117 · e9fd3d16
      Greg Kroah-Hartman authored
      e9fd3d16
    • Arnd Bergmann's avatar
      media: r820t: fix r820t_write_reg for KASAN · c4fd9c8d
      Arnd Bergmann authored
      commit 16c3ada8 upstream.
      
      With CONFIG_KASAN, we get an overly long stack frame due to inlining
      the register access functions:
      
      drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7':
      drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
      
      This is caused by a gcc bug that has now been fixed in gcc-8.
      To work around the problem, we can pass the register data
      through a local variable that older gcc versions can optimize
      out as well.
      
      Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c4fd9c8d
    • Arnd Bergmann's avatar
      ARM: dts: s5pv210: add interrupt-parent for ohci · 193cfa76
      Arnd Bergmann authored
      commit 5c103719 upstream.
      
      The ohci-hcd node has an interrupt number but no interrupt-parent,
      leading to a warning with current dtc versions:
      
      arch/arm/boot/dts/s5pv210-aquila.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
      arch/arm/boot/dts/s5pv210-goni.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
      arch/arm/boot/dts/s5pv210-smdkc110.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
      arch/arm/boot/dts/s5pv210-smdkv210.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
      arch/arm/boot/dts/s5pv210-torbreck.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
      
      As seen from the related exynos dts files, the ohci and ehci controllers
      always share one interrupt number, and the number is the same here as
      well, so setting the same interrupt-parent is the reasonable solution
      here.
      Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      193cfa76
    • Arnd Bergmann's avatar
      ARM: pxa/tosa-bt: add MODULE_LICENSE tag · 4bdee1ef
      Arnd Bergmann authored
      commit 33436478 upstream.
      
      Without this tag, we get a build warning:
      
      WARNING: modpost: missing MODULE_LICENSE() in arch/arm/mach-pxa/tosa-bt.o
      
      For completeness, I'm also adding author and description fields.
      Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bdee1ef
    • Linus Torvalds's avatar
      vfs: don't do RCU lookup of empty pathnames · 42e9b08a
      Linus Torvalds authored
      commit c0eb027e upstream.
      
      Normal pathname lookup doesn't allow empty pathnames, but using
      AT_EMPTY_PATH (with name_to_handle_at() or fstatat(), for example) you
      can trigger an empty pathname lookup.
      
      And not only is the RCU lookup in that case entirely unnecessary
      (because we'll obviously immediately finalize the end result), it is
      actively wrong.
      
      Why? An empth path is a special case that will return the original
      'dirfd' dentry - and that dentry may not actually be RCU-free'd,
      resulting in a potential use-after-free if we were to initialize the
      path lazily under the RCU read lock and depend on complete_walk()
      finalizing the dentry.
      
      Found by syzkaller and KASAN.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Reported-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Eric Biggers <ebiggers3@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      42e9b08a
    • Arnd Bergmann's avatar
      x86: fix build warnign with 32-bit PAE · 4b35dcb5
      Arnd Bergmann authored
      I ran into a 4.9 build warning in randconfig testing, starting with the
      KAISER patches:
      
      arch/x86/kernel/ldt.c: In function 'alloc_ldt_struct':
      arch/x86/include/asm/pgtable_types.h:208:24: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
       #define __PAGE_KERNEL  (__PAGE_KERNEL_EXEC | _PAGE_NX)
                              ^
      arch/x86/kernel/ldt.c:81:6: note: in expansion of macro '__PAGE_KERNEL'
            __PAGE_KERNEL);
            ^~~~~~~~~~~~~
      
      I originally ran into this last year when the patches were part of linux-next,
      and tried to work around it by using the proper 'pteval_t' types consistently,
      but that caused additional problems.
      
      This takes a much simpler approach, and makes the argument type of the dummy
      helper always 64-bit, which is wide enough for any page table layout and
      won't hurt since this call is just an empty stub anyway.
      
      Fixes: 8f0baadf ("kaiser: merged update")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4b35dcb5
    • NeilBrown's avatar
      dm: correctly handle chained bios in dec_pending() · bb185128
      NeilBrown authored
      commit 8dd601fa upstream.
      
      dec_pending() is given an error status (possibly 0) to be recorded
      against a bio.  It can be called several times on the one 'struct
      dm_io', and it is careful to only assign a non-zero error to
      io->status.  However when it then assigned io->status to bio->bi_status,
      it is not careful and could overwrite a genuine error status with 0.
      
      This can happen when chained bios are in use.  If a bio is chained
      beneath the bio that this dm_io is handling, the child bio might
      complete and set bio->bi_status before the dm_io completes.
      
      This has been possible since chained bios were introduced in 3.14, and
      has become a lot easier to trigger with commit 18a25da8 ("dm: ensure
      bio submission follows a depth-first tree walk") as that commit caused
      dm to start using chained bios itself.
      
      A particular failure mode is that if a bio spans an 'error' target and a
      working target, the 'error' fragment will complete instantly and set the
      ->bi_status, and the other fragment will normally complete a little
      later, and will clear ->bi_status.
      
      The fix is simply to only assign io_error to bio->bi_status when
      io_error is not zero.
      Reported-and-tested-by: default avatarMilan Broz <gmazyland@gmail.com>
      Cc: stable@vger.kernel.org (v3.14+)
      Signed-off-by: default avatarNeilBrown <neilb@suse.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bb185128