1. 27 Oct, 2017 5 commits
    • Kees Cook's avatar
      scsi: fcoe: Convert timers to use timer_setup() · 13059106
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: QLogic-Storage-Upstream@qlogic.com
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Johannes Thumshirn <jth@kernel.org>
      Cc: linux-scsi@vger.kernel.org
      Cc: fcoe-devel@open-fcoe.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarJohannes Thumshirn <jth@kernel.org>
      13059106
    • Kees Cook's avatar
      scsi: dc395x: Convert timers to use timer_setup() · af53b89b
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Ali Akcaagac <aliakc@web.de>
      Cc: Jamie Lenehan <lenehan@twibble.org>
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: linux-scsi@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      af53b89b
    • Kees Cook's avatar
      scsi: bnx2i: Convert timers to use timer_setup() · abef7510
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      There was a seemingly missing call to initialize the timer in one handler,
      so this was added to remove the open-coded initialization.
      
      Cc: QLogic-Storage-Upstream@qlogic.com
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: linux-scsi@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      abef7510
    • Kees Cook's avatar
      scsi: be2iscsi: Convert timers to use timer_setup() · b386eec6
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Subbu Seetharaman <subbu.seetharaman@broadcom.com>
      Cc: Ketan Mukadam <ketan.mukadam@broadcom.com>
      Cc: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: linux-scsi@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      b386eec6
    • Kees Cook's avatar
      scsi: aic94xx: Convert timers to use timer_setup() · 30199bee
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Tomas Henzl <thenzl@redhat.com>
      Cc: Quentin Lambert <lambert.quentin@gmail.com>
      Cc: linux-scsi@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      30199bee
  2. 20 Oct, 2017 1 commit
    • Kees Cook's avatar
      timer: Provide wrappers safe for use with LOCKDEP · 52f737c2
      Kees Cook authored
      Under LOCKDEP, the timer lock_class_key (set up in __setup_timer) needs
      to be tied to the caller's context, so an inline for timer_setup()
      won't work. We do, however, want to keep the inline version around for
      argument type checking, though, so this provides macro wrappers in the
      LOCKDEP case.
      
      This fixes the case of different timers sharing the same LOCKDEP instance,
      and producing a false positive warning:
      
      [  580.840858] ======================================================
      [  580.842299] WARNING: possible circular locking dependency detected
      [  580.843684] 4.14.0-rc4+ #17 Not tainted
      [  580.844554] ------------------------------------------------------
      [  580.845945] swapper/9/0 is trying to acquire lock:
      [  580.847024]  (slock-AF_INET){+.-.}, at: [<ffffffff84ea4c34>] tcp_write_timer+0x24/0xd0
      [  580.848834]
                     but task is already holding lock:
      [  580.850107]  ((timer)#2){+.-.}, at: [<ffffffff846df7c0>] call_timer_fn+0x0/0x300
      [  580.851663]
                     which lock already depends on the new lock.
      
      [  580.853439]
                     the existing dependency chain (in reverse order) is:
      [  580.855311]
                     -> #1 ((timer)#2){+.-.}:
      [  580.856538]        __lock_acquire+0x114d/0x11a0
      [  580.857506]        lock_acquire+0xb0/0x1d0
      [  580.858373]        del_timer_sync+0x3c/0xb0
      [  580.859260]        inet_csk_reqsk_queue_drop+0x7f/0x1b0
      ...
                     -> #0 (slock-AF_INET){+.-.}:
      [  580.884980]        check_prev_add+0x666/0x700
      [  580.885790]        __lock_acquire+0x114d/0x11a0
      [  580.886575]        lock_acquire+0xb0/0x1d0
      [  580.887289]        _raw_spin_lock+0x2c/0x40
      [  580.888021]        tcp_write_timer+0x24/0xd0
      ...
      [  580.900055]  Possible unsafe locking scenario:
      
      [  580.901043]        CPU0                    CPU1
      [  580.901797]        ----                    ----
      [  580.902540]   lock((timer)#2);
      [  580.903046]                                lock(slock-AF_INET);
      [  580.904006]                                lock((timer)#2);
      [  580.904915]   lock(slock-AF_INET);
      [  580.905502]
      
      In this report, del_timer_sync() is from:
      
      	inet_csk_reqsk_queue_drop()
      		reqsk_queue_unlink()
      			del_timer_sync(&req->rsk_timer)
      
      but tcp_write_timer()'s timer is attached to icsk_retransmit_timer. Both
      had the same lock_class_key, since they were using timer_setup(). Switching
      to a macro allows for a separate context, avoiding the false positive.
      
      Fixes: 686fef92 ("timer: Prepare to change timer callback argument type")
      Reported-by: default avatarCraig Gallek <cgallek@google.com>
      Suggested-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: netdev@vger.kernel.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Link: https://lkml.kernel.org/r/20171019202838.GA43223@beast
      52f737c2
  3. 19 Oct, 2017 2 commits
    • Kees Cook's avatar
      ahci: Convert timers to use timer_setup() · 1843594c
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly. Adds a pointer back to link
      structure.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: linux-ide@vger.kernel.org
      Link: https://lkml.kernel.org/r/20171016215658.GA101965@beast
      1843594c
    • James Hogan's avatar
      clockevents: Retry programming min delta up to 10 times · 3a29ddb1
      James Hogan authored
      When CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=n, the call path
      hrtimer_reprogram -> clockevents_program_event ->
      clockevents_program_min_delta will not retry if the clock event driver
      returns -ETIME.
      
      If the driver could not satisfy the program_min_delta for any reason, the
      lack of a retry means the CPU may not receive a tick interrupt, potentially
      until the counter does a full period. This leads to rcu_sched timeout
      messages as the stalled CPU is detected by other CPUs, and other issues if
      the CPU is holding locks or other resources at the point at which it
      stalls.
      
      There have been a couple of observed mechanisms through which a clock event
      driver could not satisfy the requested min_delta and return -ETIME.
      
      With the MIPS GIC driver, the shared execution resource within MT cores
      means inconventient latency due to execution of instructions from other
      hardware threads in the core, within gic_next_event, can result in an event
      being set in the past.
      
      Additionally under virtualisation it is possible to get unexpected latency
      during a clockevent device's set_next_event() callback which can make it
      return -ETIME even for a delta based on min_delta_ns.
      
      It isn't appropriate to use MIN_ADJUST in the virtualisation case as
      occasional hypervisor induced high latency will cause min_delta_ns to
      quickly increase to the maximum.
      
      Instead, borrow the retry pattern from the MIN_ADJUST case, but without
      making adjustments. Retry up to 10 times, each time increasing the
      attempted delta by min_delta, before giving up.
      
      [ Matt: Reworked the loop and made retry increase the delta. ]
      Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@mips.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: "Martin Schwidefsky" <schwidefsky@de.ibm.com>
      Cc: James Hogan <james.hogan@mips.com>
      Link: https://lkml.kernel.org/r/1508422643-6075-1-git-send-email-matt.redfearn@mips.com
      3a29ddb1
  4. 18 Oct, 2017 3 commits
  5. 17 Oct, 2017 4 commits
  6. 05 Oct, 2017 15 commits
    • Kees Cook's avatar
      timer: Fix two mistakes in callback conversions · 6ac35264
      Kees Cook authored
      Two errors found their way into the timer callback conversions that
      weren't noticed with x86 allmodconfig.
      Reported-by: default avatarkernel test robot <lkp@01.org>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/20171005171035.GA34831@beast
      6ac35264
    • Kees Cook's avatar
      workqueue: Convert callback to use from_timer() · 8c20feb6
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer
      to all timer callbacks, switch workqueue to use from_timer() and pass the
      timer pointer explicitly.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-14-git-send-email-keescook@chromium.org
      8c20feb6
    • Kees Cook's avatar
      kthread: Convert callback to use from_timer() · fe5c3b69
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer
      to all timer callbacks, switch kthread to use from_timer() and pass the
      timer pointer explicitly.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Len Brown <len.brown@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-13-git-send-email-keescook@chromium.org
      fe5c3b69
    • Kees Cook's avatar
      timer: Remove expires argument from __TIMER_INITIALIZER() · 8ede369b
      Kees Cook authored
      The expires field is normally initialized during the first mod_timer()
      call. It was unused by all callers, so remove it from the macro.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-12-git-send-email-keescook@chromium.orgSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      8ede369b
    • Kees Cook's avatar
      timer: Remove expires and data arguments from DEFINE_TIMER · 1d27e3e2
      Kees Cook authored
      Drop the arguments from the macro and adjust all callers with the
      following script:
      
        perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \
          $(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v timer.h)
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # for m68k parts
      Acked-by: Guenter Roeck <linux@roeck-us.net> # for watchdog parts
      Acked-by: David S. Miller <davem@davemloft.net> # for networking parts
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: Kalle Valo <kvalo@codeaurora.org> # for wireless parts
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-11-git-send-email-keescook@chromium.orgSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1d27e3e2
    • Kees Cook's avatar
      timer: Remove users of expire and data arguments to DEFINE_TIMER · 1ff97897
      Kees Cook authored
      The expire and data arguments of DEFINE_TIMER are only used in two places
      and are ignored by the code (malta-display.c only uses mod_timer(),
      never add_timer(), so the preset expires value is ignored). Set both
      sets of arguments to zero.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: Guenter Roeck <linux@roeck-us.net> # for watchdog parts
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: linux-scsi@vger.kernel.org
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-10-git-send-email-keescook@chromium.org
      1ff97897
    • Kees Cook's avatar
      timer: Remove unused static initializer macros · fca7ce5b
      Kees Cook authored
      This removes the now unused TIMER_*INITIALIZER macros:
      
      TIMER_INITIALIZER
      TIMER_PINNED_INITIALIZER
      TIMER_DEFERRED_INITIALIZER
      TIMER_PINNED_DEFERRED_INITIALIZER
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-9-git-send-email-keescook@chromium.org
      fca7ce5b
    • Kees Cook's avatar
      timer: Remove last user of TIMER_INITIALIZER · 51487d9e
      Kees Cook authored
      Drops the last user of TIMER_INITIALIZER and adapts timer.h to use the
      internal version.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-8-git-send-email-keescook@chromium.org
      51487d9e
    • Kees Cook's avatar
      timer: Remove users of TIMER_DEFERRED_INITIALIZER · 5cd79d6a
      Kees Cook authored
      This removes uses of TIMER_DEFERRED_INITIALIZER and chooses a location
      to call timer_setup() from before add_timer() or mod_timer() is called.
      Adjusts callbacks to use from_timer() as needed.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-7-git-send-email-keescook@chromium.org
      5cd79d6a
    • Kees Cook's avatar
      timer: Remove init_timer_deferrable() in favor of timer_setup() · df7e828c
      Kees Cook authored
      This refactors the only users of init_timer_deferrable() to use
      the new timer_setup() and from_timer(). Removes definition of
      init_timer_deferrable().
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: David S. Miller <davem@davemloft.net> # for networking parts
      Acked-by: Sebastian Reichel <sre@kernel.org> # for drivers/hsi parts
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-6-git-send-email-keescook@chromium.org
      df7e828c
    • Kees Cook's avatar
      timer: Remove init_timer_pinned() in favor of timer_setup() · 185981d5
      Kees Cook authored
      This refactors the only users of init_timer_pinned() to use
      the new timer_setup() and from_timer(). Drops the definition of
      init_timer_pinned().
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: David S. Miller <davem@davemloft.net> # for networking parts
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-5-git-send-email-keescook@chromium.org
      185981d5
    • Kees Cook's avatar
      timer: Remove init_timer_on_stack() in favor of timer_setup_on_stack() · 9c6c273a
      Kees Cook authored
      Remove uses of init_timer_on_stack() with open-coded function and data
      assignments that could be expressed using timer_setup_on_stack(). Several
      were removed from the stack entirely since there was a one-to-one mapping
      of parent structure to timer, those are switched to using timer_setup()
      instead. All related callbacks were adjusted to use from_timer().
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: linux-scsi@vger.kernel.org
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-4-git-send-email-keescook@chromium.org
      9c6c273a
    • Kees Cook's avatar
      timer: Remove init_timer_pinned_deferrable() in favor of timer_setup() · 1d1fe902
      Kees Cook authored
      This refactors the only user of init_timer_pinned_deferrable() to use the
      new timer_setup() and from_timer(). Adds a pointer back to the policy,
      and drops the definition of init_timer_pinned_deferrable().
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-3-git-send-email-keescook@chromium.org
      1d1fe902
    • Kees Cook's avatar
      timer: Convert schedule_timeout() to use from_timer() · 58e1177b
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new from_timer() helper and passing
      the timer pointer explicitly. Since this special timer is on the stack, it
      needs to have a wrapper structure to carry state once .data is eliminated.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-wireless@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Harish Patil <harish.patil@cavium.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Manish Chopra <manish.chopra@cavium.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-pm@vger.kernel.org
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mark Gross <mark.gross@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Michael Reed <mdr@sgi.com>
      Cc: netdev@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lkml.kernel.org/r/1507159627-127660-2-git-send-email-keescook@chromium.org
      58e1177b
    • Thomas Gleixner's avatar
      Merge branch 'linus' into timers/core · 26eafeaa
      Thomas Gleixner authored
      Pick up upstream changes to get the prerequisites for the timer changes.
      26eafeaa
  7. 03 Oct, 2017 9 commits
    • Linus Torvalds's avatar
      Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · d81fa669
      Linus Torvalds authored
      Pull workqueue fixlet from Tejun Heo:
       "Minor documentation update"
      
      * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        Documentation: core-api: minor workqueue.rst cleanups
      d81fa669
    • Linus Torvalds's avatar
      Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 847d9fb4
      Linus Torvalds authored
      Pull cgroup fix from Tejun Heo:
       "The recent migration code updates assumed that migrations always
        execute from the top to the bottom once and didn't clean up internal
        states after each migration round; however, cgroup_transfer_tasks()
        repeats the inner steps multiple times and the garbage internal states
        from the previous iteration led to OOPS.
      
        Waiman fixed the bug by reinitializing the relevant states at the end
        of each migration round"
      
      * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: Reinit cgroup_taskset structure before cgroup_migrate_execute() returns
      847d9fb4
    • Linus Torvalds's avatar
      Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu · ff93026d
      Linus Torvalds authored
      Pull percpu fixes from Tejun Heo:
       "Rather important fixes this time.
      
         - The new percpu area allocator had a subtle bug in how it iterates
           the memory regions and could skip viable areas, which led to
           allocation failures for module static percpu variables. Dennis
           fixed the bug and another non-critical one in stat calculation.
      
         - Mark noticed that the generic implementations of percpu local
           atomic reads aren't properly protected against irqs and there's a
           (slim) chance for split reads on some 32bit systems. Generic
           implementations are updated to disable irq when read size is larger
           than ulong size. This may have made some 32bit archs which can do
           atomic local 64bit accesses generate sub-optimal code. We need to
           find them out and implement arch-specific overrides"
      
      * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
        percpu: fix iteration to prevent skipping over block
        percpu: fix starting offset for chunk statistics traversal
        percpu: make this_cpu_generic_read() atomic w.r.t. interrupts
      ff93026d
    • Linus Torvalds's avatar
      Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · c1de1591
      Linus Torvalds authored
      Pull libata fixes from Tejun Heo:
       "Nothing too interesting.
      
        Arnd's gcc-7 warning fixes that slipped through the cracks for two
        release cycles (my bad), and two minor low level driver updates"
      
      * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        ahci: don't ignore result code of ahci_reset_controller()
        ata_piix: Add Fujitsu-Siemens Lifebook S6120 to short cable IDs
        ata: avoid gcc-7 warning in ata_timing_quantize
      c1de1591
    • Linus Torvalds's avatar
      Merge tag 'usb-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 887c8ba7
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a number of USB fixes for 4.14-rc4 to resolved reported
        issues.
      
        There's a bunch of stuff in here based on the great work Andrey
        Konovalov is doing in fuzzing the USB stack. Lots of bug fixes when
        dealing with corrupted USB descriptors that we've never seen in
        "normal" operation, but is now ensuring the stack is much more
        hardened overall.
      
        There's also the usual XHCI and gadget driver fixes as well, and a
        build error fix, and a few other minor things, full details in the
        shortlog.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (38 commits)
        usb: dwc3: of-simple: Add compatible for Spreadtrum SC9860 platform
        usb: gadget: udc: atmel: set vbus irqflags explicitly
        usb: gadget: ffs: handle I/O completion in-order
        usb: renesas_usbhs: fix usbhsf_fifo_clear() for RX direction
        usb: renesas_usbhs: fix the BCLR setting condition for non-DCP pipe
        usb: gadget: udc: renesas_usb3: Fix return value of usb3_write_pipe()
        usb: gadget: udc: renesas_usb3: fix Pn_RAMMAP.Pn_MPKT value
        usb: gadget: udc: renesas_usb3: fix for no-data control transfer
        USB: dummy-hcd: Fix erroneous synchronization change
        USB: dummy-hcd: fix infinite-loop resubmission bug
        USB: dummy-hcd: fix connection failures (wrong speed)
        USB: cdc-wdm: ignore -EPIPE from GetEncapsulatedResponse
        USB: devio: Don't corrupt user memory
        USB: devio: Prevent integer overflow in proc_do_submiturb()
        USB: g_mass_storage: Fix deadlock when driver is unbound
        USB: gadgetfs: Fix crash caused by inadequate synchronization
        USB: gadgetfs: fix copy_to_user while holding spinlock
        USB: uas: fix bug in handling of alternate settings
        usb-storage: unusual_devs entry to fix write-access regression for Seagate external drives
        usb-storage: fix bogus hardware error messages for ATA pass-thru devices
        ...
      887c8ba7
    • Linus Torvalds's avatar
      Merge tag 'tty-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 27b3b160
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are a small number (5) of patches for some reported TTY and
        serial issues. Nothing major, a documentation update, timing fix,
        error handling fix, name reporting fix, and a timeout issue resolved.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: sccnxp: Fix error handling in sccnxp_probe()
        tty: serial: lpuart: avoid report NULL interrupt
        serial: bcm63xx: fix timing issue.
        mxser: fix timeout calculation for low rates
        serial: sh-sci: document R8A77970 bindings
      27b3b160
    • Linus Torvalds's avatar
      Merge tag 'staging-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 08bbc4fc
      Linus Torvalds authored
      Pull staging/IIO fixes from Greg KH:
       "Here are some small staging/IIO driver fixes for 4.14-rc4
      
        Most of these have been in my tree for a while due to travels, sorry
        for the delay. They resolve a number of small issues reported by
        people, mostly for the iio drivers. Nothing major in here, full
        details are in the shortlog.
      
        All have been linux-next for a few weeks with no reported issues"
      
      * tag 'staging-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (23 commits)
        staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack.
        iio: core: Return error for failed read_reg
        iio: ad7793: Fix the serial interface reset
        iio: ad_sigma_delta: Implement a dedicated reset function
        IIO: BME280: Updates to Humidity readings need ctrl_reg write!
        iio: adc: mcp320x: Fix readout of negative voltages
        iio: adc: mcp320x: Fix oops on module unload
        iio: adc: stm32: fix bad error check on max_channels
        iio: trigger: stm32-timer: fix a corner case to write preset
        iio: trigger: stm32-timer: preset shouldn't be buffered
        iio: adc: twl4030: Return an error if we can not enable the vusb3v1 regulator in 'twl4030_madc_probe()'
        iio: adc: twl4030: Disable the vusb3v1 rugulator in the error handling path of 'twl4030_madc_probe()'
        iio: adc: twl4030: Fix an error handling path in 'twl4030_madc_probe()'
        staging: rtl8723bs: avoid null pointer dereference on pmlmepriv
        staging: rtl8723bs: add missing range check on id
        staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist
        staging: speakup: fix speakup-r empty line lockup
        staging: pi433: Move limit check to switch default to kill warning
        staging: r8822be: fix null pointer dereferences with a null driver_adapter
        staging: mt29f_spinand: Enable the read ECC before program the page
        ...
      08bbc4fc
    • Linus Torvalds's avatar
      Merge tag 'driver-core-4.14-rc4' of... · c4142ed6
      Linus Torvalds authored
      Merge tag 'driver-core-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are a few small fixes for 4.14-rc4.
      
        The removal of DRIVER_ATTR() was almost completed by 4.14-rc1, but one
        straggler made it in through some other tree (odds are, one of
        mine...) So there's a simple removal of the last user, and then
        finally the macro is removed from the tree.
      
        There's a fix for old crazy udev instances that insist on reloading a
        module when it is removed from the kernel due to the new uevents for
        bind/unbind. This fixes the reported regression, hopefully some year
        in the future we can drop the workaround, once users update to the
        latest version, but I'm not holding my breath.
      
        And then there's a build fix for a linker warning, and a buffer
        overflow fix to match the PCI fixes you took through the PCI tree in
        the same area.
      
        All of these have been in linux-next for a few weeks while I've been
        traveling, sorry for the delay"
      
      * tag 'driver-core-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        driver core: remove DRIVER_ATTR
        fpga: altera-cvp: remove DRIVER_ATTR() usage
        driver core: platform: Don't read past the end of "driver_override" buffer
        base: arch_topology: fix section mismatch build warnings
        driver core: suppress sending MODALIAS in UNBIND uevents
      c4142ed6
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 3a98be09
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are a handful of char/misc driver fixes for 4.14-rc4.
      
        Nothing major, some binder fixups, hyperv fixes, and other tiny
        things.
      
        All of these have been sitting in my tree for way too long, sorry for
        the delay in getting them to you. All have been in linux-next for a
        few weeks, and despite some people's feeling about if linux-next
        actually tests things, I think it's a good "soak test" for patches"
      
      * tag 'char-misc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        Drivers: hv: fcopy: restore correct transfer length
        vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()
        intel_th: pci: Add Lewisburg PCH support
        intel_th: pci: Add Cedar Fork PCH support
        stm class: Fix a use-after-free
        nvmem: add missing of_node_put() in of_nvmem_cell_get()
        nvmem: core: return EFBIG on out-of-range write
        auxdisplay: charlcd: properly restore atomic counter on error path
        binder: fix memory corruption in binder_transaction binder
        binder: fix an ret value override
        android: binder: fix type mismatch warning
      3a98be09
  8. 02 Oct, 2017 1 commit
    • Ard Biesheuvel's avatar
      ahci: don't ignore result code of ahci_reset_controller() · d312fefe
      Ard Biesheuvel authored
      ahci_pci_reset_controller() calls ahci_reset_controller(), which may
      fail, but ignores the result code and always returns success. This
      may result in failures like below
      
        ahci 0000:02:00.0: version 3.0
        ahci 0000:02:00.0: enabling device (0000 -> 0003)
        ahci 0000:02:00.0: SSS flag set, parallel bus scan disabled
        ahci 0000:02:00.0: controller reset failed (0xffffffff)
        ahci 0000:02:00.0: failed to stop engine (-5)
          ... repeated many times ...
        ahci 0000:02:00.0: failed to stop engine (-5)
        Unable to handle kernel paging request at virtual address ffff0000093f9018
          ...
        PC is at ahci_stop_engine+0x5c/0xd8 [libahci]
        LR is at ahci_deinit_port.constprop.12+0x1c/0xc0 [libahci]
          ...
        [<ffff000000a17014>] ahci_stop_engine+0x5c/0xd8 [libahci]
        [<ffff000000a196b4>] ahci_deinit_port.constprop.12+0x1c/0xc0 [libahci]
        [<ffff000000a197d8>] ahci_init_controller+0x80/0x168 [libahci]
        [<ffff000000a260f8>] ahci_pci_init_controller+0x60/0x68 [ahci]
        [<ffff000000a26f94>] ahci_init_one+0x75c/0xd88 [ahci]
        [<ffff000008430324>] local_pci_probe+0x3c/0xb8
        [<ffff000008431728>] pci_device_probe+0x138/0x170
        [<ffff000008585e54>] driver_probe_device+0x2dc/0x458
        [<ffff0000085860e4>] __driver_attach+0x114/0x118
        [<ffff000008583ca8>] bus_for_each_dev+0x60/0xa0
        [<ffff000008585638>] driver_attach+0x20/0x28
        [<ffff0000085850b0>] bus_add_driver+0x1f0/0x2a8
        [<ffff000008586ae0>] driver_register+0x60/0xf8
        [<ffff00000842f9b4>] __pci_register_driver+0x3c/0x48
        [<ffff000000a3001c>] ahci_pci_driver_init+0x1c/0x1000 [ahci]
        [<ffff000008083918>] do_one_initcall+0x38/0x120
      
      where an obvious hardware level failure results in an unnecessary 15 second
      delay and a subsequent crash.
      
      So record the result code of ahci_reset_controller() and relay it, rather
      than ignoring it.
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      d312fefe