1. 08 2月, 2019 7 次提交
    • D
      i915/snd_hdac: I915 subcomponent for the snd_hdac · 8857c7d0
      Daniel Vetter 提交于
      Since we need multiple components for I915 for different purposes
      (Audio & Mei_hdcp), we adopt the subcomponents methodology introduced
      by the previous patch (mentioned below).
      
      	Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      	Date:   Mon Jan 28 17:08:20 2019 +0530
      
      	    components: multiple components for a device
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by-by: Ramalingam C <ramalinagm.c@intel.com> (commit message)
      Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (code)
      cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc: Russell King <rmk+kernel@arm.linux.org.uk>
      cc: Rafael J. Wysocki <rafael@kernel.org>
      cc: Jaroslav Kysela <perex@perex.cz>
      cc: Takashi Iwai <tiwai@suse.com>
      cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      cc: Jani Nikula <jani.nikula@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190207232759.14553-4-daniel.vetter@ffwll.ch
      8857c7d0
    • D
      components: multiple components for a device · 3521ee99
      Daniel Vetter 提交于
      Component framework is extended to support multiple components for
      a struct device. These will be matched with different masters based on
      its sub component value.
      
      We are introducing this, as I915 needs two different components
      with different subcomponent value, which will be matched to two
      different component masters(Audio and HDCP) based on the subcomponent
      values.
      
      v2: Add documenation.
      
      v3: Rebase on top of updated documenation.
      
      v4: Review from Rafael:
      - Remove redundant "This" from kerneldoc (also in the previous patch)
      - Streamline the logic in find_component() a bit.
      
      Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1 code)
      Signed-off-by: Ramalingam C <ramalingam.c@intel.com> (v1 commit message)
      Cc: Ramalingam C <ramalingam.c@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Rafael J. Wysocki <rafael@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190207232759.14553-2-daniel.vetter@ffwll.ch
      3521ee99
    • D
      component: Add documentation · 4d69c80e
      Daniel Vetter 提交于
      While typing these I think doing an s/component_master/aggregate/
      would be useful:
      - it's shorter :-)
      - I think component/aggregate is much more meaningful naming than
        component/puppetmaster or something like that. At least to my
        English ear "aggregate" emphasizes much more the "assemble a pile of
        things into something bigger" aspect, and there's not really much
        of a control hierarchy between aggregate and constituing components.
      
      But that's way more than a quick doc typing exercise ...
      
      Thanks to Ram for commenting on an initial draft of these docs.
      
      v2: Review from Rafael:
      - git add Documenation/driver-api/component.rst
      - lots of polish to the wording + spelling fixes.
      
      v3: Review from Russell:
      - s/framework/helper
      - clarify the documentation for component_match_add functions.
      
      v4: Remove a few superflous "This".
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: "C, Ramalingam" <ramalingam.c@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Rafael J. Wysocki <rafael@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190207232759.14553-1-daniel.vetter@ffwll.ch
      4d69c80e
    • G
      driver core: Postpone DMA tear-down until after devres release · 376991db
      Geert Uytterhoeven 提交于
      When unbinding the (IOMMU-enabled) R-Car SATA device on Salvator-XS
      (R-Car H3 ES2.0), in preparation of rebinding against vfio-platform for
      device pass-through for virtualization:
      
          echo ee300000.sata > /sys/bus/platform/drivers/sata_rcar/unbind
      
      the kernel crashes with:
      
          Unable to handle kernel paging request at virtual address ffffffbf029ffffc
          Mem abort info:
            ESR = 0x96000006
            Exception class = DABT (current EL), IL = 32 bits
            SET = 0, FnV = 0
            EA = 0, S1PTW = 0
          Data abort info:
            ISV = 0, ISS = 0x00000006
            CM = 0, WnR = 0
          swapper pgtable: 4k pages, 39-bit VAs, pgdp = 000000007e8c586c
          [ffffffbf029ffffc] pgd=000000073bfc6003, pud=000000073bfc6003, pmd=0000000000000000
          Internal error: Oops: 96000006 [#1] SMP
          Modules linked in:
          CPU: 0 PID: 1098 Comm: bash Not tainted 5.0.0-rc5-salvator-x-00452-g37596f884f4318ef #287
          Hardware name: Renesas Salvator-X 2nd version board based on r8a7795 ES2.0+ (DT)
          pstate: 60400005 (nZCv daif +PAN -UAO)
          pc : __free_pages+0x8/0x58
          lr : __dma_direct_free_pages+0x50/0x5c
          sp : ffffff801268baa0
          x29: ffffff801268baa0 x28: 0000000000000000
          x27: ffffffc6f9c60bf0 x26: ffffffc6f9c60bf0
          x25: ffffffc6f9c60810 x24: 0000000000000000
          x23: 00000000fffff000 x22: ffffff8012145000
          x21: 0000000000000800 x20: ffffffbf029fffc8
          x19: 0000000000000000 x18: ffffffc6f86c42c8
          x17: 0000000000000000 x16: 0000000000000070
          x15: 0000000000000003 x14: 0000000000000000
          x13: ffffff801103d7f8 x12: 0000000000000028
          x11: ffffff8011117604 x10: 0000000000009ad8
          x9 : ffffff80110126d0 x8 : ffffffc6f7563000
          x7 : 6b6b6b6b6b6b6b6b x6 : 0000000000000018
          x5 : ffffff8011cf3cc8 x4 : 0000000000004000
          x3 : 0000000000080000 x2 : 0000000000000001
          x1 : 0000000000000000 x0 : ffffffbf029fffc8
          Process bash (pid: 1098, stack limit = 0x00000000c38e3e32)
          Call trace:
           __free_pages+0x8/0x58
           __dma_direct_free_pages+0x50/0x5c
           arch_dma_free+0x1c/0x98
           dma_direct_free+0x14/0x24
           dma_free_attrs+0x9c/0xdc
           dmam_release+0x18/0x20
           release_nodes+0x25c/0x28c
           devres_release_all+0x48/0x4c
           device_release_driver_internal+0x184/0x1f0
           device_release_driver+0x14/0x1c
           unbind_store+0x70/0xb8
           drv_attr_store+0x24/0x34
           sysfs_kf_write+0x4c/0x64
           kernfs_fop_write+0x154/0x1c4
           __vfs_write+0x34/0x164
           vfs_write+0xb4/0x16c
           ksys_write+0x5c/0xbc
           __arm64_sys_write+0x14/0x1c
           el0_svc_common+0x98/0x114
           el0_svc_handler+0x1c/0x24
           el0_svc+0x8/0xc
          Code: d51b4234 17fffffa a9bf7bfd 910003fd (b9403404)
          ---[ end trace 8c564cdd3a1a840f ]---
      
      While I've bisected this to commit e8e683ae ("iommu/of: Fix
      probe-deferral"), and reverting that commit on post-v5.0-rc4 kernels
      does fix the problem, this turned out to be a red herring.
      
      On arm64, arch_teardown_dma_ops() resets dev->dma_ops to NULL.
      Hence if a driver has used a managed DMA allocation API, the allocated
      DMA memory will be freed using the direct DMA ops, while it may have
      been allocated using a custom DMA ops (iommu_dma_ops in this case).
      
      Fix this by reversing the order of the calls to devres_release_all() and
      arch_teardown_dma_ops().
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      376991db
    • R
      PM-runtime: Take suppliers into account in __pm_runtime_set_status() · 4080ab08
      Rafael J. Wysocki 提交于
      If the target device has any suppliers, as reflected by device links
      to them, __pm_runtime_set_status() does not take them into account,
      which is not consistent with the other parts of the PM-runtime
      framework and may lead to programming mistakes.
      
      Modify __pm_runtime_set_status() to take suppliers into account by
      activating them upfront if the new status is RPM_ACTIVE and
      deactivating them on exit if the new status is RPM_SUSPENDED.
      
      If the activation of one of the suppliers fails, the new status
      will be RPM_SUSPENDED and the (remaining) suppliers will be
      deactivated on exit (the child count of the device's parent
      will be dropped too then).
      
      Of course, adding device links locking to __pm_runtime_set_status()
      means that it cannot be run fron interrupt context, so make it use
      spin_lock_irq() and spin_unlock_irq() instead of spin_lock_irqsave()
      and spin_unlock_irqrestore(), respectively.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4080ab08
    • A
      net: dsa: b53: Fix for failure when irq is not defined in dt · 39841cc1
      Arun Parameswaran 提交于
      Fixes the issues with non BCM58XX chips in the b53 driver
      failing, when the irq is not specified in the device tree.
      
      Removed the check for BCM58XX in b53_srab_prepare_irq(),
      so the 'port->irq' will be set to '-EXIO' if the irq is not
      specified in the device tree.
      
      Fixes: 16994374 ("net: dsa: b53: Make SRAB driver manage port interrupts")
      Fixes: b2ddc48a ("net: dsa: b53: Do not fail when IRQ are not initialized")
      Signed-off-by: NArun Parameswaran <arun.parameswaran@broadcom.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39841cc1
    • H
      geneve: should not call rt6_lookup() when ipv6 was disabled · c0a47e44
      Hangbin Liu 提交于
      When we add a new GENEVE device with IPv6 remote, checking only for
      IS_ENABLED(CONFIG_IPV6) is not enough as we may disable IPv6 in the
      kernel command line (ipv6.disable=1), and calling rt6_lookup() would
      cause a NULL pointer dereference.
      
      v2:
      - don't mix declarations and code (reported by Stefano Brivio, Eric Dumazet)
      - there's no need to use in6_dev_get() as we only need to check that
        idev exists (reported by David Ahern). This is under RTNL, so we can
        simply use __in6_dev_get() instead (Stefano, Eric).
      Reported-by: NJianlin Shi <jishi@redhat.com>
      Fixes: c40e89fd ("geneve: configure MTU based on a lower device")
      Cc: Alexey Kodanev <alexey.kodanev@oracle.com>
      Signed-off-by: NHangbin Liu <liuhangbin@gmail.com>
      Reviewed-by: NStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0a47e44
  2. 07 2月, 2019 24 次提交
  3. 06 2月, 2019 9 次提交
    • K
      nvme-pci: fix rapid add remove sequence · 5c959d73
      Keith Busch 提交于
      A surprise removal may fail to tear down request queues if it is racing
      with the initial asynchronous probe. If that happens, the remove path
      won't see the queue resources to tear down, and the controller reset
      path may create a new request queue on a removed device, but will not
      be able to make forward progress, deadlocking the pci removal.
      
      Protect setting up non-blocking resources from a shutdown by holding the
      same mutex, and transition to the CONNECTING state after these resources
      are initialized so the probe path may see the dead controller state
      before dispatching new IO.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=202081Reported-by: NAlex Gagniuc <Alex_Gagniuc@Dellteam.com>
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Tested-by: NAlex Gagniuc <mr.nuke.me@gmail.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      5c959d73
    • K
      nvme: lock NS list changes while handling command effects · e7ad43c3
      Keith Busch 提交于
      If a controller supports the NS Change Notification, the namespace
      scan_work is automatically triggered after attaching a new namespace.
      
      Occasionally the namespace scan_work may append the new namespace to the
      list before the admin command effects handling is completed. The effects
      handling unfreezes namespaces, but if it unfreezes the newly attached
      namespace, its request_queue freeze depth will be off and we'll hit the
      warning in blk_mq_unfreeze_queue().
      
      On the next namespace add, we will fail to freeze that queue due to the
      previous bad accounting and deadlock waiting for frozen.
      
      Fix that by preventing scan work from altering the namespace list while
      command effects handling needs to pair freeze with unfreeze.
      Reported-by: NWen Xiong <wenxiong@us.ibm.com>
      Tested-by: NWen Xiong <wenxiong@us.ibm.com>
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      e7ad43c3
    • T
      drm/omap: dsi: Hack-fix DSI bus flags · 6297388e
      Tomi Valkeinen 提交于
      Since commit b4935e3a ("drm/omap: Store bus flags in the
      omap_dss_device structure") video mode flags are managed by the omapdss
      (and later omapdrm) core based on bus flags stored in omap_dss_device.
      This works fine for all devices whose video modes are set by the omapdss
      and omapdrm core, but breaks DSI operation as the DSI still uses legacy
      code paths and sets the DISPC timings manually.
      
      To fix the problem properly we should move the DSI encoder to the new
      encoder model. This will however require a considerable amount of work.
      Restore DSI operation by adding back video mode flags handling in the
      DSI encoder driver as a hack in the meantime.
      
      Fixes: b4935e3a ("drm/omap: Store bus flags in the omap_dss_device structure")
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190111035120.20668-5-laurent.pinchart@ideasonboard.com
      6297388e
    • T
      drm/omap: dsi: Fix OF platform depopulate · 0940c527
      Tomi Valkeinen 提交于
      Commit edb715df ("drm/omap: dss: dsi: Move initialization code from
      bind to probe") moved the of_platform_populate() call from dsi_bind() to
      dsi_probe(), but failed to move the corresponding
      of_platform_depopulate() from dsi_unbind() to dsi_remove(). This results
      in OF child devices being potentially removed multiple times. Fix it by
      placing the of_platform_depopulate() call where it belongs.
      
      Fixes: edb715df ("drm/omap: dss: dsi: Move initialization code from bind to probe")
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190111035120.20668-4-laurent.pinchart@ideasonboard.com
      0940c527
    • T
      drm/omap: dsi: Fix crash in DSI debug dumps · 4df04ac9
      Tomi Valkeinen 提交于
      Reading any of the DSI debugfs files results in a crash, as wrong
      pointer is passed to the dump functions, and the dump functions use a
      wrong pointer. This patch fixes DSI debug dumps.
      
      Fixes: f3ed97f9 ("drm/omap: dsi: Simplify debugfs implementation")
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190111035120.20668-3-laurent.pinchart@ideasonboard.com
      4df04ac9
    • M
      mtd: rawnand: gpmi: fix MX28 bus master lockup problem · d5d27fd9
      Martin Kepplinger 提交于
      Disable BCH soft reset according to MX23 erratum #2847 ("BCH soft
      reset may cause bus master lock up") for MX28 too. It has the same
      problem.
      
      Observed problem: once per 100,000+ MX28 reboots NAND read failed on
      DMA timeout errors:
      [    1.770823] UBI: attaching mtd3 to ubi0
      [    2.768088] gpmi_nand: DMA timeout, last DMA :1
      [    3.958087] gpmi_nand: BCH timeout, last DMA :1
      [    4.156033] gpmi_nand: Error in ECC-based read: -110
      [    4.161136] UBI warning: ubi_io_read: error -110 while reading 64
      bytes from PEB 0:0, read only 0 bytes, retry
      [    4.171283] step 1 error
      [    4.173846] gpmi_nand: Chip: 0, Error -1
      
      Without BCH soft reset we successfully executed 1,000,000 MX28 reboots.
      
      I have a quote from NXP regarding this problem, from July 18th 2016:
      
      "As the i.MX23 and i.MX28 are of the same generation, they share many
      characteristics. Unfortunately, also the erratas may be shared.
      In case of the documented erratas and the workarounds, you can also
      apply the workaround solution of one device on the other one. This have
      been reported, but I’m afraid that there are not an estimated date for
      updating the Errata documents.
      Please accept our apologies for any inconveniences this may cause."
      
      Fixes: 6f2a6a52 ("mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems")
      Cc: stable@vger.kernel.org
      Signed-off-by: NManfred Schlaegl <manfred.schlaegl@ginzinger.com>
      Signed-off-by: NMartin Kepplinger <martin.kepplinger@ginzinger.com>
      Reviewed-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NFabio Estevam <festevam@gmail.com>
      Acked-by: NHan Xu <han.xu@nxp.com>
      Signed-off-by: NBoris Brezillon <bbrezillon@kernel.org>
      d5d27fd9
    • V
      drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen · d028a646
      Ville Syrjälä 提交于
      Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
      which misprograms the hardware badly when encountering a suitably
      high resolution display. The programmed pipe timings are somewhat
      bonkers and the DPLL is totally misprogrammed (P divider == 0).
      That will result in atomic commit timeouts as apparently the pipe
      is sufficiently stuck to not signal vblank interrupts.
      
      IIRC something like this was also observed on some other SNB
      machine years ago (might have been a Dell XPS 8300) but a BIOS
      update cured it. Sadly looks like this was never fixed for the
      ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
      broken.
      
      The quickest way to deal with this seems to be to shut down
      the pipe+ports+DPLL. Unfortunately doing this during the
      normal sanitization phase isn't quite soon enough as we
      already spew several WARNs about the bogus hardware state.
      But it's better than hanging the boot for a few dozen seconds.
      Since this is limited to a few old machines it doesn't seem
      entirely worthwile to try and rework the readout+sanitization
      code to handle it more gracefully.
      
      v2: Fix potential NULL deref (kbuild test robot)
          Constify has_bogus_dpll_config()
      
      Cc: stable@vger.kernel.org # v4.20+
      Cc: Daniel Kamil Kozar <dkk089@gmail.com>
      Reported-by: NDaniel Kamil Kozar <dkk089@gmail.com>
      Tested-by: NDaniel Kamil Kozar <dkk089@gmail.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
      Fixes: 516a49cc ("drm/i915: Fix assert_plane() warning on bootup with external display")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190111174950.10681-1-ville.syrjala@linux.intel.comReviewed-by: NMika Kahola <mika.kahola@intel.com>
      (cherry picked from commit 7bed8adc)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190205141846.6053-1-ville.syrjala@linux.intel.com
      d028a646
    • E
      mISDN: fix a race in dev_expire_timer() · bdcc5bc2
      Eric Dumazet 提交于
      Since mISDN_close() uses dev->pending to iterate over active
      timers, there is a chance that one timer got removed from the
      ->pending list in dev_expire_timer() but that the thread
      has not called yet wake_up_interruptible()
      
      So mISDN_close() could miss this and free dev before
      completion of at least one dev_expire_timer()
      
      syzbot was able to catch this race :
      
      BUG: KASAN: use-after-free in register_lock_class+0x140c/0x1bf0 kernel/locking/lockdep.c:827
      Write of size 8 at addr ffff88809fc18948 by task syz-executor1/24769
      
      CPU: 1 PID: 24769 Comm: syz-executor1 Not tainted 5.0.0-rc5 #60
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       <IRQ>
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x172/0x1f0 lib/dump_stack.c:113
       print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187
       kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
       __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:140
       register_lock_class+0x140c/0x1bf0 kernel/locking/lockdep.c:827
       __lock_acquire+0x11f/0x4700 kernel/locking/lockdep.c:3224
       lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3841
       __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
       _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152
       __wake_up_common_lock+0xc7/0x190 kernel/sched/wait.c:120
       __wake_up+0xe/0x10 kernel/sched/wait.c:145
       dev_expire_timer+0xe4/0x3b0 drivers/isdn/mISDN/timerdev.c:174
       call_timer_fn+0x190/0x720 kernel/time/timer.c:1325
      protocol 88fb is buggy, dev hsr_slave_0
      protocol 88fb is buggy, dev hsr_slave_1
       expire_timers kernel/time/timer.c:1362 [inline]
       __run_timers kernel/time/timer.c:1681 [inline]
       __run_timers kernel/time/timer.c:1649 [inline]
       run_timer_softirq+0x652/0x1700 kernel/time/timer.c:1694
       __do_softirq+0x266/0x95a kernel/softirq.c:292
       invoke_softirq kernel/softirq.c:373 [inline]
       irq_exit+0x180/0x1d0 kernel/softirq.c:413
       exiting_irq arch/x86/include/asm/apic.h:536 [inline]
       smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1062
       apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807
       </IRQ>
      RIP: 0010:__sanitizer_cov_trace_pc+0x26/0x50 kernel/kcov.c:101
      Code: 90 90 90 90 55 48 89 e5 48 8b 75 08 65 48 8b 04 25 40 ee 01 00 65 8b 15 98 12 92 7e 81 e2 00 01 1f 00 75 2b 8b 90 d8 12 00 00 <83> fa 02 75 20 48 8b 88 e0 12 00 00 8b 80 dc 12 00 00 48 8b 11 48
      RSP: 0018:ffff8880589b7a60 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
      RAX: ffff888087ce25c0 RBX: 0000000000000001 RCX: ffffffff818f8ca3
      RDX: 0000000000000000 RSI: ffffffff818f8b48 RDI: 0000000000000001
      RBP: ffff8880589b7a60 R08: ffff888087ce25c0 R09: ffffed1015d25bd0
      R10: ffffed1015d25bcf R11: ffff8880ae92de7b R12: ffffea0001ae4680
      R13: ffffea0001ae4688 R14: 0000000000000000 R15: ffffea0001b41648
       PageIdle include/linux/page-flags.h:398 [inline]
       page_is_idle include/linux/page_idle.h:29 [inline]
       mark_page_accessed+0x618/0x1140 mm/swap.c:398
       touch_buffer fs/buffer.c:59 [inline]
       __find_get_block+0x312/0xcc0 fs/buffer.c:1298
       sb_find_get_block include/linux/buffer_head.h:338 [inline]
       recently_deleted fs/ext4/ialloc.c:682 [inline]
       find_inode_bit.isra.0+0x202/0x510 fs/ext4/ialloc.c:722
       __ext4_new_inode+0x14ad/0x52c0 fs/ext4/ialloc.c:914
       ext4_symlink+0x3f8/0xbe0 fs/ext4/namei.c:3096
       vfs_symlink fs/namei.c:4126 [inline]
       vfs_symlink+0x378/0x5d0 fs/namei.c:4112
       do_symlinkat+0x22b/0x290 fs/namei.c:4153
       __do_sys_symlink fs/namei.c:4172 [inline]
       __se_sys_symlink fs/namei.c:4170 [inline]
       __x64_sys_symlink+0x59/0x80 fs/namei.c:4170
       do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      RIP: 0033:0x457b67
      Code: 0f 1f 00 b8 5c 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 6d bb fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 4d bb fb ff c3 66 2e 0f 1f 84 00 00 00 00
      RSP: 002b:00007fff045ce0f8 EFLAGS: 00000202 ORIG_RAX: 0000000000000058
      RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000457b67
      RDX: 00007fff045ce173 RSI: 00000000004bd63f RDI: 00007fff045ce160
      RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000013
      R10: 0000000000000075 R11: 0000000000000202 R12: 0000000000000000
      R13: 0000000000000001 R14: 000000000000029b R15: 0000000000000001
      
      Allocated by task 24763:
       save_stack+0x45/0xd0 mm/kasan/common.c:73
       set_track mm/kasan/common.c:85 [inline]
       __kasan_kmalloc mm/kasan/common.c:496 [inline]
       __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469
       kasan_kmalloc+0x9/0x10 mm/kasan/common.c:504
       kmem_cache_alloc_trace+0x151/0x760 mm/slab.c:3609
       kmalloc include/linux/slab.h:545 [inline]
       mISDN_open+0x9a/0x270 drivers/isdn/mISDN/timerdev.c:59
       misc_open+0x398/0x4c0 drivers/char/misc.c:141
       chrdev_open+0x247/0x6b0 fs/char_dev.c:417
       do_dentry_open+0x47d/0x1130 fs/open.c:771
       vfs_open+0xa0/0xd0 fs/open.c:880
       do_last fs/namei.c:3418 [inline]
       path_openat+0x10d7/0x4690 fs/namei.c:3534
       do_filp_open+0x1a1/0x280 fs/namei.c:3564
       do_sys_open+0x3fe/0x5d0 fs/open.c:1063
       __do_sys_openat fs/open.c:1090 [inline]
       __se_sys_openat fs/open.c:1084 [inline]
       __x64_sys_openat+0x9d/0x100 fs/open.c:1084
       do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Freed by task 24762:
       save_stack+0x45/0xd0 mm/kasan/common.c:73
       set_track mm/kasan/common.c:85 [inline]
       __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458
       kasan_slab_free+0xe/0x10 mm/kasan/common.c:466
       __cache_free mm/slab.c:3487 [inline]
       kfree+0xcf/0x230 mm/slab.c:3806
       mISDN_close+0x2a1/0x390 drivers/isdn/mISDN/timerdev.c:97
       __fput+0x2df/0x8d0 fs/file_table.c:278
       ____fput+0x16/0x20 fs/file_table.c:309
       task_work_run+0x14a/0x1c0 kernel/task_work.c:113
       tracehook_notify_resume include/linux/tracehook.h:188 [inline]
       exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:166
       prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
       syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
       do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      The buggy address belongs to the object at ffff88809fc18900
       which belongs to the cache kmalloc-192 of size 192
      The buggy address is located 72 bytes inside of
       192-byte region [ffff88809fc18900, ffff88809fc189c0)
      The buggy address belongs to the page:
      page:ffffea00027f0600 count:1 mapcount:0 mapping:ffff88812c3f0040 index:0xffff88809fc18000
      flags: 0x1fffc0000000200(slab)
      raw: 01fffc0000000200 ffffea000269f648 ffffea00029f7408 ffff88812c3f0040
      raw: ffff88809fc18000 ffff88809fc18000 000000010000000b 0000000000000000
      page dumped because: kasan: bad access detected
      
      Memory state around the buggy address:
       ffff88809fc18800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       ffff88809fc18880: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      >ffff88809fc18900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
       ffff88809fc18980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
       ffff88809fc18a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdcc5bc2
    • A
      net: dsa: mv88e6xxx: Fix counting of ATU violations · 75c05a74
      Andrew Lunn 提交于
      The ATU port vector contains a bit per port of the switch. The code
      wrongly used it as a port number, and incremented a port counter. This
      resulted in the wrong interfaces counter being incremented, and
      potentially going off the end of the array of ports.
      
      Fix this by using the source port ID for the violation, which really
      is a port number.
      Reported-by: NChris Healy <Chris.Healy@zii.aero>
      Tested-by: NChris Healy <Chris.Healy@zii.aero>
      Fixes: 65f60e45 ("net: dsa: mv88e6xxx: Keep ATU/VTU violation statistics")
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75c05a74