1. 21 2月, 2018 1 次提交
  2. 20 2月, 2018 11 次提交
  3. 17 2月, 2018 14 次提交
  4. 16 2月, 2018 12 次提交
    • N
      dm: correctly handle chained bios in dec_pending() · 8dd601fa
      NeilBrown 提交于
      dec_pending() is given an error status (possibly 0) to be recorded
      against a bio.  It can be called several times on the one 'struct
      dm_io', and it is careful to only assign a non-zero error to
      io->status.  However when it then assigned io->status to bio->bi_status,
      it is not careful and could overwrite a genuine error status with 0.
      
      This can happen when chained bios are in use.  If a bio is chained
      beneath the bio that this dm_io is handling, the child bio might
      complete and set bio->bi_status before the dm_io completes.
      
      This has been possible since chained bios were introduced in 3.14, and
      has become a lot easier to trigger with commit 18a25da8 ("dm: ensure
      bio submission follows a depth-first tree walk") as that commit caused
      dm to start using chained bios itself.
      
      A particular failure mode is that if a bio spans an 'error' target and a
      working target, the 'error' fragment will complete instantly and set the
      ->bi_status, and the other fragment will normally complete a little
      later, and will clear ->bi_status.
      
      The fix is simply to only assign io_error to bio->bi_status when
      io_error is not zero.
      Reported-and-tested-by: NMilan Broz <gmazyland@gmail.com>
      Cc: stable@vger.kernel.org (v3.14+)
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      8dd601fa
    • J
      irqchip/bcm: Remove hashed address printing · 2d02424e
      Jaedon Shin 提交于
      Since commit ad67b74d ("printk: hash addresses printed with %p")
      pointers are being hashed when printed. Displaying the virtual memory at
      bootup time is not helpful. so delete the prints.
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NJaedon Shin <jaedon.shin@gmail.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      2d02424e
    • M
      irqchip/gic-v2m: Add PCI Multi-MSI support · de337ee3
      Marc Zyngier 提交于
      We'd never implemented Multi-MSI support with GICv2m, because
      it is weird and clunky, and you'd think people would rather use
      MSI-X.
      
      Turns out there is still plenty of devices out there that rely
      on Multi-MSI. Oh well, let's teach that trick to the v2m widget,
      it is not a big deal anyway.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      de337ee3
    • S
      irqchip/gic-v3: Ignore disabled ITS nodes · 95a25625
      Stephen Boyd 提交于
      On some platforms there's an ITS available but it's not enabled
      because reading or writing the registers is denied by the
      firmware. In fact, reading or writing them will cause the system
      to reset. We could remove the node from DT in such a case, but
      it's better to skip nodes that are marked as "disabled" in DT so
      that we can describe the hardware that exists and use the status
      property to indicate how the firmware has configured things.
      
      Cc: Stuart Yoder <stuyoder@gmail.com>
      Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Rajendra Nayak <rnayak@codeaurora.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      95a25625
    • S
      irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq() · 21ec30c0
      Shanker Donthineni 提交于
      A DMB instruction can be used to ensure the relative order of only
      memory accesses before and after the barrier. Since writes to system
      registers are not memory operations, barrier DMB is not sufficient
      for observability of memory accesses that occur before ICC_SGI1R_EL1
      writes.
      
      A DSB instruction ensures that no instructions that appear in program
      order after the DSB instruction, can execute until the DSB instruction
      has completed.
      
      Cc: stable@vger.kernel.org
      Acked-by: Will Deacon <will.deacon@arm.com>,
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      21ec30c0
    • M
      irqchip/gic-v3: Change pr_debug message to pr_devel · b6dd4d83
      Mark Salter 提交于
      The pr_debug() in gic-v3 gic_send_sgi() can trigger a circular locking
      warning:
      
       GICv3: CPU10: ICC_SGI1R_EL1 5000400
       ======================================================
       WARNING: possible circular locking dependency detected
       4.15.0+ #1 Tainted: G        W
       ------------------------------------------------------
       dynamic_debug01/1873 is trying to acquire lock:
        ((console_sem).lock){-...}, at: [<0000000099c891ec>] down_trylock+0x20/0x4c
      
       but task is already holding lock:
        (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
       -> #2 (&rq->lock){-.-.}:
              __lock_acquire+0x3b4/0x6e0
              lock_acquire+0xf4/0x2a8
              _raw_spin_lock+0x4c/0x60
              task_fork_fair+0x3c/0x148
              sched_fork+0x10c/0x214
              copy_process.isra.32.part.33+0x4e8/0x14f0
              _do_fork+0xe8/0x78c
              kernel_thread+0x48/0x54
              rest_init+0x34/0x2a4
              start_kernel+0x45c/0x488
      
       -> #1 (&p->pi_lock){-.-.}:
              __lock_acquire+0x3b4/0x6e0
              lock_acquire+0xf4/0x2a8
              _raw_spin_lock_irqsave+0x58/0x70
              try_to_wake_up+0x48/0x600
              wake_up_process+0x28/0x34
              __up.isra.0+0x60/0x6c
              up+0x60/0x68
              __up_console_sem+0x4c/0x7c
              console_unlock+0x328/0x634
              vprintk_emit+0x25c/0x390
              dev_vprintk_emit+0xc4/0x1fc
              dev_printk_emit+0x88/0xa8
              __dev_printk+0x58/0x9c
              _dev_info+0x84/0xa8
              usb_new_device+0x100/0x474
              hub_port_connect+0x280/0x92c
              hub_event+0x740/0xa84
              process_one_work+0x240/0x70c
              worker_thread+0x60/0x400
              kthread+0x110/0x13c
              ret_from_fork+0x10/0x18
      
       -> #0 ((console_sem).lock){-...}:
              validate_chain.isra.34+0x6e4/0xa20
              __lock_acquire+0x3b4/0x6e0
              lock_acquire+0xf4/0x2a8
              _raw_spin_lock_irqsave+0x58/0x70
              down_trylock+0x20/0x4c
              __down_trylock_console_sem+0x3c/0x9c
              console_trylock+0x20/0xb0
              vprintk_emit+0x254/0x390
              vprintk_default+0x58/0x90
              vprintk_func+0xbc/0x164
              printk+0x80/0xa0
              __dynamic_pr_debug+0x84/0xac
              gic_raise_softirq+0x184/0x18c
              smp_cross_call+0xac/0x218
              smp_send_reschedule+0x3c/0x48
              resched_curr+0x60/0x9c
              check_preempt_curr+0x70/0xdc
              wake_up_new_task+0x310/0x470
              _do_fork+0x188/0x78c
              SyS_clone+0x44/0x50
              __sys_trace_return+0x0/0x4
      
       other info that might help us debug this:
      
       Chain exists of:
         (console_sem).lock --> &p->pi_lock --> &rq->lock
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(&rq->lock);
                                      lock(&p->pi_lock);
                                      lock(&rq->lock);
         lock((console_sem).lock);
      
        *** DEADLOCK ***
      
       2 locks held by dynamic_debug01/1873:
        #0:  (&p->pi_lock){-.-.}, at: [<000000001366df53>] wake_up_new_task+0x40/0x470
        #1:  (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc
      
       stack backtrace:
       CPU: 10 PID: 1873 Comm: dynamic_debug01 Tainted: G        W        4.15.0+ #1
       Hardware name: GIGABYTE R120-T34-00/MT30-GS2-00, BIOS T48 10/02/2017
       Call trace:
        dump_backtrace+0x0/0x188
        show_stack+0x24/0x2c
        dump_stack+0xa4/0xe0
        print_circular_bug.isra.31+0x29c/0x2b8
        check_prev_add.constprop.39+0x6c8/0x6dc
        validate_chain.isra.34+0x6e4/0xa20
        __lock_acquire+0x3b4/0x6e0
        lock_acquire+0xf4/0x2a8
        _raw_spin_lock_irqsave+0x58/0x70
        down_trylock+0x20/0x4c
        __down_trylock_console_sem+0x3c/0x9c
        console_trylock+0x20/0xb0
        vprintk_emit+0x254/0x390
        vprintk_default+0x58/0x90
        vprintk_func+0xbc/0x164
        printk+0x80/0xa0
        __dynamic_pr_debug+0x84/0xac
        gic_raise_softirq+0x184/0x18c
        smp_cross_call+0xac/0x218
        smp_send_reschedule+0x3c/0x48
        resched_curr+0x60/0x9c
        check_preempt_curr+0x70/0xdc
        wake_up_new_task+0x310/0x470
        _do_fork+0x188/0x78c
        SyS_clone+0x44/0x50
        __sys_trace_return+0x0/0x4
       GICv3: CPU0: ICC_SGI1R_EL1 12000
      
      This could be fixed with printk_deferred() but that might lessen its
      usefulness for debugging. So change it to pr_devel to keep it out of
      production kernels. Developers working on gic-v3 can enable it as
      needed in their kernels.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      b6dd4d83
    • M
      irqchip/mips-gic: Avoid spuriously handling masked interrupts · 285cb4f6
      Matt Redfearn 提交于
      Commit 7778c4b2 ("irqchip: mips-gic: Use pcpu_masks to avoid reading
      GIC_SH_MASK*") removed the read of the hardware mask register when
      handling shared interrupts, instead using the driver's shadow pcpu_masks
      entry as the effective mask. Unfortunately this did not take account of
      the write to pcpu_masks during gic_shared_irq_domain_map, which
      effectively unmasks the interrupt early. If an interrupt is asserted,
      gic_handle_shared_int decodes and processes the interrupt even though it
      has not yet been unmasked via gic_unmask_irq, which also sets the
      appropriate bit in pcpu_masks.
      
      On the MIPS Boston board, when a console command line of
      "console=ttyS0,115200n8r" is passed, the modem status IRQ is enabled in
      the UART, which is immediately raised to the GIC. The interrupt has been
      mapped, but no handler has yet been registered, nor is it expected to be
      unmasked. However, the write to pcpu_masks in gic_shared_irq_domain_map
      has effectively unmasked it, resulting in endless reports of:
      
      [    5.058454] irq 13, desc: ffffffff80a7ad80, depth: 1, count: 0, unhandled: 0
      [    5.062057] ->handle_irq():  ffffffff801b1838,
      [    5.062175] handle_bad_irq+0x0/0x2c0
      
      Where IRQ 13 is the UART interrupt.
      
      To fix this, just remove the write to pcpu_masks in
      gic_shared_irq_domain_map. The existing write in gic_unmask_irq is the
      correct place for what is now the effective unmasking.
      
      Cc: stable@vger.kernel.org
      Fixes: 7778c4b2 ("irqchip: mips-gic: Use pcpu_masks to avoid reading GIC_SH_MASK*")
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Reviewed-by: NPaul Burton <paul.burton@mips.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      285cb4f6
    • T
      drm/nouveau: Make clock gate support conditional · 92256269
      Thierry Reding 提交于
      The recently introduced clock gate support breaks on Tegra chips because
      no thermal support is enabled for those devices. Conditionalize the code
      on the existence of thermal support to fix this.
      
      Fixes: b138eca6 ("drm/nouveau: Add support for basic clockgating on Kepler1")
      Cc: Martin Peres <martin.peres@free.fr>
      Cc: Lyude Paul <lyude@redhat.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      92256269
    • J
      sparc,leon: Select USB_UHCI_BIG_ENDIAN_{MMIO,DESC} · 5efad9ee
      James Hogan 提交于
      Now that USB_UHCI_BIG_ENDIAN_MMIO and USB_UHCI_BIG_ENDIAN_DESC are moved
      outside of the USB_SUPPORT conditional, simply select them from
      SPARC_LEON rather than by the symbol's defaults in drivers/usb/Kconfig,
      similar to how it is done for USB_EHCI_BIG_ENDIAN_MMIO and
      USB_EHCI_BIG_ENDIAN_DESC.
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
      Cc: sparclinux@vger.kernel.org
      Cc: linux-usb@vger.kernel.org
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Patchwork: https://patchwork.linux-mips.org/patch/18560/
      5efad9ee
    • J
      usb: Move USB_UHCI_BIG_ENDIAN_* out of USB_SUPPORT · ec897569
      James Hogan 提交于
      Move the Kconfig symbols USB_UHCI_BIG_ENDIAN_MMIO and
      USB_UHCI_BIG_ENDIAN_DESC out of drivers/usb/host/Kconfig, which is
      conditional upon USB && USB_SUPPORT, so that it can be freely selected
      by platform Kconfig symbols in architecture code.
      
      For example once the MIPS_GENERIC platform selects are fixed in commit
      2e6522c5 ("MIPS: Fix typo BIG_ENDIAN to CPU_BIG_ENDIAN"), the MIPS
      32r6_defconfig warns like so:
      
      warning: (MIPS_GENERIC) selects USB_UHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies (USB_SUPPORT && USB)
      warning: (MIPS_GENERIC) selects USB_UHCI_BIG_ENDIAN_DESC which has unmet direct dependencies (USB_SUPPORT && USB)
      
      Fixes: 2e6522c5 ("MIPS: Fix typo BIG_ENDIAN to CPU_BIG_ENDIAN")
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-usb@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Patchwork: https://patchwork.linux-mips.org/patch/18559/
      ec897569
    • D
      net/ipv4: Remove fib table id from rtable · 68e813aa
      David Ahern 提交于
      Remove rt_table_id from rtable. It was added for getroute to return the
      table id that was hit in the lookup. With the changes for fibmatch the
      table id can be extracted from the fib_info returned in the fib_result
      so it no longer needs to be in rtable directly.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68e813aa
    • K
      tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device · f2780d6d
      Kirill Tkhai 提交于
      This patch adds possibility to get tun device's net namespace fd
      in the same way we allow to do that for sockets.
      
      Socket ioctl numbers do not intersect with tun-specific, and there
      is already SIOCSIFHWADDR used in tun code. So, SIOCGSKNS number
      is choosen instead of custom-made for this functionality.
      
      Note, that open_related_ns() uses plain get_net_ns() and it's safe
      (net can't be already dead at this moment):
      
        tun socket is allocated via sk_alloc() with zero last arg (kern = 0).
        So, each alive socket increments net::count, and the socket is definitely
        alive during ioctl syscall.
      
      Also, common variable net is introduced, so small cleanup in TUNSETIFF
      is made.
      Signed-off-by: NKirill Tkhai <ktkhai@virtuozzo.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2780d6d
  5. 15 2月, 2018 2 次提交