1. 29 Dec, 2018 37 commits
  2. 21 Dec, 2018 3 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.14.90 · 592f5569
      Greg Kroah-Hartman authored
      592f5569
    • Nicolas Schichan's avatar
      bpf, arm: fix emit_ldx_r and emit_mov_i using TMP_REG_1 · ad962d20
      Nicolas Schichan authored
      emit_ldx_r() and emit_a32_mov_i() were both using TMP_REG_1 and
      clashing with each other. Using TMP_REG_2 in emit_ldx_r() fixes
      the issue.
      
      Fixes: ec19e02b ("ARM: net: bpf: fix LDX instructions")
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarNicolas Schichan <nschichan@freebox.fr>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      ad962d20
    • Trent Piepho's avatar
      rtc: snvs: Add timeouts to avoid kernel lockups · f1e1eb5c
      Trent Piepho authored
      [ Upstream commit cd7f3a24 ]
      
      In order to read correctly from asynchronously updated RTC registers,
      it's necessary to read repeatedly until their values do not change from
      read to read.  It's also necessary to wait for three RTC clock ticks for
      certain operations.  There are no timeouts in this code and these
      operations could possibly loop forever.
      
      To avoid kernel hangs, put in timeouts.
      
      The iMX7d can be configured to stop the SRTC on a tamper event, which
      will lockup the kernel inside this driver as described above.
      
      These hangs can happen when running under qemu, which doesn't emulate
      the SNVS RTC, though currently the driver will refuse to load on qemu
      due to a timeout in the driver probe method.
      
      It could also happen if the SRTC block where somehow placed into reset
      or the slow speed clock that drives the SRTC counter (but not the CPU)
      were to stop.
      
      The symptoms on a two core iMX7d are a work queue hang on
      rtc_timer_do_work(), which eventually blocks a systemd fsnotify
      operation that triggers a work queue flush, causing systemd to hang and
      thus causing all services that should be started by systemd, like a
      console getty, to fail to start or stop.
      
      Also optimize the wait code to wait less.  It only needs to wait for the
      clock to advance three ticks, not to see it change three times.
      
      Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Bryan O'Donoghue <pure.logic@nexus-software.ie>
      Signed-off-by: default avatarTrent Piepho <tpiepho@impinj.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      f1e1eb5c