1. 17 10月, 2017 4 次提交
  2. 14 10月, 2017 2 次提交
    • J
      tty: fall back to N_NULL if switching to N_TTY fails during hangup · e65c62b1
      Johannes Weiner 提交于
      We have seen NULL-pointer dereference crashes in tty->disc_data when the
      N_TTY fallback driver failed to open during hangup.  The immediate cause
      of this open to fail has been addressed in the preceding patch to
      vmalloc(), but this code could be more robust.
      
      As Alan pointed out in commit 8a8dabf2 ("tty: handle the case where
      we cannot restore a line discipline"), the N_TTY driver, historically
      the safe fallback that could never fail, can indeed fail, but the
      surrounding code is not prepared to handle this.  To avoid crashes he
      added a new N_NULL driver to take N_TTY's place as the last resort.
      
      Hook that fallback up to the hangup path.  Update tty_ldisc_reinit() to
      reflect the reality that n_tty_open can indeed fail.
      
      Link: http://lkml.kernel.org/r/20171004185959.GC2136@cmpxchg.orgSigned-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: Alan Cox <alan@llwyncelyn.cymru>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e65c62b1
    • Z
      mm: only display online cpus of the numa node · 064f0e93
      Zhen Lei 提交于
      When I execute numactl -H (which reads /sys/devices/system/node/nodeX/cpumap
      and displays cpumask_of_node for each node), I get different result
      on X86 and arm64.  For each numa node, the former only displayed online
      CPUs, and the latter displayed all possible CPUs.  Unfortunately, both
      Linux documentation and numactl manual have not described it clear.
      
      I sent a mail to ask for help, and Michal Hocko replied that he
      preferred to print online cpus because it doesn't really make much sense
      to bind anything on offline nodes.
      
      Will said:
       "I suspect the vast majority (if not all) code that reads this file was
        developed for x86, so having the same behaviour for arm64 sounds like
        something we should do ASAP before people try to special case with
        things like #ifdef __aarch64__. I'd rather have this in 4.14 if
        possible."
      
      Link: http://lkml.kernel.org/r/1506678805-15392-2-git-send-email-thunder.leizhen@huawei.comSigned-off-by: NZhen Lei <thunder.leizhen@huawei.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tianhong Ding <dingtianhong@huawei.com>
      Cc: Hanjun Guo <guohanjun@huawei.com>
      Cc: Libin <huawei.libin@huawei.com>
      Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      064f0e93
  3. 13 10月, 2017 8 次提交
  4. 12 10月, 2017 9 次提交
  5. 11 10月, 2017 17 次提交
    • A
      HID: hid-elecom: extend to fix descriptor for HUGE trackball · a0933a45
      Alex Manoussakis 提交于
      In addition to DEFT, Elecom introduced a larger trackball called HUGE, in
      both wired (M-HT1URBK) and wireless (M-HT1DRBK) versions. It has the same
      buttons and behavior as the DEFT. This patch adds the two relevant USB IDs
      to enable operation of the three Fn buttons on the top of the device.
      
      Cc: Diego Elio Petteno <flameeyes@flameeyes.eu>
      Signed-off-by: NAlex Manoussakis <amanou@gnu.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a0933a45
    • J
      HID: usbhid: fix out-of-bounds bug · f043bfc9
      Jaejoong Kim 提交于
      The hid descriptor identifies the length and type of subordinate
      descriptors for a device. If the received hid descriptor is smaller than
      the size of the struct hid_descriptor, it is possible to cause
      out-of-bounds.
      
      In addition, if bNumDescriptors of the hid descriptor have an incorrect
      value, this can also cause out-of-bounds while approaching hdesc->desc[n].
      
      So check the size of hid descriptor and bNumDescriptors.
      
      	BUG: KASAN: slab-out-of-bounds in usbhid_parse+0x9b1/0xa20
      	Read of size 1 at addr ffff88006c5f8edf by task kworker/1:2/1261
      
      	CPU: 1 PID: 1261 Comm: kworker/1:2 Not tainted
      	4.14.0-rc1-42251-gebb2c243 #169
      	Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
      	Workqueue: usb_hub_wq hub_event
      	Call Trace:
      	__dump_stack lib/dump_stack.c:16
      	dump_stack+0x292/0x395 lib/dump_stack.c:52
      	print_address_description+0x78/0x280 mm/kasan/report.c:252
      	kasan_report_error mm/kasan/report.c:351
      	kasan_report+0x22f/0x340 mm/kasan/report.c:409
      	__asan_report_load1_noabort+0x19/0x20 mm/kasan/report.c:427
      	usbhid_parse+0x9b1/0xa20 drivers/hid/usbhid/hid-core.c:1004
      	hid_add_device+0x16b/0xb30 drivers/hid/hid-core.c:2944
      	usbhid_probe+0xc28/0x1100 drivers/hid/usbhid/hid-core.c:1369
      	usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361
      	really_probe drivers/base/dd.c:413
      	driver_probe_device+0x610/0xa00 drivers/base/dd.c:557
      	__device_attach_driver+0x230/0x290 drivers/base/dd.c:653
      	bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463
      	__device_attach+0x26e/0x3d0 drivers/base/dd.c:710
      	device_initial_probe+0x1f/0x30 drivers/base/dd.c:757
      	bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523
      	device_add+0xd0b/0x1660 drivers/base/core.c:1835
      	usb_set_configuration+0x104e/0x1870 drivers/usb/core/message.c:1932
      	generic_probe+0x73/0xe0 drivers/usb/core/generic.c:174
      	usb_probe_device+0xaf/0xe0 drivers/usb/core/driver.c:266
      	really_probe drivers/base/dd.c:413
      	driver_probe_device+0x610/0xa00 drivers/base/dd.c:557
      	__device_attach_driver+0x230/0x290 drivers/base/dd.c:653
      	bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463
      	__device_attach+0x26e/0x3d0 drivers/base/dd.c:710
      	device_initial_probe+0x1f/0x30 drivers/base/dd.c:757
      	bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523
      	device_add+0xd0b/0x1660 drivers/base/core.c:1835
      	usb_new_device+0x7b8/0x1020 drivers/usb/core/hub.c:2457
      	hub_port_connect drivers/usb/core/hub.c:4903
      	hub_port_connect_change drivers/usb/core/hub.c:5009
      	port_event drivers/usb/core/hub.c:5115
      	hub_event+0x194d/0x3740 drivers/usb/core/hub.c:5195
      	process_one_work+0xc7f/0x1db0 kernel/workqueue.c:2119
      	worker_thread+0x221/0x1850 kernel/workqueue.c:2253
      	kthread+0x3a1/0x470 kernel/kthread.c:231
      	ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431
      
      Cc: stable@vger.kernel.org
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NJaejoong Kim <climbbb.kim@gmail.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f043bfc9
    • A
      usb: usbtest: fix NULL pointer dereference · 7c80f9e4
      Alan Stern 提交于
      If the usbtest driver encounters a device with an IN bulk endpoint but
      no OUT bulk endpoint, it will try to dereference a NULL pointer
      (out->desc.bEndpointAddress).  The problem can be solved by adding a
      missing test.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      7c80f9e4
    • A
      usb: gadget: configfs: Fix memory leak of interface directory data · ff74745e
      Andrew Gabbasov 提交于
      Kmemleak checking configuration reports a memory leak in
      usb_os_desc_prepare_interf_dir function when rndis function
      instance is freed and then allocated again. For example, this
      happens with FunctionFS driver with RNDIS function enabled
      when "ffs-test" test application is run several times in a row.
      
      The data for intermediate "os_desc" group for interface directories
      is allocated as a single VLA chunk and (after a change of default
      groups handling) is not ever freed and actually not stored anywhere
      besides inside a list of default groups of a parent group.
      
      The fix is to make usb_os_desc_prepare_interf_dir function return
      a pointer to allocated data (as a pointer to the first VLA item)
      instead of (an unused) integer and to make the caller component
      (currently the only one is RNDIS function) responsible for storing
      the pointer and freeing the memory when appropriate.
      
      Fixes: 1ae1602d ("configfs: switch ->default groups to a linked list")
      Cc: stable@vger.kernel.org
      Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      ff74745e
    • A
      usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options · aec17e1e
      Andrew Gabbasov 提交于
      KASAN enabled configuration reports an error
      
          BUG: KASAN: use-after-free in usb_composite_overwrite_options+...
                      [libcomposite] at addr ...
          Read of size 1 by task ...
      
      when some driver is un-bound and then bound again.
      For example, this happens with FunctionFS driver when "ffs-test"
      test application is run several times in a row.
      
      If the driver has empty manufacturer ID string in initial static data,
      it is then replaced with generated string. After driver unbinding
      the generated string is freed, but the driver data still keep that
      pointer. And if the driver is then bound again, that pointer
      is re-used for string emptiness check.
      
      The fix is to clean up the driver string data upon its unbinding
      to drop the pointer to freed memory.
      
      Fixes: cc2683c3 ("usb: gadget: Provide a default implementation of default manufacturer string")
      Cc: stable@vger.kernel.org
      Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      aec17e1e
    • D
      usb: misc: usbtest: Fix overflow in usbtest_do_ioctl() · cb84f568
      Dan Carpenter 提交于
      There used to be a test against "if (param->sglen > MAX_SGLEN)" but it
      was removed during a refactor.  It leads to an integer overflow and a
      stack overflow in test_queue() if we try to create a too large urbs[]
      array on the stack.
      
      There is a second integer overflow in test_queue() as well if
      "param->iterations" is too high.  I don't immediately see that it's
      harmful but I've added a check to prevent it and silence the static
      checker warning.
      
      Fixes: 18fc4ebd ("usb: misc: usbtest: Remove timeval usage")
      Acked-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      cb84f568
    • K
      usb: renesas_usbhs: Fix DMAC sequence for receiving zero-length packet · 29c7f3e6
      Kazuya Mizuguchi 提交于
      The DREQE bit of the DnFIFOSEL should be set to 1 after the DE bit of
      USB-DMAC on R-Car SoCs is set to 1 after the USB-DMAC received a
      zero-length packet. Otherwise, a transfer completion interruption
      of USB-DMAC doesn't happen. Even if the driver changes the sequence,
      normal operations (transmit/receive without zero-length packet) will
      not cause any side-effects. So, this patch fixes the sequence anyway.
      Signed-off-by: NKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
      [shimoda: revise the commit log]
      Fixes: e73a9891 ("usb: renesas_usbhs: add DMAEngine support")
      Cc: <stable@vger.kernel.org> # v3.1+
      Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      29c7f3e6
    • A
      USB: dummy-hcd: Fix deadlock caused by disconnect detection · ab219221
      Alan Stern 提交于
      The dummy-hcd driver calls the gadget driver's disconnect callback
      under the wrong conditions.  It should invoke the callback when Vbus
      power is turned off, but instead it does so when the D+ pullup is
      turned off.
      
      This can cause a deadlock in the composite core when a gadget driver
      is unregistered:
      
      [   88.361471] ============================================
      [   88.362014] WARNING: possible recursive locking detected
      [   88.362580] 4.14.0-rc2+ #9 Not tainted
      [   88.363010] --------------------------------------------
      [   88.363561] v4l_id/526 is trying to acquire lock:
      [   88.364062]  (&(&cdev->lock)->rlock){....}, at: [<ffffffffa0547e03>] composite_disconnect+0x43/0x100 [libcomposite]
      [   88.365051]
      [   88.365051] but task is already holding lock:
      [   88.365826]  (&(&cdev->lock)->rlock){....}, at: [<ffffffffa0547b09>] usb_function_deactivate+0x29/0x80 [libcomposite]
      [   88.366858]
      [   88.366858] other info that might help us debug this:
      [   88.368301]  Possible unsafe locking scenario:
      [   88.368301]
      [   88.369304]        CPU0
      [   88.369701]        ----
      [   88.370101]   lock(&(&cdev->lock)->rlock);
      [   88.370623]   lock(&(&cdev->lock)->rlock);
      [   88.371145]
      [   88.371145]  *** DEADLOCK ***
      [   88.371145]
      [   88.372211]  May be due to missing lock nesting notation
      [   88.372211]
      [   88.373191] 2 locks held by v4l_id/526:
      [   88.373715]  #0:  (&(&cdev->lock)->rlock){....}, at: [<ffffffffa0547b09>] usb_function_deactivate+0x29/0x80 [libcomposite]
      [   88.374814]  #1:  (&(&dum_hcd->dum->lock)->rlock){....}, at: [<ffffffffa05bd48d>] dummy_pullup+0x7d/0xf0 [dummy_hcd]
      [   88.376289]
      [   88.376289] stack backtrace:
      [   88.377726] CPU: 0 PID: 526 Comm: v4l_id Not tainted 4.14.0-rc2+ #9
      [   88.378557] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
      [   88.379504] Call Trace:
      [   88.380019]  dump_stack+0x86/0xc7
      [   88.380605]  __lock_acquire+0x841/0x1120
      [   88.381252]  lock_acquire+0xd5/0x1c0
      [   88.381865]  ? composite_disconnect+0x43/0x100 [libcomposite]
      [   88.382668]  _raw_spin_lock_irqsave+0x40/0x54
      [   88.383357]  ? composite_disconnect+0x43/0x100 [libcomposite]
      [   88.384290]  composite_disconnect+0x43/0x100 [libcomposite]
      [   88.385490]  set_link_state+0x2d4/0x3c0 [dummy_hcd]
      [   88.386436]  dummy_pullup+0xa7/0xf0 [dummy_hcd]
      [   88.387195]  usb_gadget_disconnect+0xd8/0x160 [udc_core]
      [   88.387990]  usb_gadget_deactivate+0xd3/0x160 [udc_core]
      [   88.388793]  usb_function_deactivate+0x64/0x80 [libcomposite]
      [   88.389628]  uvc_function_disconnect+0x1e/0x40 [usb_f_uvc]
      
      This patch changes the code to test the port-power status bit rather
      than the port-connect status bit when deciding whether to isue the
      callback.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NDavid Tulloh <david@tulloh.id.au>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      ab219221
    • J
      usb: phy: tegra: Fix phy suspend for UDC · 203f44c4
      Jon Hunter 提交于
      Commit dfebb5f4 ("usb: chipidea: Add support for Tegra20/30/114/124")
      added UDC support for Tegra but with UDC support enabled, is was found
      that Tegra30, Tegra114 and Tegra124 would hang on entry to suspend.
      
      The hang occurred during the suspend of the USB PHY when the Tegra PHY
      driver attempted to disable the PHY clock. The problem is that before
      the Tegra PHY driver is suspended, the chipidea driver already disabled
      the PHY clock and when the Tegra PHY driver suspended, it could not read
      DEVLC register and caused the device to hang.
      
      The Tegra USB PHY driver is used by both the Tegra EHCI driver and now
      the chipidea UDC driver and so simply removing the disabling of the PHY
      clock from the USB PHY driver would not work for the Tegra EHCI driver.
      Fortunately, the status of the USB PHY clock can be read from the
      USB_SUSP_CTRL register and therefore, to workaround this issue, simply
      poll the register prior to disabling the clock in USB PHY driver to see
      if clock gating has already been initiated. Please note that it can take
      a few uS for the clock to disable and so simply reading this status
      register once on entry is not sufficient.
      
      Similarly when turning on the PHY clock, it is possible that the clock
      is already enabled or in the process of being enabled, and so check for
      this when enabling the PHY.
      
      Please note that no issues are seen with Tegra20 because it has a slightly
      different PHY to Tegra30/114/124.
      
      Fixes: dfebb5f4 ("usb: chipidea: Add support for Tegra20/30/114/124")
      Reviewed-by: NDmitry Osipenko <digetx@gmail.com>
      Tested-by: NDmitry Osipenko <digetx@gmail.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      203f44c4
    • L
      gpu: ipu-v3: pre: implement workaround for ERR009624 · 11aff4b4
      Lucas Stach 提交于
      The PRE has a bug where a software write to the CTRL register can block
      the setting of the ENABLE bit by the hardware in auto repeat mode. When
      this happens the PRE will fail to handle new jobs. To work around this
      software must not write to CTRL register when the PRE store engine is
      inside the unsafe window, where a hardware update to the ENABLE bit
      may happen.
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      [p.zabel@pengutronix.de: rebased before PRE tiled prefetch support]
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      11aff4b4
    • L
      gpu: ipu-v3: prg: wait for double buffers to be filled on channel startup · 263c3b80
      Lucas Stach 提交于
      Wait for both double buffer to be filled when first starting a channel.
      This makes channel startup a lot more reliable, probably because it allows
      the internal state machine to settle before the requests from the IPU are
      coming in.
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      [p.zabel@pengutronix.de: rebased before switch to runtime PM]
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      263c3b80
    • P
      gpu: ipu-v3: Allow channel burst locking on i.MX6 only · cda77556
      Philipp Zabel 提交于
      The IDMAC_LOCK_EN registers on i.MX51 have a different layout, and on
      i.MX53 enabling the lock feature causes bursts to get lost. Restrict
      enabling the burst lock feature to i.MX6.
      Reported-by: NPatrick Brünn <P.Bruenn@beckhoff.com>
      Fixes: 790cb4c7 ("drm/imx: lock scanout transfers for consecutive bursts")
      Tested-by: NPatrick Brünn <P.Bruenn@beckhoff.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      cda77556
    • T
      PCI: aardvark: Move to struct pci_host_bridge IRQ mapping functions · 407dae1e
      Thomas Petazzoni 提交于
      struct pci_host_bridge gained hooks to map/swizzle IRQs, so that the IRQ
      mapping can be done automatically by PCI core code through the
      pci_assign_irq() function instead of resorting to arch-specific
      implementation callbacks to carry out the same task which force PCI host
      bridge drivers implementation to implement per-arch kludges to carry out a
      task that is inherently architecture agnostic.
      
      Commit 769b461f ("arm64: PCI: Drop DT IRQ allocation from
      pcibios_alloc_irq()") was assuming all PCI host controller drivers had been
      converted to use ->map_irq(), but that wasn't the case: pci-aardvark had
      not been converted. Due to this, it broke the support for legacy PCI
      interrupts when using the pci-aardvark driver (used on Marvell Armada 3720
      platforms).
      
      In order to fix this, we make sure the ->map_irq and ->swizzle_irq fields
      of pci_host_bridge are properly filled in.
      
      Fixes: 769b461f ("arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq()")
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org	# v4.13+
      407dae1e
    • T
      Revert "PCI: tegra: Do not allocate MSI target memory" · 8c2b4e3c
      Thierry Reding 提交于
      This reverts commit d7bd554f.
      
      It turns out that Tegra20 has a bug in the implementation of the MSI
      target address register (which is worked around by the existence of the
      struct tegra_pcie_soc.msi_base_shift parameter) that restricts the MSI
      target memory to the lower 32 bits of physical memory on that particular
      generation. The offending patch causes a regression on TrimSlice, which
      is a Tegra20-based device and has a PCI network interface card.
      
      An initial, simpler fix was to change the MSI target address for Tegra20
      only, but it was pointed out that the offending commit also prevents the
      use of 32-bit only MSI capable devices, even on later chips. Technically
      this was never guaranteed to work with the prior code in the first place
      because the allocated page could have resided beyond the 4 GiB boundary,
      but it is still possible that this could've introduced a regression.
      
      The proper fix that was settled on is to select a fixed address within
      the lowest 32 bits of physical address space that is otherwise unused,
      but testing of that patch has provided mixed results that are not fully
      understood yet.
      
      Given all of the above and the relative urgency to get this fixed in
      v4.13, revert the offending commit until a universal fix is found.
      
      Fixes: d7bd554f ("PCI: tegra: Do not allocate MSI target memory")
      Reported-by: NTomasz Maciej Nowak <tmn505@gmail.com>
      Reported-by: NErik Faye-Lund <kusmabite@gmail.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org	# 4.13.x
      8c2b4e3c
    • A
      remoteproc: qcom: fix RPMSG_QCOM_GLINK_SMEM dependencies · ab759b97
      Arnd Bergmann 提交于
      When RPMSG_QCOM_GLINK_SMEM=m and one driver causes the qcom_common.c file
      to be compiled as built-in, we get a link error:
      
      drivers/remoteproc/qcom_common.o: In function `glink_subdev_remove':
      qcom_common.c:(.text+0x130): undefined reference to `qcom_glink_smem_unregister'
      qcom_common.c:(.text+0x130): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_unregister'
      drivers/remoteproc/qcom_common.o: In function `glink_subdev_probe':
      qcom_common.c:(.text+0x160): undefined reference to `qcom_glink_smem_register'
      qcom_common.c:(.text+0x160): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_register'
      
      Out of the three PIL driver instances, QCOM_ADSP_PIL already has a
      Kconfig dependency to prevent this from happening, but the other two
      do not. This adds the same dependency there.
      
      Fixes: eea07023 ("remoteproc: qcom: adsp: Allow defining GLINK edge")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      ab759b97
    • D
      remoteproc: imx_rproc: fix a couple off by one bugs · 68c2d645
      Dan Carpenter 提交于
      The priv->mem[] array has IMX7D_RPROC_MEM_MAX elements so the > should
      be >= to avoid writing one element beyond the end of the array.
      
      Fixes: a0ff4aa6 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      68c2d645
    • D
      rpmsg: glink: Fix memory leak in qcom_glink_alloc_intent() · b775d158
      Dan Carpenter 提交于
      We need to free "intent" and "intent->data" on a couple error paths.
      
      Fixes: 933b45da ("rpmsg: glink: Add support for TX intents")
      Acked-by: NSricharan R <sricharan@codeaurora.org>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      b775d158