1. 03 Dec, 2015 2 commits
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · c041f087
      Linus Torvalds authored
      Pull tracing fix from Steven Rostedt:
       "During the merge window I added a new file that is used to filter
        trace events on pids.  It filters all events where only tasks with
        their pid in that file exists.  It also handles the sched_switch and
        sched_wakeup trace events where the current task does not have its pid
        in the file, but the task either being switched to or awaken does.
      
        Unfortunately, I forgot about sched_wakeup_new and sched_waking.  Both
        of these tracepoints use the same class as the sched_wakeup
        tracepoint, and they too should be included in what gets filtered by
        the set_event_pid file"
      
      * tag 'trace-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Add sched_wakeup_new and sched_waking tracepoints for pid filter
      c041f087
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · e69be8c2
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "There's one fix for the core here, we weren't reinitialising the
        actual transferred length in messages when they get reused which meant
        that we'd just keep adding to the length if a message is reused.  This
        has limited impact since it's only used in error handling cases but
        will really mess anything that tries to use it up when it triggers.
      
        As ever there's a small collection of driver specific fixes too"
      
      * tag 'spi-fix-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: bugfix: spi_message.transfer_length does not get reset
        spi: pl022: handle EPROBE_DEFER for dma
        spi: bcm63xx: use correct format string for printing a resource
        spi: mediatek: single device does not require cs_gpios
        spi: Add missing kerneldoc description for parameter
      e69be8c2
  2. 02 Dec, 2015 4 commits
  3. 01 Dec, 2015 4 commits
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Add sched_wakeup_new and sched_waking tracepoints for pid filter · 0f72e37e
      Steven Rostedt (Red Hat) authored
      The set_event_pid filter relies on attaching to the sched_switch and
      sched_wakeup tracepoints to see if it should filter the tracing on schedule
      tracepoints. By adding the callbacks to sched_wakeup, pids in the
      set_event_pid file will trace the wakeups of those tasks with those pids.
      
      But sched_wakeup_new and sched_waking were missed. These two should also be
      traced. Luckily, these tracepoints share the same class as sched_wakeup
      which means they can use the same pre and post callbacks as sched_wakeup
      does.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      0f72e37e
    • Linus Torvalds's avatar
      Merge tag 'remoteproc-4.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc · 6a24e72d
      Linus Torvalds authored
      Pull remoteproc fixes from Ohad Ben-Cohen:
       "Two one-liners coming from Suman and Arnd"
      
      * tag 'remoteproc-4.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
        remoteproc: fix memory leak of remoteproc ida cache layers
        remoteproc: avoid stack overflow in debugfs file
      6a24e72d
    • Geert Uytterhoeven's avatar
      pinctrl: sh-pfc: sh7734: Add missing cfg macro parameter to fix build · 48111b79
      Geert Uytterhoeven authored
      When building for SH7734:
      
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:586:1: error: macro "_GP_DATA" passed 5 arguments, but takes just 4
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:586:2: error: '_GP_DATA' undeclared here (not in a function)
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:586:1: error: macro "_GP_DATA" passed 5 arguments, but takes just 4
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:586:1: error: macro "_GP_DATA" passed 5 arguments, but takes just 4
          ...
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2389:1: error: macro "_GP_INOUTSEL" passed 5 arguments, but takes just 4
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2389:53: error: '_GP_INOUTSEL' undeclared here (not in a function)
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2389:2: warning: initialization makes integer from pointer without a cast [enabled by default]
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2389:2: warning: (near initialization for '(anonymous)[0]') [enabled by default]
          ...
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2416:1: error: macro "_GP_INDT" passed 5 arguments, but takes just 4
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2416:47: error: '_GP_INDT' undeclared here (not in a function)
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2416:2: warning: initialization makes integer from pointer without a cast [enabled by default]
          drivers/pinctrl/sh-pfc/pfc-sh7734.c:2416:2: warning: (near initialization for '(anonymous)[0]') [enabled by default]
          ...
      
      Add the missing "cfg" macro parameters to the sh7734-specific
      _GP_DATA(), _GP_INOUTSEL(), and _GP_INDT() macros to fix this.
      
      Fixes: 22768fc6 ("pinctrl: sh-pfc: Add macros defining GP ports with config flags")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      48111b79
    • Linus Torvalds's avatar
      Merge tag 'mn10300-for-linus-v4.4-rc4' of... · 2255702d
      Linus Torvalds authored
      Merge tag 'mn10300-for-linus-v4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull mn10300 fix from Guenter Roeck:
       "A single patch to fix mn10300 build failures"
      
      * tag 'mn10300-for-linus-v4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        mn10300: Select CONFIG_HAVE_UID16 to fix build failure
      2255702d
  4. 30 Nov, 2015 11 commits
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 9e5d25e8
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "I found two minor bugs while doing development on the ring buffer
        code.
      
        The first is something that's been there since its creation.  If a
        reader reads a page out of the ring buffer before there's any events
        on it, it can get an out of date timestamp for that event.  It may be
        off by a few microseconds, more if the first event gets discarded.
        The fix was to only update the reader time stamp when it actually sees
        an event on the page, instead of just reading the timestamp from the
        page even if it has no events on it.  That timestamp is still volatile
        until an event is present.
      
        The second bug is more recent.  Instead of passing around parameters a
        descriptor was made and the parameters are passed via a single
        descriptor.  This simplified the code a bit.  But there was one place
        that expected the parameter to be passed by value not reference (which
        a descriptor now does).  And it added to the length of the event,
        which may be ignored later, but the length should not have been
        increased.  The only real problem with this bug is that it may
        allocate more than was needed for the event"
      
      * tag 'trace-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ring-buffer: Put back the length if crossed page with add_timestamp
        ring-buffer: Update read stamp with first real commit on page
      9e5d25e8
    • Guenter Roeck's avatar
      mn10300: Select CONFIG_HAVE_UID16 to fix build failure · c86576ea
      Guenter Roeck authored
      mn10300 builds fail with
      
      fs/stat.c: In function 'cp_old_stat':
      fs/stat.c:163:2: error: 'old_uid_t' undeclared
      
      ipc/util.c: In function 'ipc64_perm_to_ipc_perm':
      ipc/util.c:540:2: error: 'old_uid_t' undeclared
      
      Select CONFIG_HAVE_UID16 and remove local definition of CONFIG_UID16
      to fix the problem.
      
      Fixes: fbc416ff ("arm64: fix building without CONFIG_UID16")
      Cc: Arnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarAcked-by: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      c86576ea
    • Grygorii Strashko's avatar
      gpio: omap: drop omap1 mpuio specific irq_mask/unmask callbacks · 000255b7
      Grygorii Strashko authored
      Originally OMAP MPUIO GPIO irqchip was implemented using Generic irq
      chip, but after set of reworks Generic irq chip code was replaced by
      common OMAP GPIO implementation and finally removed by
      commit d2d05c65 ("gpio: omap: Fix regression for MPUIO interrupts").
      Unfortunately, above commit left .irq_mask/unmask callbacks assigned
      as below for MPUIO GPIO case:
      	irqc->irq_mask = irq_gc_mask_set_bit;
      	irqc->irq_unmask = irq_gc_mask_clr_bit;
      
      This now causes boot failure on OMAP1 platforms, after
      commit 450fa54c ("gpio: omap: convert to use generic irq handler")
      which forces these callbacks to be called during GPIO IRQs mapping
      from gpiochip_irq_map:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: Oops: 75 [#1] ARM
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-rc1-e3-los_afe0c+-00002-g25379c0-dirty #1
      Hardware name: Amstrad E3 (Delta)
      task: c1836000 ti: c1838000 task.ti: c1838000
      PC is at irq_gc_mask_set_bit+0x1c/0x60
      LR is at __irq_do_set_handler+0x118/0x15c
      pc : [<c004848c>]    lr : [<c0047d4c>]    psr: 600000d3
      sp : c1839c90  ip : c1862c64  fp : c1839c9c
      r10: 00000000  r9 : c0411950  r8 : c0411bbc
      r7 : 00000000  r6 : c185c310  r5 : c00444e8  r4 : c185c300
      r3 : c1854b50  r2 : 00000000  r1 : 00000000  r0 : c185c310
      Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
      Control: 0000317f  Table: 10004000  DAC: 00000057
      Process swapper (pid: 1, stack limit = 0xc1838190)
      Stack: (0xc1839c90 to 0xc183a000)
      
      [...]
      
      Backtrace:
      [<c0048470>] (irq_gc_mask_set_bit) from [<c0047d4c>] (__irq_do_set_handler+0x118/0x15c)
      [<c0047c34>] (__irq_do_set_handler) from [<c0047dd4>] (__irq_set_handler+0x44/0x5c)
       r6:00000000 r5:c00444e8 r4:c185c300
      [<c0047d90>] (__irq_set_handler) from [<c0047e1c>] (irq_set_chip_and_handler_name+0x30/0x34)
       r7:00000050 r6:00000000 r5:c00444e8 r4:00000050
      [<c0047dec>] (irq_set_chip_and_handler_name) from [<c01b345c>] (gpiochip_irq_map+0x3c/0x8c)
       r7:00000050 r6:00000000 r5:00000050 r4:c1862c64
      [<c01b3420>] (gpiochip_irq_map) from [<c0049670>] (irq_domain_associate+0x7c/0x1c4)
       r5:c185c310 r4:c185cb00
      [<c00495f4>] (irq_domain_associate) from [<c0049894>] (irq_domain_add_simple+0x98/0xc0)
       r8:c0411bbc r7:c185cb00 r6:00000050 r5:00000010 r4:00000001
      [<c00497fc>] (irq_domain_add_simple) from [<c01b3328>] (_gpiochip_irqchip_add+0x64/0x10c)
       r7:c1862c64 r6:c0419280 r5:c1862c64 r4:c1854b50
      [<c01b32c4>] (_gpiochip_irqchip_add) from [<c01b79f4>] (omap_gpio_probe+0x2fc/0x63c)
       r5:c1854b50 r4:c1862c10
      [<c01b76f8>] (omap_gpio_probe) from [<c01fcf58>] (platform_drv_probe+0x2c/0x64)
       r10:00000000 r9:c03e45e8 r8:00000000 r7:c0419294 r6:c0411984 r5:c0419294
       r4:c0411950
      [<c01fcf2c>] (platform_drv_probe) from [<c01fb668>] (really_probe+0x160/0x29c)
      
      Hence, fix it by remove obsolete callbacks assignment. After this
      change 	omap_gpio_mask_irq()/omap_gpio_unmask_irq() will be used
      for MPUIO IRQs masking, but this now happens anyway from
      omap_gpio_irq_startup/shutdown().
      
      Cc: Tony Lindgren <tony@atomide.com>
      Fixes: commit d2d05c65 ("gpio: omap: Fix regression for MPUIO interrupts")
      Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Acked-by: default avatarSantosh Shilimkar <ssantosh@kernel.org>
      Tested-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      000255b7
    • Mark Brown's avatar
      Merge remote-tracking branches 'spi/fix/bcm63xx', 'spi/fix/doc',... · a057d737
      Mark Brown authored
      Merge remote-tracking branches 'spi/fix/bcm63xx', 'spi/fix/doc', 'spi/fix/mediatek' and 'spi/fix/pl022' into spi-linus
      a057d737
    • Mark Brown's avatar
      9f28b3c6
    • Linus Torvalds's avatar
      Linux 4.4-rc3 · 31ade3b8
      Linus Torvalds authored
      31ade3b8
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · c5bc1c93
      Linus Torvalds authored
      Pull nouveau and radeon fixes from Dave Airlie:
       "Just some nouveau and radeon/amdgpu fixes.
      
        The nouveau fixes look large as the firmware context files are
        regenerated, but the actual change is quite small"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon: make some dpm errors debug only
        drm/nouveau/volt/pwm/gk104: fix an off-by-one resulting in the voltage not being set
        drm/nouveau/nvif: allow userspace access to its own client object
        drm/nouveau/gr/gf100-: fix oops when calling zbc methods
        drm/nouveau/gr/gf117-: assume no PPC if NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK is zero
        drm/nouveau/gr/gf117-: read NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK from correct GPC
        drm/nouveau/gr/gf100-: split out per-gpc address calculation macro
        drm/nouveau/bios: return actual size of the buffer retrieved via _ROM
        drm/nouveau/instmem: protect instobj list with a spinlock
        drm/nouveau/pci: enable c800 magic for some unknown Samsung laptop
        drm/nouveau/pci: enable c800 magic for Clevo P157SM
        drm/radeon: make rv770_set_sw_state failures non-fatal
        drm/amdgpu: move dependency handling out of atomic section v2
        drm/amdgpu: optimize scheduler fence handling
        drm/amdgpu: remove vm->mutex
        drm/amdgpu: add mutex for ba_va->valids/invalids
        drm/amdgpu: adapt vce session create interface changes
        drm/amdgpu: vce use multiple cache surface starting from stoney
        drm/amdgpu: reset vce trap interrupt flag
      c5bc1c93
    • Linus Torvalds's avatar
      Merge tag 'rtc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 818aba30
      Linus Torvalds authored
      Pull RTC fixes from Alexandre Belloni:
       "Two fixes for the ds1307 alarm and wakeup"
      
      * tag 'rtc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
        rtc: ds1307: fix alarm reading at probe time
        rtc: ds1307: fix kernel splat due to wakeup irq handling
      818aba30
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 00fd6a71
      Linus Torvalds authored
      Pull MIPS fix from Ralf Baechle:
       "Just a fix for empty loops that may be removed by non-antique GCC"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Fix delay loops which may be removed by GCC.
      00fd6a71
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · d72aee78
      Linus Torvalds authored
      Pull m68k fixes from Geert Uytterhoeven:
       "Summary:
      
         - Add missing initialization of max_pfn, which is needed to make
           selftests/vm/mlock2-tests succeed,
      
         - Wire up new mlock2 syscall"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: Wire up mlock2
        m68knommu: Add missing initialization of max_pfn and {min,max}_low_pfn
        m68k/mm: sun3 - Add missing initialization of max_pfn and {min,max}_low_pfn
        m68k/mm: m54xx - Add missing initialization of max_pfn
        m68k/mm: motorola - Add missing initialization of max_pfn
      d72aee78
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 04527fda
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Just two changes this time around:
      
         - wire up the new mlock2 syscall added during the last merge window
      
         - fix a build problem with certain configurations provoked by making
           CONFIG_OF user selectable"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8454/1: OF implies OF_FLATTREE
        ARM: wire up mlock2 syscall
      04527fda
  5. 29 Nov, 2015 13 commits
    • Vladimir Zapolskiy's avatar
      gpiolib: fix oops, if gpio name is NULL · d06165b3
      Vladimir Zapolskiy authored
      Commit c0017ed7 ("gpio: Introduce gpio descriptor 'name'") causes
      OOPS on boot on LPC32xx boards:
      
          Unable to handle kernel NULL pointer dereference at virtual address 00000000
          CPU: 0 PID: 1 Comm: swapper Not tainted 4.3.0+ #707
          Hardware name: LPC32XX SoC (Flattened Device Tree)
          task: c381baa0 ti: c381e000 task.ti: c381e000
          PC is at strcmp+0x10/0x40
          LR is at gpiochip_add+0x3d0/0x4d4
          pc : [<>]    lr : [<>]    psr: a0000093
          sp : c381fd60  ip : c381fd70  fp : c381fd6c
      
          [snip]
      
          Backtrace:
          [<>] (strcmp) from [<>] (gpiochip_add+0x3d0/0x4d4)
          [<>] (gpiochip_add) from [<>] (lpc32xx_gpio_probe+0x44/0x60)
          [<>] (lpc32xx_gpio_probe) from [<>] (platform_drv_probe+0x40/0x8c)
          [<>] (platform_drv_probe) from [<>] (driver_probe_device+0x110/0x294)
          [<>] (driver_probe_device) from [<>] (__driver_attach+0x70/0x94)
          [<>] (__driver_attach) from [<>] (bus_for_each_dev+0x74/0x98)
          [<>] (bus_for_each_dev) from [<>] (driver_attach+0x20/0x28)
          [<>] (driver_attach) from [<>] (bus_add_driver+0xd4/0x1f0)
          [<>] (bus_add_driver) from [<>] (driver_register+0xa4/0xe8)
          [<>] (driver_register) from [<>] (__platform_driver_register+0x38/0x4c)
          [<>] (__platform_driver_register) from [<>] (lpc32xx_gpio_driver_init+0x18/0x20)
          [<>] (lpc32xx_gpio_driver_init) from [<>] (do_one_initcall+0x108/0x1c8)
          [<>] (do_one_initcall) from [<>] (kernel_init_freeable+0x10c/0x1d4)
          [<>] (kernel_init_freeable) from [<>] (kernel_init+0x10/0xec)
          [<>] (kernel_init) from [<>] (ret_from_fork+0x14/0x24)
      
      This is caused by the fact that at the moment some GPIO names are set
      to NULL, there is a hole in linear representation of one GPI bank, see
      drivers/gpio/gpio-lpc32xx.c / gpi_p3_names[] for details.
      
      The same problem most probably affects also gpio-cs5535.c, see
      cs5535_gpio_names[].
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      d06165b3
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 36511e86
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       - fix tcm-user backend driver expired cmd time processing (agrover)
       - eliminate kref_put_spinlock_irqsave() for I/O completion (bart)
       - fix iscsi login kthread failure case hung task regression (nab)
       - fix COMPARE_AND_WRITE completion use-after-free race (nab)
       - fix COMPARE_AND_WRITE with SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC non zero
         SGL offset data corruption.  (Jan + Doug)
       - fix >= v4.4-rc1 regression for tcm_qla2xxx enable configfs attribute
         (Himanshu + HCH)
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target/stat: print full t10_wwn.model buffer
        target: fix COMPARE_AND_WRITE non zero SGL offset data corruption
        qla2xxx: Fix regression introduced by target configFS changes
        kref: Remove kref_put_spinlock_irqsave()
        target: Invoke release_cmd() callback without holding a spinlock
        target: Fix race for SCF_COMPARE_AND_WRITE_POST checking
        iscsi-target: Fix rx_login_comp hang after login failure
        iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc()
        target/user: Do not set unused fields in tcmu_ops
        target/user: Fix time calc in expired cmd processing
      36511e86
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 75a29ec1
      Linus Torvalds authored
      Pull thermal management fixes from Zhang Rui:
       "Specifics:
      
       - several fixes and cleanups on Rockchip thermal drivers.
      
       - add the missing support of RK3368 SoCs in Rockchip driver.
      
       - small fixes on of-thermal, power_allocator, rcar driver, IMX, and
         QCOM drivers, and also compilation fixes, on thermal.h, when thermal
         is not selected"
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        imx: thermal: use CPU temperature grade info for thresholds
        thermal: fix thermal_zone_bind_cooling_device prototype
        Revert "thermal: qcom_spmi: allow compile test"
        thermal: rcar_thermal: remove redundant operation
        thermal: of-thermal: Reduce log level for message when can't fine thermal zone
        thermal: power_allocator: Use temperature reading from tz
        thermal: rockchip: Support the RK3368 SoCs in thermal driver
        thermal: rockchip: consistently use int for temperatures
        thermal: rockchip: Add the sort mode for adc value increment or decrement
        thermal: rockchip: improve the conversion function
        thermal: rockchip: trivial: fix typo in commit
        thermal: rockchip: better to compatible the driver for different SoCs
        dt-bindings: rockchip-thermal: Support the RK3368 SoCs compatible
      75a29ec1
    • David Disseldorp's avatar
      target/stat: print full t10_wwn.model buffer · 8f903539
      David Disseldorp authored
      Cut 'n paste error saw it only process sizeof(t10_wwn.vendor) characters.
      Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      8f903539
    • Jan Engelhardt's avatar
      target: fix COMPARE_AND_WRITE non zero SGL offset data corruption · d94e5a61
      Jan Engelhardt authored
      target_core_sbc's compare_and_write functionality suffers from taking
      data at the wrong memory location when writing a CAW request to disk
      when a SGL offset is non-zero.
      
      This can happen with loopback and vhost-scsi fabric drivers when
      SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC is used to map existing user-space
      SGL memory into COMPARE_AND_WRITE READ/WRITE payload buffers.
      
      Given the following sample LIO subtopology,
      
      % targetcli ls /loopback/
      o- loopback ................................. [1 Target]
        o- naa.6001405ebb8df14a ....... [naa.60014059143ed2b3]
          o- luns ................................... [2 LUNs]
            o- lun0 ................ [iblock/ram0 (/dev/ram0)]
            o- lun1 ................ [iblock/ram1 (/dev/ram1)]
      % lsscsi -g
      [3:0:1:0]    disk    LIO-ORG  IBLOCK           4.0   /dev/sdc   /dev/sg3
      [3:0:1:1]    disk    LIO-ORG  IBLOCK           4.0   /dev/sdd   /dev/sg4
      
      the following bug can be observed in Linux 4.3 and 4.4~rc1:
      
      % perl -e 'print chr$_ for 0..255,reverse 0..255' >rand
      % perl -e 'print "\0" x 512' >zero
      % cat rand >/dev/sdd
      % sg_compare_and_write -i rand -D zero --lba 0 /dev/sdd
      % sg_compare_and_write -i zero -D rand --lba 0 /dev/sdd
      Miscompare reported
      % hexdump -Cn 512 /dev/sdd
      00000000  0f 0e 0d 0c 0b 0a 09 08  07 06 05 04 03 02 01 00
      00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
      *
      00000200
      
      Rather than writing all-zeroes as instructed with the -D file, it
      corrupts the data in the sector by splicing some of the original
      bytes in. The page of the first entry of cmd->t_data_sg includes the
      CDB, and sg->offset is set to a position past the CDB. I presume that
      sg->offset is also the right choice to use for subsequent sglist
      members.
      Signed-off-by: default avatarJan Engelhardt <jengelh@netitwork.de>
      Tested-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
      Cc: <stable@vger.kernel.org> # v3.12+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      d94e5a61
    • Himanshu Madhani's avatar
      qla2xxx: Fix regression introduced by target configFS changes · 3786dc45
      Himanshu Madhani authored
      this patch fixes following regression
      
       # targetcli
       [Errno 13] Permission denied: '/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/enable'
      
      Fixes: 2eafd729 ("target: use per-attribute show and store methods")
      Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
      Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      3786dc45
    • Bart Van Assche's avatar
      kref: Remove kref_put_spinlock_irqsave() · 3a66d7dc
      Bart Van Assche authored
      The last user is gone. Hence remove this function.
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      3a66d7dc
    • Bart Van Assche's avatar
      target: Invoke release_cmd() callback without holding a spinlock · 9ff9d15e
      Bart Van Assche authored
      This patch fixes the following kernel warning because it avoids that
      IRQs are disabled while ft_release_cmd() is invoked (fc_seq_set_resp()
      invokes spin_unlock_bh()):
      
      WARNING: CPU: 3 PID: 117 at kernel/softirq.c:150 __local_bh_enable_ip+0xaa/0x110()
      Call Trace:
       [<ffffffff814f71eb>] dump_stack+0x4f/0x7b
       [<ffffffff8105e56a>] warn_slowpath_common+0x8a/0xc0
       [<ffffffff8105e65a>] warn_slowpath_null+0x1a/0x20
       [<ffffffff81062b2a>] __local_bh_enable_ip+0xaa/0x110
       [<ffffffff814ff229>] _raw_spin_unlock_bh+0x39/0x40
       [<ffffffffa03a7f94>] fc_seq_set_resp+0xe4/0x100 [libfc]
       [<ffffffffa02e604a>] ft_free_cmd+0x4a/0x90 [tcm_fc]
       [<ffffffffa02e6972>] ft_release_cmd+0x12/0x20 [tcm_fc]
       [<ffffffffa042bd66>] target_release_cmd_kref+0x56/0x90 [target_core_mod]
       [<ffffffffa042caf0>] target_put_sess_cmd+0xc0/0x110 [target_core_mod]
       [<ffffffffa042cb81>] transport_release_cmd+0x41/0x70 [target_core_mod]
       [<ffffffffa042d975>] transport_generic_free_cmd+0x35/0x420 [target_core_mod]
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: default avatarJoern Engel <joern@logfs.org>
      Reviewed-by: default avatarAndy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      9ff9d15e
    • Nicholas Bellinger's avatar
      target: Fix race for SCF_COMPARE_AND_WRITE_POST checking · 057085e5
      Nicholas Bellinger authored
      This patch addresses a race + use after free where the first
      stage of COMPARE_AND_WRITE in compare_and_write_callback()
      is rescheduled after the backend sends the secondary WRITE,
      resulting in second stage compare_and_write_post() callback
      completing in target_complete_ok_work() before the first
      can return.
      
      Because current code depends on checking se_cmd->se_cmd_flags
      after return from se_cmd->transport_complete_callback(),
      this results in first stage having SCF_COMPARE_AND_WRITE_POST
      set, which incorrectly falls through into second stage CAW
      processing code, eventually triggering a NULL pointer
      dereference due to use after free.
      
      To address this bug, pass in a new *post_ret parameter into
      se_cmd->transport_complete_callback(), and depend upon this
      value instead of ->se_cmd_flags to determine when to return
      or fall through into ->queue_status() code for CAW.
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: <stable@vger.kernel.org> # v3.12+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      057085e5
    • Nicholas Bellinger's avatar
      iscsi-target: Fix rx_login_comp hang after login failure · ca82c2bd
      Nicholas Bellinger authored
      This patch addresses a case where iscsi_target_do_tx_login_io()
      fails sending the last login response PDU, after the RX/TX
      threads have already been started.
      
      The case centers around iscsi_target_rx_thread() not invoking
      allow_signal(SIGINT) before the send_sig(SIGINT, ...) occurs
      from the failure path, resulting in RX thread hanging
      indefinately on iscsi_conn->rx_login_comp.
      
      Note this bug is a regression introduced by:
      
        commit e5419865
        Author: Nicholas Bellinger <nab@linux-iscsi.org>
        Date:   Wed Jul 22 23:14:19 2015 -0700
      
            iscsi-target: Fix iscsit_start_kthreads failure OOPs
      
      To address this bug, complete ->rx_login_complete for good
      measure in the failure path, and immediately return from
      RX thread context if connection state did not actually reach
      full feature phase (TARG_CONN_STATE_LOGGED_IN).
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: <stable@vger.kernel.org> # v3.10+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      ca82c2bd
    • Luis de Bethencourt's avatar
      iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc() · 82a819e8
      Luis de Bethencourt authored
      Smatch complains about returning hard coded error codes, silence this
      warning.
      
      drivers/target/iscsi/iscsi_target_parameters.c:211
         iscsi_create_default_params() warn: returning -1 instead of -ENOMEM is sloppy
      Signed-off-by: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
      Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      82a819e8
    • Andy Grover's avatar
      target/user: Do not set unused fields in tcmu_ops · 6ba4bd29
      Andy Grover authored
      TCMU sets TRANSPORT_FLAG_PASSTHROUGH, so INQUIRY commands will not be
      emulated by LIO but passed up to userspace. Therefore TCMU should not
      set these, just like pscsi doesn't.
      Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      6ba4bd29
    • Andy Grover's avatar
      target/user: Fix time calc in expired cmd processing · 611e2267
      Andy Grover authored
      Reversed arguments meant that we were doing nothing for cmds whose deadline
      had passed.
      Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      611e2267
  6. 28 Nov, 2015 3 commits
    • Arnd Bergmann's avatar
      ARM: 8454/1: OF implies OF_FLATTREE · aa7d5f18
      Arnd Bergmann authored
      On the ARM architecture, individual platforms select CONFIG_USE_OF if they
      need it, but all device tree code is keyed off CONFIG_OF. When building
      a platform without DT support and manually enabling CONFIG_OF, we now
      get a number of build errors, e.g.
      
      arch/arm/kernel/devtree.c: In function 'setup_machine_fdt':
      arch/arm/kernel/devtree.c:215:19: error: implicit declaration of function 'early_init_dt_verify' [-Werror=implicit-function-declaration]
      
      We could now try to separate the use case of booting from DT vs. the
      case of using the dynamic implementation, but that seems more complicated
      than it can gain us.
      
      This simply changes the ARM Kconfig file to always enable OF_RESERVED_MEM
      and OF_EARLY_FLATTREE when CONFIG_OF is enabled. These options add a little
      extra code when we just want the dynamic OF implementation, but that seems
      like a rather obscure case, and this version solves all CONFIG_OF related
      randconfig regressions.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 0166dc11 ("of: make CONFIG_OF user selectable")
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      aa7d5f18
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 081f3698
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "Here are a few fixes I'd like to have in v4.4: a generic one for sysfs
        and three for HiSilicon and DesignWare host controllers.
      
        Summary:
      
        NUMA:
         - Prevent out of bounds access in numa_node override (Mathias Krause)
      
        HiSilicon host bridge driver:
         - Fix deferred probing (Arnd Bergmann)
      
        Synopsys DesignWare host bridge driver:
         - Remove incorrect io_base assignment (Stanimir Varbanov)
         - Move align_resource function pointer to pci_host_bridge structure
           (Gabriele Paoloni)"
      
      * tag 'pci-v4.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        ARM/PCI: Move align_resource function pointer to pci_host_bridge structure
        PCI: hisi: Fix deferred probing
        PCI: designware: Remove incorrect io_base assignment
        PCI: Prevent out of bounds access in numa_node override
      081f3698
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.4-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 8003a573
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Stable patches:
         - Fix a NFSv4 callback identifier leak that was also causing client
           crashes
         - Fix NFSv4 callback decoding issues when incoming requests are
           truncated
         - Don't declare the attribute cache valid when we call
           nfs_update_inode with an empty attribute structure.
         - Resend LAYOUTGET when there is a race that changes the seqid
      
        Bugfixes:
         - Fix a number of issues with the NFSv4.2 CLONE ioctl()
         - Properly set NFS v4.2 NFSDBG_FACILITY
         - NFSv4 referrals are broken; Cleanup FATTR4_WORD0_FS_LOCATIONS after
           decoding success
         - Use sliding delay when LAYOUTGET gets NFS4ERR_DELAY
         - Ensure that attrcache is revalidated after a SETATTR"
      
      * tag 'nfs-for-4.4-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        nfs4: resend LAYOUTGET when there is a race that changes the seqid
        nfs: if we have no valid attrs, then don't declare the attribute cache valid
        nfs: ensure that attrcache is revalidated after a SETATTR
        nfs4: limit callback decoding to received bytes
        nfs4: start callback_ident at idr 1
        nfs: use sliding delay when LAYOUTGET gets NFS4ERR_DELAY
        NFS4: Cleanup FATTR4_WORD0_FS_LOCATIONS after decoding success
        NFS: Properly set NFS v4.2 NFSDBG_FACILITY
        nfs: reduce the amount of ifdefs for v4.2 in nfs4file.c
        nfs: use btrfs ioctl defintions for clone
        nfs: allow intra-file CLONE
        nfs: offer native ioctls even if CONFIG_COMPAT is set
        nfs: pass on count for CLONE operations
      8003a573
  7. 27 Nov, 2015 3 commits
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · d0bc387d
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
       - a null pointer dereference fix for omap_wdt
       - some clock related fixes for pnx4008
       - an underflow fix in wdt_set_timeout() for w83977f_wdt
       - restart fix for tegra wdt
       - Kconfig change to support Freescale Layerscape platforms
       - fix for stopping the mtk_wdt watchdog
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog
        watchdog: Add support for Freescale Layerscape platforms
        watchdog: tegra: Stop watchdog first if restarting
        watchdog: w83977f_wdt: underflow in wdt_set_timeout()
        watchdog: pnx4008: make global wdt_clk static
        watchdog: pnx4008: fix warnings caused by enabling unprepared clock
        watchdog: omap_wdt: fix null pointer dereference
      d0bc387d
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 80e0c505
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "This has Mark Fasheh's patches to fix quota accounting during subvol
        deletion, which we've been working on for a while now.  The patch is
        pretty small but it's a key fix.
      
        Otherwise it's a random assortment"
      
      * 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        btrfs: fix balance range usage filters in 4.4-rc
        btrfs: qgroup: account shared subtree during snapshot delete
        Btrfs: use btrfs_get_fs_root in resolve_indirect_ref
        btrfs: qgroup: fix quota disable during rescan
        Btrfs: fix race between cleaner kthread and space cache writeout
        Btrfs: fix scrub preventing unused block groups from being deleted
        Btrfs: fix race between scrub and block group deletion
        btrfs: fix rcu warning during device replace
        btrfs: Continue replace when set_block_ro failed
        btrfs: fix clashing number of the enhanced balance usage filter
        Btrfs: fix the number of transaction units needed to remove a block group
        Btrfs: use global reserve when deleting unused block group after ENOSPC
        Btrfs: tests: checking for NULL instead of IS_ERR()
        btrfs: fix signed overflows in btrfs_sync_file
      80e0c505
    • Linus Torvalds's avatar
      Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 7e4b9359
      Linus Torvalds authored
      Pull security layer fixes from James Morris:
       "A fix for SELinux policy processing (regression introduced by
        commit fa1aa143: "selinux: extended permissions for ioctls"), as
        well as a fix for the user-triggerable oops in the Keys code"
      
      * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        KEYS: Fix handling of stored error in a negatively instantiated user key
        selinux: fix bug in conditional rules handling
      7e4b9359