Commit Graph

810577 Commits

Author SHA1 Message Date
Linus Torvalds 385c59c7ba drm: amdgpu + tc358767 bridge + amd mst s/r fix
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJcN/qLAAoJEAx081l5xIa+9s4P/ikYjcOxwfScwGnx3Pme6aem
 yrFNYxDQUwSeXhiTEkurwTTrJ+dOBLJlxZo1GceYy7smfz391Qol4bmzz136aROa
 K2IG+Tz2UjtOM5v6a8A04e5hf1pdazSXoL39y6s4gYsrZ34Eg5Wr5m0KyL6pp9bO
 xmvG+ksSz4yRQFkrFBb9V5OHvJCiDx9Wzt8PogR3aH5AOTUf7aMeD6w1RBDbZpO6
 JXthAeFypEUb1+epxmtXvr3UPfvQNoqHbmf0Mzan9NZDlAfc/2FIxVSwrWSNyg5U
 jYl3McYWFLEzufh5YK5Jwu20Zo7++i8sy4U5mq6UOLDljhiM5qLKPG16R61cU54j
 8jou2Uxr9nOoqp+J2iTvKy/dzTjsrwoHtHI6JpblK7TP97He0QvwXzhJCa2fAOeC
 VI2rvSubbrvPdFDHw3l09ub6kQKXANrPT0pB1rY+rdZa9b85YU5p5mHewLka+Iul
 3k2z/byezoYsvkOsVhuvR/m6P+sTYpft1RRf14T89J/GlHjDAsEqS/qp71pSy9CU
 C/a1CG9VL8CPQO2cmwCR38f+UhXZUNiUZXWQTmv1BVbm7cAnhDKtJxx4CmZSzPDj
 3hzYTKjzyQUnKEDRL7doWfTDV0Wr61TWDhAh93rwHZ2qJgY1HdoQ5uFXV2P0VgLW
 JI2PHiDd9fVBSN7NpT6w
 =Mq91
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Not a huge amount for rc2, assume the usual quiet period, and rc3 will
  be most of it.

  amdgpu:
   - Powerplay fixes
   - Virtual display pinning fixes
   - Golden register updates for Vega
   - Pitch and gem size validation fixes
   - SR-IOV init error fix
   - Pagetables in system RAM disable for some Raven system
   - DP-MST resume fixes

  tc358767 bridge:
   - fix to work with displayport connector"

* tag 'drm-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm: (26 commits)
  drm/amdgpu: disable system memory page tables for now
  drm/amdgpu: set WRITE_BURST_LENGTH to 64B to workaround SDMA1 hang
  drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20
  drm/bridge: tc358767: use DP connector if no panel set
  drm/bridge: tc358767: fix output H/V syncs
  drm/bridge: tc358767: reject modes which require too much BW
  drm/bridge: tc358767: fix initial DP0/1_SRCCTRL value
  drm/bridge: tc358767: fix single lane configuration
  drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE
  drm/bridge: tc358767: add bus flags
  drm/dp_mst: Add __must_check to drm_dp_mst_topology_mgr_resume()
  drm/amdgpu: Don't fail resume process if resuming atomic state fails
  drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume()
  drm/amdgpu: validate user GEM object size
  drm/amdgpu: validate user pitch alignment
  drm/amd/powerplay: drop the unnecessary uclk hard min setting
  drm/amd/powerplay: avoid possible buffer overflow
  drm/amd/powerplay: create pp_od_clk_voltage device file under OD support
  drm/amd/powerplay: update OD support flag for SKU with no OD capabilities
  drm/amdgpu: make gfx9 enter into rlc safe mode when set MGCG
  ...
2019-01-11 08:58:02 -08:00
Dmitry Safonov d3736d82e8 tty: Don't hold ldisc lock in tty_reopen() if ldisc present
Try to get reference for ldisc during tty_reopen().
If ldisc present, we don't need to do tty_ldisc_reinit() and lock the
write side for line discipline semaphore.
Effectively, it optimizes fast-path for tty_reopen(), but more
importantly it won't interrupt ongoing IO on the tty as no ldisc change
is needed.
Fixes user-visible issue when tty_reopen() interrupted login process for
user with a long password, observed and reported by Lukas.

Fixes: c96cf923a9 ("tty: Don't block on IO when ldisc change is pending")
Fixes: 83d817f410 ("tty: Hold tty_ldisc_lock() during tty_reopen()")
Cc: Jiri Slaby <jslaby@suse.com>
Reported-by: Lukas F. Hartmann <lukas@mntmn.com>
Tested-by: Lukas F. Hartmann <lukas@mntmn.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-11 17:03:42 +01:00
Steve French 48d2ba6257 cifs: update internal module version number
To 2.16

Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Pavel Shilovsky 9a66396f18 CIFS: Fix error paths in writeback code
This patch aims to address writeback code problems related to error
paths. In particular it respects EINTR and related error codes and
stores and returns the first error occurred during writeback.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Pavel Shilovsky ee258d7915 CIFS: Move credit processing to mid callbacks for SMB3
Currently we account for credits in the thread initiating a request
and waiting for a response. The demultiplex thread receives the response,
wakes up the thread and the latter collects credits from the response
buffer and add them to the server structure on the client. This approach
is not accurate, because it may race with reconnect events in the
demultiplex thread which resets the number of credits.

Fix this by moving credit processing to new mid callbacks that collect
credits granted by the server from the response in the demultiplex thread.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Pavel Shilovsky 8a26f0f781 CIFS: Fix credits calculation for cancelled requests
If a request is cancelled, we can't assume that the server returns
1 credit back. Instead we need to wait for a response and process
the number of credits granted by the server.

Create a separate mid callback for cancelled request, parse the number
of credits in a response buffer and add them to the client's credits.
If the didn't get a response (no response buffer available) assume
0 credits granted. The latter most probably happens together with
session reconnect, so the client's credits are adjusted anyway.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Ross Lagerwall b9a74cde94 cifs: Fix potential OOB access of lock element array
If maxBuf is small but non-zero, it could result in a zero sized lock
element array which we would then try and access OOB.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
2019-01-11 07:14:40 -06:00
Ross Lagerwall 92a8109e4d cifs: Limit memory used by lock request calls to a page
The code tries to allocate a contiguous buffer with a size supplied by
the server (maxBuf). This could fail if memory is fragmented since it
results in high order allocations for commonly used server
implementations. It is also wasteful since there are probably
few locks in the usual case. Limit the buffer to be no larger than a
page to avoid memory allocation failures due to fragmentation.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Aurelien Aptel 15bc77f94e cifs: move large array from stack to heap
This addresses some compile warnings that you can
see depending on configuration settings.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:39 -06:00
Pavel Shilovsky ee13919c2e CIFS: Do not hide EINTR after sending network packets
Currently we hide EINTR code returned from sock_sendmsg()
and return 0 instead. This makes a caller think that we
successfully completed the network operation which is not
true. Fix this by properly returning EINTR to callers.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:13:05 -06:00
Gustavo A. R. Silva 21face6f0d ARM: integrator: impd1: use struct_size() in devm_kzalloc()
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    void *entry[];
};

instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
2019-01-11 13:33:00 +01:00
AKASHI Takahiro 279667212a arm64: kexec_file: return successfully even if kaslr-seed doesn't exist
In kexec_file_load, kaslr-seed property of the current dtb will be deleted
any way before setting a new value if possible. It doesn't matter whether
it exists in the current dtb.

So "ret" should be reset to 0 here.

Fixes: commit 884143f60c ("arm64: kexec_file: add kaslr support")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-01-11 10:10:51 +00:00
Jean-Philippe Brucker c7777236dd ACPI/IORT: Fix rc_dma_get_range()
When executed for a PCI_ROOT_COMPLEX type, iort_match_node_callback()
expects the opaque pointer argument to be a PCI bus device. At the
moment rc_dma_get_range() passes the PCI endpoint instead of the bus,
and we've been lucky to have pci_domain_nr(ptr) return 0 instead of
crashing. Pass the bus device to iort_scan_node().

Fixes: 5ac65e8c89 ("ACPI/IORT: Support address size limit for root complexes")
Reported-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Cc: stable@vger.kernel.org
Cc: Will Deacon <will.deacon@arm.com>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-01-11 10:02:59 +00:00
Greg Kroah-Hartman 06382deac2 Revert "staging: rtl8723bs: Mark ACPI table declaration as used"
This reverts commit e6d093719e.

Turns out it is not needed at all, a fix for clang was made and accepted
upstream in that project that makes this change unnecessary.  So revert
it.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-11 10:40:13 +01:00
Daniel Vetter e2d3c414ec Merge tag 'drm-intel-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
i915 fixes for v5.0-rc2:
- Disable PSR for Apple panels
- Broxton ERR_PTR error state fix
- Kabylake VECS workaround fix
- Unwind failure on pinning the gen7 ppgtt
- GVT workload request allocation fix

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87pnt35z8h.fsf@intel.com
2019-01-11 10:26:21 +01:00
Daniel Vetter 95681cda8d Second pull request, drm-misc-fixes for v5.0-rc2:
- Fix fb-helper to work correctly with SDL 1.2 bugs.
 - Fix lockdep warning in the atomic ioctl and setproperty.
 From first pull request:
 - Fixes for the tc358767 bridge to work correctly with
   tc358867 using a DP connector.
 - Make resume work on amdgpu when a DP-MST display is unplugged.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAlw3T9MACgkQ/lWMcqZw
 E8NkNRAAp4ctGFP/1Q02Y+Eqc/lfP+K0+6/olUt3xg7mj9NPG/5ZV0GtKGQ9fR2+
 px22Fvb9ZetrnjbuwgQ0lkaOYBjB4S9PBPBnZS0HDRw6AOBvPBEcZSdYiOgkH2FX
 Lwm3G98Ue/4H8IEK2QvHNFyoqyKy+M5a1mzuXfuYfBdf/u3pZnbZZMs2fSd6C6vn
 A1D6qqdU5z0rMLPSAQ+up48u+R13MX2khL0x8Zwt2RhhHFAJ49o6S/Wgy6TkpNFp
 q3l2+ltWyEKZaLW6Aun8yLYZHn0PH88rpVB6QWx7UZqhHP2xyyuWZCRaE/HWD6dx
 PfSevNJTYF9m8H6kOek5MTy+VUo4IRfxPvfe/sEnLeYd6mVd/I2ov9jf9Zbl6HoZ
 RfKqNqJsXMekyl2vK56GRDK3Li+eUwygtyRcfQINV5pvOomWQC+A6X/CtoN2g8Zw
 4SNRJ3lnUiJhFK8aazK+k1o3AkYPdPtSCgxpqCYpUVqZ05V1cdl7EFtA4ZsZedxu
 1VoPlUS07uG/wP9AdONkmo/5aRjpWY0FGJ/ZZS6CqOKO0F5qgXjZdDkbc/4M5WV0
 2SVwi3fGCrzFg5uIoM/3iAEXEdPYAMkqmX1etjeqmejWTxlg0relCY1Q6s4tTLMI
 4isql765+ydZxk6qC2eHxohtgq5AnLUtgaqqiHZPbf4nn/s4edo=
 =7UHP
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2019-01-10-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Second pull request, drm-misc-fixes for v5.0-rc2:
- Fix fb-helper to work correctly with SDL 1.2 bugs.
- Fix lockdep warning in the atomic ioctl and setproperty.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2cf24f5c-2b1f-befa-8d08-058661146b61@linux.intel.com
2019-01-11 10:25:06 +01:00
Rafael J. Wysocki 65a4f3a1ef Merge branches 'acpi-pci', 'acpi-power' and 'acpi-misc'
* acpi-pci:
  ACPI: Fix build failure when CONFIG_NLS is set to 'n'

* acpi-power:
  ACPI: power: Skip duplicate power resource references in _PRx

* acpi-misc:
  ACPI: NUMA: Use correct type for printing addresses on i386-PAE
2019-01-11 10:12:07 +01:00
Rafael J. Wysocki 343e60e52a Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-sleep'
* pm-cpuidle:
  doc: trace: fix reference to cpuidle documentation file
  cpuidle / Documentation: Update cpuidle MAINTAINERS entry

* pm-cpufreq:
  cpufreq: scmi: Fix frequency invariance in slow path
  cpufreq: check if policy is inactive early in __cpufreq_get()
  cpufreq: scpi/scmi: Fix freeing of dynamic OPPs
  cpufreq / Documentation: Update cpufreq MAINTAINERS entry

* pm-sleep:
  PM: sleep: call devfreq suspend/resume
2019-01-11 10:09:51 +01:00
Dave Airlie ae5e5ae90d Merge branch 'linux-4.21' of git://github.com/skeggsb/linux into drm-fixes
3 nouveau fixes:
one backlight, falcon register access, and a fan fix.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Ben Skeggs <skeggsb@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv4MHr=Rq3FkZFTYWPc7o5-dTWFysXB=wN2L91SYeFbzkQ@mail.gmail.com
2019-01-11 17:25:10 +10:00
Ingo Molnar 4e72ee8872 perf/core fixes and improvements:
perf trace:
 
   Ravi Bangoria:
 
   - Rework PowerPC syscall table generation, now using a .tbl file just like
     x86_64 and S/390, also silencing a tools build warning about headers out of
     sync with the kernel sources.
 
 tools include uapi:
 
   Arnaldo Carvalho de Melo:
 
   - Sync linux/if_link.h copy with the kernel sources, silencing a build warning.
 
 perf top:
 
   Arnaldo Carvalho de Melo:
 
   - Add 'arch_cpu_idle' to the list of kernel idle symbols, noticed on a Orange
     Pi Zero ARM board, just like with other symbols in other arches.
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCXDd1iAAKCRCyPKLppCJ+
 J2G4AP9Ap7B1GKHJK1f9niTjTa249SKZtpXSKSkMfFJNjQAT+wD8C0+MrmjhywVv
 FoiaCMn/KPNNslPSXwhzrG3DXDSqIQg=
 =9St5
 -----END PGP SIGNATURE-----

Merge tag 'perf-core-for-mingo-5.0-20190110' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/core fixes and improvements from Arnaldo Carvalho de Melo:

perf trace:

  Ravi Bangoria:

  - Rework PowerPC syscall table generation, now using a .tbl file just like
    x86_64 and S/390, also silencing a tools build warning about headers out of
    sync with the kernel sources.

tools include uapi:

  Arnaldo Carvalho de Melo:

  - Sync linux/if_link.h copy with the kernel sources, silencing a build warning.

perf top:

  Arnaldo Carvalho de Melo:

  - Add 'arch_cpu_idle' to the list of kernel idle symbols, noticed on a Orange
    Pi Zero ARM board, just like with other symbols in other arches.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-01-11 08:12:09 +01:00
Ilia Mirkin a5176a4cb8 drm/nouveau/falcon: avoid touching registers if engine is off
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-01-11 16:25:54 +10:00
Takashi Iwai 118780066e drm/nouveau: Don't disable polling in fallback mode
When a fan is controlled via linear fallback without cstate, we
shouldn't stop polling.  Otherwise it won't be adjusted again and
keeps running at an initial crazy pace.

Fixes: 800efb4c28 ("drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios")
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1103356
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107447
Reported-by: Thomas Blume <thomas.blume@suse.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-01-11 16:25:54 +10:00
Ben Skeggs 15f77c4ade drm/nouveau: register backlight on pascal and newer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-01-11 16:25:54 +10:00
Sowjanya Komatineni b67d4530cd i2c: tegra: Fix Maximum transfer size
Tegra194 supports maximum 64K Bytes transfer per packet.
Tegra186 and prior supports maximum 4K Bytes transfer per packet.

This patch fixes this payload difference between Tegra194 and prior
Tegra chipsets using separate i2c_adapter_quirks.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-11 00:15:04 +01:00
Yi Zeng 6ebec961d5 i2c: dev: prevent adapter retries and timeout being set as minus value
If adapter->retries is set to a minus value from user space via ioctl,
it will make __i2c_transfer and __i2c_smbus_xfer skip the calling to
adapter->algo->master_xfer and adapter->algo->smbus_xfer that is
registered by the underlying bus drivers, and return value 0 to all the
callers. The bus driver will never be accessed anymore by all users,
besides, the users may still get successful return value without any
error or information log print out.

If adapter->timeout is set to minus value from user space via ioctl,
it will make the retrying loop in __i2c_transfer and __i2c_smbus_xfer
always break after the the first try, due to the time_after always
returns true.

Signed-off-by: Yi Zeng <yizeng@asrmicro.com>
[wsa: minor grammar updates to commit message]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
2019-01-11 00:14:55 +01:00
Fabio Estevam 2076607a20 qcom-scm: Include <linux/err.h> header
Since commit e6f6d63ed1 ("drm/msm: add headless gpu device for imx5")
the DRM_MSM symbol can be selected by SOC_IMX5 causing the following
error when building imx_v6_v7_defconfig:

In file included from ../drivers/gpu/drm/msm/adreno/a5xx_gpu.c:17:0:
../include/linux/qcom_scm.h: In function 'qcom_scm_set_cold_boot_addr':
../include/linux/qcom_scm.h:73:10: error: 'ENODEV' undeclared (first use in this function)
  return -ENODEV;

Include the <linux/err.h> header file to fix this problem.

Reported-by: kernelci.org bot <bot@kernelci.org>
Fixes: e6f6d63ed1 ("drm/msm: add headless gpu device for imx5")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2019-01-10 17:04:45 -06:00
Jens Axboe a39c330d74 Merge branch 'nvme-5.0' of git://git.infradead.org/nvme into for-linus
Pull NVMe fixes from Christoph.

* 'nvme-5.0' of git://git.infradead.org/nvme:
  nvme: don't initlialize ctrl->cntlid twice
  nvme: introduce NVME_QUIRK_IGNORE_DEV_SUBNQN
  nvme: pad fake subsys NQN vid and ssvid with zeros
  nvme-multipath: zero out ANA log buffer
  nvme-fabrics: unset write/poll queues for discovery controllers
  nvme-tcp: don't ask if controller is fabrics
  nvme-tcp: remove dead code
  nvme-pci: fix out of bounds access in nvme_cqe_pending
  nvme-pci: rerun irq setup on IO queue init errors
  nvme-pci: use the same attributes when freeing host_mem_desc_bufs.
  nvme-pci: fix the wrong setting of nr_maps
2019-01-10 15:29:57 -07:00
Linus Torvalds de6629eb26 pci-v5.0-fixes-1
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAlw3tTMUHGJoZWxnYWFz
 QGdvb2dsZS5jb20ACgkQWYigwDrT+vwr5A//fhTsrQw72rWinli5YRq5tDooyrY7
 IxgUUQw812S7q60bV3Eo5UvcKMfb8vLbFSmjdfHegNC9oOl8HG1ugQjme1IUQ6c1
 hLYroDD85vC+Hmk2NoHyLiDDj51UCjarDlqt8XjbeGSc9YkZhYLXO+MLHJhJFkMM
 IIvshG6vQtBKbvhC6X3kzAfSiFX7QbPHL47QRnDJ4G0rASBNO0iiJi6t+zY/5gee
 Q0V+7BWnknNhfXPhGuA2H3nvZrmGOJxcmeZRZ8/u6DIvUqXH1bCm1hfjMpEkFivo
 y4be8I/1+jrlLS85iGK4pAz/ItSEbvdoB4d3+cG9XXkuL2qjSEo3Q4T+HuIb7zGj
 WsbPP1sV3+nMmQ5FlEHMIMxu2oL1EQ+GITwNoluT4i8IYKD6jjyP3LIzKrPIHQPY
 77uMBY2V7F9fWIrN/QJIvJxTvW7hnkH99xDniAfu9pogrmaALG59IpQl9GgRVrtm
 gUc5eA2SgYlZEKpuwgh20io+nJGt2V4twuIicpNR3ea6cFY6HJ5UujO5UD/CGXCE
 bpO0d673rmzNHhUiXdrqeRWIrLTNlq9FwfovxnLmErtzkiA6uHs7Oopu+yipQDzx
 YADJY3VargzAKJcci969RrJMtzt6J8HjN+/XGG+BbLymj/krhpSnszP+T1QZ8tER
 buz3wwge5ZT3HFc=
 =PX/M
 -----END PGP SIGNATURE-----

Merge tag 'pci-v5.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "Fix Amlogic Meson host controller driver build failure (Corentin
  Labbe)"

* tag 'pci-v5.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: amlogic: Fix build failure due to missing gpio header
2019-01-10 14:16:47 -08:00
Dave Airlie f34c48e06d Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
- Powerplay fixes
- Virtual display pinning fixes
- Golden register updates for vega
- Pitch and gem size validation fixes
- Fix for error case in sr-iov init
- Disable page tables in system memory on RV due to issues with IOMMU
  reported on some platforms

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190109204336.3315-1-alexander.deucher@amd.com
2019-01-11 07:38:56 +10:00
Linus Torvalds 4f548c25a3 RISC-V Updates for 4.21-rc2 v2
This tag contains a handful of updates that slipped through the cracks
 during the merge window due to the holidays.  The fixes are mostly
 independent, with the exception of one larger audit-related branch.
 There's more information about the audit branch in that merge, the rest
 are:
 
 * The BSS has been moved, which shrinks flat images.
 * A fix to test-bpf so it compiles on RV64I-based systems.
 * A fix to respect the kernel commandline when there is no device tree.
 * A fix to prevent CPUs from trying to put themselves to sleep when
   bringing down the system.
 * Support for MODULE_SECTIONS on RV32I-based systems.
 * [new in v2] The addition of an SBI earlycon driver.  This is
   definately a new feature, but I'd like to include it now because I
   dropped this patch when submitting the merge window PR that removed our
   EARLY_PRINTK support.
 
 As usual, I've tested this by booting a Fedora-based image on a recent
 QEMU (this time just whatever I had lying around).
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEAM520YNJYN/OiG3470yhUCzLq0EFAlw2fYgTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRDvTKFQLMurQaNXD/47mGXSTUWfGeW9eHh1zFYMyYWertgs
 +nB0Gkmja2sUs5DHW+JFg5TPqKw8EAK3bgrjSrFXTGBRdGeCXcHDoK0n8cQ8eL2C
 smxO2ye18db+zP76loDmvAugKsguPa0Ne7aE/aZ0qaMPQH2c6kIYgNIE09ozQWTb
 yfk/srhgQvu6WFT8dhjqK1YtCE4qPB1U7UMno3TgL/DjRQr0+uNz9MUU4kRkxEl4
 fEtV7rhDUF6gwfb4WAvlTxBrxg/ZbytHXk9swedNDLfIP2vq5C6ALtGnPBshKHWZ
 z+splwYP0g/BZ4/lXJr4vIfxS+6OuFuR8eHCh/stFijL6TkpDZOOjAb576nrpiPT
 On1h6G5/6UIGTApgDhq27FJ6s3om2gw2XiM7kbl1DoDHT4giDB6c/eK2IASRd4zC
 FHk8ya+GBdp9QFJJyL6YX392nRFEg9pLRGMYEwrvcpn5v8jz3umozv2WnWwamiR0
 kwKBJrcj2Oii5a3aBoa2EdMomC1KHNF5nKoN5W6AozIzSSLOx0wSr58ULLoGC/2h
 8Mn8hfyUCs+v+5SnXk5drrV8mXBsWAEsOPZfsnw6RUqGsjEysj9Z2UEtYY8WLPM3
 GDpsXGK1nLzgusvUoITBJi+k4zNs9mP7PBtfEHBsPH/ij5R9doCvSGco4YOXONdp
 i5ToKwmFDBJTOw==
 =WPnn
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-4.21-rc2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux

Pull RISC-V updates from Palmer Dabbelt:
 "This tag contains a handful of updates that slipped through the cracks
  during the merge window due to the holidays. The fixes are mostly
  independent, with the exception of one larger audit-related branch.

  Core RISC-V updates:

   - The BSS has been moved, which shrinks flat images.

   - A fix to test-bpf so it compiles on RV64I-based systems.

   - A fix to respect the kernel commandline when there is no device
     tree.

   - A fix to prevent CPUs from trying to put themselves to sleep when
     bringing down the system.

   - Support for MODULE_SECTIONS on RV32I-based systems.

   - [new in v2] The addition of an SBI earlycon driver. This is
     definately a new feature, but I'd like to include it now because I
     dropped this patch when submitting the merge window PR that removed
     our EARLY_PRINTK support.

  RISC-V audit updates:

   - The addition of NR_syscalls into unistd.h, which is necessary for
     CONFIG_FTRACE_SYSCALLS.

   - The definition of CREATE_TRACE_POINTS so __tracepoint_sys_{enter,exit}
     get defined.

   - A fix for trace_sys_exit() so we can enable HAVE_SYSCALL_TRACEPOINTS

  As usual, I've tested this by booting a Fedora-based image on a recent
  QEMU (this time just whatever I had lying around).

* tag 'riscv-for-linus-4.21-rc2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
  tty/serial: Add RISC-V SBI earlycon support
  riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig
  riscv: fix trace_sys_exit hook
  riscv: define CREATE_TRACE_POINTS in ptrace.c
  riscv: define NR_syscalls in unistd.h
  riscv: audit: add audit hook in do_syscall_trace_enter/exit()
  riscv: add audit support
  RISC-V: Support MODULE_SECTIONS mechanism on RV32
  MAINTAINERS: SiFive drivers: add myself as a SiFive driver maintainer
  MAINTAINERS: SiFive drivers: change the git tree to a SiFive git tree
  riscv: don't stop itself in smp_send_stop
  arch: riscv: support kernel command line forcing when no DTB passed
  tools uapi: fix RISC-V 64-bit support
  RISC-V: Make BSS section as the last section in vmlinux.lds.S
2019-01-10 13:36:53 -08:00
Dave Airlie bd86c9e66c Pull request for drm-misc-fixes for v5.0-rc2:
- Fixes for the tc358767 bridge to work correctly with
   tc358867 using a DP connector.
 - Make resume work on amdgpu when a DP-MST display is unplugged.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAlw2660ACgkQ/lWMcqZw
 E8Oe6xAAtgfGxm9swLsRqoLl/vhevtjJ4VylFH8Z+P5wOpQ/nbcFu/dIAk9+4GUh
 uqzm71t4Fw1Guv9eKJeWn2hztvlgRMygC+hGaHfEsMheKEo48d+5hA6IJKT00qo0
 sFDdNxvbTWHa7hamC2b5EK18PKlq1eRxatDCHUbaOAOIe+vdonu9xYD8aKQvEo0P
 ZjfgZHYHVmUNn1L3rO0X9GadDIDEL6NajYvU6PcqFmkREUiEKpAeIsPf6xQeOjUy
 32IoGJ7sI1ZCT9KDOoDCpL2E7ILGLDgiQnwZkjePuTdDwcz0XijAfOLICI5xs3zG
 VXi4ZrfeaoxguETEfJcDhg4lZFSeBL9zxfN1WJ7Z9njUj4sbKD31mTWnV0gIXniW
 U8+qI5qJQ3ynkVzJP1+HvQxtoesZ7wQxB9Kr6xa4oASr1+FbbSQUOOe0232ZCjUk
 AG9MgC69uac1//yfLXVCvy1DosS4QWWfUf5tDlKi5hKebkPw+3XzlHwHzhlPxrOf
 HlJQ6TMTAgqFNbKkF+CgHYBh3sMmJuc7ps6ee/z6D9FOiRYO5LZWMlz6THd+1fJ3
 3Zj56J7gbiugaEqyskiwRBLZNy4sfu7kwl+CWWpJNegj0AzZ8Sk8NDwht4oY8dA5
 z//4Xe3+dxkDVAjcJ37KGU2vvVHyGvmOHkmRyIt30MjoTxpKztk=
 =JBCs
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2019-01-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Pull request for drm-misc-fixes for v5.0-rc2:
- Fixes for the tc358767 bridge to work correctly with
  tc358867 using a DP connector.
- Make resume work on amdgpu when a DP-MST display is unplugged.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1c47722d-c416-184d-4340-0dc6a614d685@linux.intel.com
2019-01-11 06:32:44 +10:00
Pavel Shilovsky 8544f4aa9d CIFS: Fix credit computation for compounded requests
In SMB3 protocol every part of the compound chain consumes credits
individually, so we need to call wait_for_free_credits() for each
of the PDUs in the chain. If an operation is interrupted, we must
ensure we return all credits taken from the server structure back.

Without this patch server can sometimes disconnect the session
due to credit mismatches, especially when first operation(s)
are large writes.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
2019-01-10 14:32:38 -06:00
Pavel Shilovsky 33fa5c8b8a CIFS: Do not set credits to 1 if the server didn't grant anything
Currently we reset the number of total credits granted by the server
to 1 if the server didn't grant us anything int the response. This
violates the SMB3 protocol - we need to trust the server and use
the credit values from the response. Fix this by removing the
corresponding code.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
2019-01-10 14:32:36 -06:00
Pavel Shilovsky b983f7e923 CIFS: Fix adjustment of credits for MTU requests
Currently for MTU requests we allocate maximum possible credits
in advance and then adjust them according to the request size.
While we were adjusting the number of credits belonging to the
server, we were skipping adjustment of credits belonging to the
request. This patch fixes it by setting request credits to
CreditCharge field value of SMB2 packet header.

Also ask 1 credit more for async read and write operations to
increase parallelism and match the behavior of other operations.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
2019-01-10 14:32:32 -06:00
Dan Carpenter c715f89c4d cifs: Fix a tiny potential memory leak
The most recent "it" allocation is leaked on this error path.  I
believe that small allocations always succeed in current kernels so
this doesn't really affect run time.

Fixes: 54be1f6c1c ("cifs: Add DFS cache routines")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-10 14:32:30 -06:00
Dan Carpenter 8428817dc4 cifs: Fix a debug message
This debug message was never shown because it was checking for NULL
returns but extract_hostname() returns error pointers.

Fixes: 93d5cb517d ("cifs: Add support for failover in cifs_reconnect()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
2019-01-10 14:32:27 -06:00
Will Deacon b89d82ef01 arm64: kpti: Avoid rewriting early page tables when KASLR is enabled
A side effect of commit c55191e96c ("arm64: mm: apply r/o permissions
of VM areas to its linear alias as well") is that the linear map is
created with page granularity, which means that transitioning the early
page table from global to non-global mappings when enabling kpti can
take a significant amount of time during boot.

Given that most CPU implementations do not require kpti, this mainly
impacts KASLR builds where kpti is forcefully enabled. However, in these
situations we know early on that non-global mappings are required and
can avoid the use of global mappings from the beginning. The only gotcha
is Cavium erratum #27456, which we must detect based on the MIDR value
of the boot CPU.

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: John Garry <john.garry@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-01-10 17:49:35 +00:00
Linus Torvalds 1bdbe22749 VFIO fixes for v5.0-rc2
- Fix trace header include path for in-tree builds (Masahiro Yamada)
 
  - Fix overflow in unmap wrap-around test (Alex Williamson)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJcN3STAAoJECObm247sIsiY2cP/AtWyCbCe+7z59DVEbfXjnBq
 DNQ1wZRGdljlw0GF9quGwkrgLDeqktBnnZslHEKHPLad9/YvsScpgQCZasHXCudT
 LpixVONSwPi2bH28W+sPgzj8Vh3B9LjjZcwdOKicUdlKCbm3iKhhwLMsmTs5ZmO1
 kQcSB6GkWTnqda5NTL1gHfVi8ej7MRf0HXElYA7bPBuBY/Dc/a4i49kziHk4MpD3
 uLfpJkmJ97IWZaP5JXtSjskqvdoqCPic7FtH6/BOxt0EKktmzDmg8+UhpG9SF47E
 CJaqWUSTWMado7Dw1qSrnpa60DjFtj6j/j6Wfg7fdN+UHXUcoNMjsSDL855o/QWq
 kHLqSqn0yKMctWvk1KjV6WF7Kud44OViLOSKIlm5hVPNahCB6ZtZUp08DZmDxrIw
 1utbG9PiD0iCEV4cbFPtObvopFdF4wgOWKeEIcxwevOkxGXBuAVMzsItAxtoDYBy
 4tJGNKPpS5tmTUbc+mkyK5BDKBy0ZJfTr7fknsK/yMBwr/DemuyZnYzEV6AmX+zV
 yfHg9YHnPqZJ5BEy3WKHaeuhHwaiI2V+D0SOm5MkePzCFnAzisFRQcvyh6oMXPNW
 +vaaKnYABsSeCeX1snwJU2rxDhac/4bzHxPTHXkNz3Smscy5sqJzyIciURs4qg7S
 4llvBFL4mVgkWoCkTxWf
 =ywyo
 -----END PGP SIGNATURE-----

Merge tag 'vfio-v5.0-rc2' of git://github.com/awilliam/linux-vfio

Pull VFIO fixes from Alex Williamson:

 - Fix trace header include path for in-tree builds (Masahiro Yamada)

 - Fix overflow in unmap wrap-around test (Alex Williamson)

* tag 'vfio-v5.0-rc2' of git://github.com/awilliam/linux-vfio:
  vfio/type1: Fix unmap overflow off-by-one
  vfio/pci: set TRACE_INCLUDE_PATH to fix the build error
2019-01-10 09:20:46 -08:00
Linus Torvalds f0ebbe9b18 sound fixes for 5.0-rc2
A collection of small fixes for USB-audio, HD-audio and cs46xx.
 The USB-audio fixes are for out-of-bound accesses and a regression
 in the recent cleanup, while HD-audio fixes are usual device-
 specific quirks.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAlw3TUMOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+sxA/+KzAzchEh/8nlK/8ZQvSN79AA2K2H0c7fdt2v
 OSXiSNf8tGSxtH57exJf+lV3WPxkjIhtjVP0MSOPs1RShg6rHqdbsd78cRzkD+wk
 8eIOHE8Epe3zgIbkBMCymqq1oDmQ5OfRNMdLYsEfjzd6VBbXSqTBmjMXZ8fQ1Pjj
 fJ+zVIBWBjDBTM/OmvSDalwGEOI0jaYDaR1wuzbU8vmhEmGptWEQklHJVuXXyJPl
 ZRdPx6FQ3uLWvsQ+4SZi4BR2PYyFs4D4XH9Gq9kdL0fKZsmYf5i07q1zut/aRhcD
 Hh8ofd8caXIFR3rsYcIeo7xkRmuY8zGlJP5uQmteCKZ8ygC1bX9ukXaH+6BPrV/7
 9fEruSajChW6fxTB6qlj3n3kr8lKpzD1X6PuBY9xcDojarx97Q00vw2g55CJygUb
 meKQY5NSPClJ1kIOuveJ5tr2Jli6aRtB0dw0mGPC4jdQ389DM5VUKK52SBCUFIO8
 ROSDB8XDpqS/pJ0iKraZQFxrYUWO4/gHzMCT1otsAM35Lm8JRpApuSCgCHTtTK8P
 sY7bdAByswKcGd1eA0TZ1sLnqAcUhAcLtk0FWmHozT4Is1mHy+ixdVlfClhDbkUn
 JNeHFm1M0QP1tuHnJpYuqzCL/2mJbNAXkiJ3X1CK68Qcyigldias2Tv86JcLpkrg
 CxYQxKc=
 =f4eE
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes for USB-audio, HD-audio and cs46xx.

  The USB-audio fixes are for out-of-bound accesses and a regression in
  the recent cleanup, while HD-audio fixes are usual device-specific
  quirks"

* tag 'sound-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
  ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225
  ALSA: usb-audio: fix CM6206 register definitions
  ALSA: cs46xx: Potential NULL dereference in probe
  ALSA: hda/realtek - Support Dell headset mode for New AIO platform
  ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks
  ALSA: usb-audio: Always check descriptor sizes in parser code
  ALSA: usb-audio: Check mixer unit descriptors more strictly
  ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit()
2019-01-10 09:17:48 -08:00
Linus Torvalds e7446be446 MTD Fixes:
- Fix a bug introduced when exposing MTD devs as NVMEM providers and
   check for add_mtd_device() return code everywhere
 
 raw NAND fixes:
 - Fix a memory corruption in the QCOM driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEKmCqpbOU668PNA69Ze02AX4ItwAFAlw3AH4WHGJicmV6aWxs
 b25Aa2VybmVsLm9yZwAKCRBl7TYBfgi3AEbeEACdjuGgEh7rbfa1Chmi8UDZ3mUY
 FjZ29AV6u+NLHLqh5CGMCxmn0PT4EpZmd31YK9Lyxr9LTP+MU0mEBbqaHSwLmGOx
 O7bSL7Wjz6tJEfejSd/hfEohgqqXQNl9CnI0wxA6vLlkMmWsO8YzyiPf3DtkXsg+
 VWu6W1HGvjAzz4dcUGgDIEXUrns/DuMOUfsLvhGvM8HJVyrLyHiV5IZnP7eKOqPv
 9w6oxhPa+NR7Ki3GZ/vN1fPAn9mkG7nx1xPiVjW9pgkTFnsfciUHx6XRalJpIRON
 fLsAiRTyRIqhpfdcIdY9KoizcsCVmXKEDJ+KvWFl914sCqMY2vhMWN5uYcYLmwgj
 GHllBLT4u2mizGIry+9MitT9OewY71P3hVdF2bIRpgVEqLrsW2B4KqctAsH8aLL7
 fpPMO9FIYlL3VKu2jAuLxxqsXNa2L6I6ZhCcb/Fh2tXx6SHeLCaaYsFHg93AJxex
 vU3nfS+CfQzzXATmzNJZhVAGh2pNB/Bqv7y9/p50hnJri421+6Jp9f7P9KTuFQan
 1CCMxNYHZgGecBGirufhTC4SS/EFGS0VTepe8c83NAZ2F7y/KTb1D/LBrgdjUDWy
 pQq9UsepkFML42RNqaGYRzgMESHWwbW/o6BIu9rsvalRDIW+06cU14Zo4Ndi9Cbj
 0lFNjl9st8yyJ/yX7Q==
 =dFzQ
 -----END PGP SIGNATURE-----

Merge tag 'mtd/fixes-for-5.0-rc2' of git://git.infradead.org/linux-mtd

Pull mtd fixes from Boris Brezillon:
 "Core MTD Fixes:

   - Fix a bug introduced when exposing MTD devs as NVMEM providers and
     check for add_mtd_device() return code everywhere

  raw NAND fixes:

   - Fix a memory corruption in the QCOM driver"

* tag 'mtd/fixes-for-5.0-rc2' of git://git.infradead.org/linux-mtd:
  mtd: rawnand: qcom: fix memory corruption that causes panic
  mtd: Check add_mtd_device() ret code
  mtd: Fix the check on nvmem_register() ret code
2019-01-10 09:14:12 -08:00
Qu Wenruo 1b3922a8bc btrfs: Use real device structure to verify dev extent
[BUG]
Linux v5.0-rc1 will fail fstests/btrfs/163 with the following kernel
message:

  BTRFS error (device dm-6): dev extent devid 1 physical offset 13631488 len 8388608 is beyond device boundary 0
  BTRFS error (device dm-6): failed to verify dev extents against chunks: -117
  BTRFS error (device dm-6): open_ctree failed

[CAUSE]
Commit cf90d884b3 ("btrfs: Introduce mount time chunk <-> dev extent
mapping check") introduced strict check on dev extents.

We use btrfs_find_device() with dev uuid and fs uuid set to NULL, and
only dependent on @devid to find the real device.

For seed devices, we call clone_fs_devices() in open_seed_devices() to
allow us search seed devices directly.

However clone_fs_devices() just populates devices with devid and dev
uuid, without populating other essential members, like disk_total_bytes.

This makes any device returned by btrfs_find_device(fs_info, devid,
NULL, NULL) is just a dummy, with 0 disk_total_bytes, and any dev
extents on the seed device will not pass the device boundary check.

[FIX]
This patch will try to verify the device returned by btrfs_find_device()
and if it's a dummy then re-search in seed devices.

Fixes: cf90d884b3 ("btrfs: Introduce mount time chunk <-> dev extent mapping check")
CC: stable@vger.kernel.org # 4.19+
Reported-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-10 17:13:00 +01:00
Nicholas Mc Guire df209c43a0 gpio: pl061: handle failed allocations
devm_kzalloc(), devm_kstrdup() and devm_kasprintf() all can
fail internal allocation and return NULL. Using any of the assigned
objects without checking is not safe. As this is early in the boot
phase and these allocations really should not fail, any failure here
is probably an indication of a more serious issue so it makes little
sense to try and rollback the previous allocated resources or try to
continue;  but rather the probe function is simply exited with -ENOMEM.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 684284b64a ("ARM: integrator: add MMCI device to IM-PD1")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-01-10 15:54:50 +01:00
Ravi Bangoria 15c03092a9 tools headers powerpc: Remove unistd.h
We use syscall.tbl to generate system call table on powerpc.

The unistd.h copy is no longer required now. Remove it.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20190110094936.3132-2-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-01-10 10:42:08 -03:00
Ravi Bangoria 0206131811 perf powerpc: Rework syscall table generation
Commit aff8503932 ("powerpc: add system call table generation
support") changed how systemcall table is generated for powerpc.
Incorporate these changes into perf as well.

Committer testing:

  $ podman run --entrypoint=/bin/sh --privileged -v /home/acme/git:/git --rm -ti docker.io/acmel/linux-perf-tools-build-ubuntu:18.04-x-powerpc64
  perfbuilder@d7a7af166a80:/git/perf$ head -2 /etc/os-release
  NAME="Ubuntu"
  VERSION="18.04.1 LTS (Bionic Beaver)"
  perfbuilder@d7a7af166a80:/git/perf$
  perfbuilder@d7a7af166a80:/git/perf$ make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- EXTRA_CFLAGS= -C /git/linux/tools/perf O=/tmp/build/perf
  make: Entering directory '/git/linux/tools/perf'
    BUILD:   Doing 'make -j8' parallel build
    HOSTCC   /tmp/build/perf/fixdep.o
    HOSTLD   /tmp/build/perf/fixdep-in.o
    LINK     /tmp/build/perf/fixdep
  Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h'
  diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h
  sh: 1: command: Illegal option -c

  Auto-detecting system features:
  ...                         dwarf: [ on  ]
  ...            dwarf_getlocations: [ on  ]
  ...                         glibc: [ on  ]
  ...                          gtk2: [ OFF ]
  ...                      libaudit: [ OFF ]
  ...                        libbfd: [ OFF ]
  ...                        libelf: [ on  ]
  ...                       libnuma: [ OFF ]
  ...        numa_num_possible_cpus: [ OFF ]
  ...                       libperl: [ OFF ]
  ...                     libpython: [ OFF ]
  ...                      libslang: [ OFF ]
  ...                     libcrypto: [ OFF ]
  ...                     libunwind: [ OFF ]
  ...            libdw-dwarf-unwind: [ on  ]
  ...                          zlib: [ on  ]
  ...                          lzma: [ OFF ]
  ...                     get_cpuid: [ OFF ]
  ...                           bpf: [ on  ]

  Makefile.config:445: No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev
  Makefile.config:491: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
  Makefile.config:583: No libcrypto.h found, disables jitted code injection, please install libssl-devel or libssl-dev
  Makefile.config:598: slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev
  Makefile.config:612: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
  Makefile.config:639: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev
  Makefile.config:666: No python interpreter was found: disables Python support - please install python-devel/python-dev
  Makefile.config:721: No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling
  Makefile.config:750: No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev
  Makefile.config:763: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev
  Makefile.config:814: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
  Makefile.config:840: No alternatives command found, you need to set JDIR= to point to the root of your Java directory
    GEN      /tmp/build/perf/common-cmds.h
  <SNIP>
    CC       /tmp/build/perf/util/syscalltbl.o
  <SNIP>
    LD       /tmp/build/perf/libperf-in.o
    AR       /tmp/build/perf/libperf.a
    LINK     /tmp/build/perf/perf
  make: Leaving directory '/git/linux/tools/perf'
  perfbuilder@d7a7af166a80:/git/perf$ head /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_64.c
  static const char *syscalltbl_powerpc_64[] = {
  	[0] = "restart_syscall",
  	[1] = "exit",
  	[2] = "fork",
  	[3] = "read",
  	[4] = "write",
  	[5] = "open",
  	[6] = "close",
  	[7] = "waitpid",
  	[8] = "creat",
  perfbuilder@d7a7af166a80:/git/perf$ tail /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_64.c
  	[381] = "pwritev2",
  	[382] = "kexec_file_load",
  	[383] = "statx",
  	[384] = "pkey_alloc",
  	[385] = "pkey_free",
  	[386] = "pkey_mprotect",
  	[387] = "rseq",
  	[388] = "io_pgetevents",
  };
  #define SYSCALLTBL_POWERPC_64_MAX_ID 388
  perfbuilder@d7a7af166a80:/git/perf$ head /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_32.c
  static const char *syscalltbl_powerpc_32[] = {
  	[0] = "restart_syscall",
  	[1] = "exit",
  	[2] = "fork",
  	[3] = "read",
  	[4] = "write",
  	[5] = "open",
  	[6] = "close",
  	[7] = "waitpid",
  	[8] = "creat",
  perfbuilder@d7a7af166a80:/git/perf$ tail /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_32.c
  	[381] = "pwritev2",
  	[382] = "kexec_file_load",
  	[383] = "statx",
  	[384] = "pkey_alloc",
  	[385] = "pkey_free",
  	[386] = "pkey_mprotect",
  	[387] = "rseq",
  	[388] = "io_pgetevents",
  };
  #define SYSCALLTBL_POWERPC_32_MAX_ID 388
  perfbuilder@d7a7af166a80:/git/perf$

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20190110094936.3132-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-01-10 10:34:52 -03:00
José Roberto de Souza f299e0bdba drm: Fix documentation generation for DP_DPCD_QUIRK_NO_PSR
The DP_DPCD_QUIRK_NO_PSR comment is missing colon causing this
warning when generating kernel documentation.

./include/drm/drm_dp_helper.h:1374: warning: Incorrect use of kernel-doc format:          * @DP_DPCD_QUIRK_NO_PSR

Fixes: 1035f4a65f ("drm/i915: Disable PSR in Apple panels")
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181205184850.13218-1-jose.souza@intel.com
(cherry picked from commit ed17b55530)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2019-01-10 15:12:48 +02:00
Daniele Ceraolo Spurio 70e31424ea drm/i915: init per-engine WAs for all engines
commit 4a15c75c42 ("drm/i915: Introduce per-engine workarounds")
refactored the workaround code to have functions per-engine, but didn't
call any of them from logical_xcs_ring_init. Since we do have a non-RCS
workaround for KBL (WaKBLVECSSemaphoreWaitPoll) we do need to call
intel_engine_init_workarounds for non-RCS engines.
Note that whitelist is still RCS-only.

v2: move the call to logical_ring_init (Chris)

Fixes: 4a15c75c42 ("drm/i915: Introduce per-engine workarounds")
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190110013232.8972-2-daniele.ceraolospurio@intel.com
(cherry picked from commit a60acb223f)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2019-01-10 15:09:56 +02:00
Chris Wilson 280d479b31 drm/i915: Unwind failure on pinning the gen7 ppgtt
If we fail to pin the ggtt vma slot for the ppgtt page tables, we need
to unwind the locals before reporting the error. Or else on subsequent
attempts to bind the page tables into the ggtt, we will already believe
that the vma has been pinned and continue on blithely. If something else
should happen to be at that location, choas ensues.

Fixes: a2bbf71483 ("drm/i915/gtt: Only keep gen6 page directories pinned while active")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: <stable@vger.kernel.org> # v4.19+
Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181222030623.21710-1-chris@chris-wilson.co.uk
(cherry picked from commit d4de753526)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2019-01-10 15:09:51 +02:00
Chris Wilson 107c595c2a drm/i915: Skip the ERR_PTR error state
Although commit fb6f0b64e4 ("drm/i915: Prevent machine hang from
Broxton's vtd w/a and error capture") applied cleanly after a 24 month
hiatus, the code had moved on with new methods for peeking and fetching
the captured gpu info. Make sure we catch all uses of the stashed error
state and avoid dereferencing the error pointer.

v2: Move error pointer determination into i915_gpu_capture_state
v3: Restore early check to avoid capturing and then throwing away
subsequent GPU error states.

Fixes: fb6f0b64e4 ("drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181207110554.19897-1-chris@chris-wilson.co.uk
(cherry picked from commit e6154e4cb8)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2019-01-10 15:09:41 +02:00
José Roberto de Souza 1035f4a65f drm/i915: Disable PSR in Apple panels
i915 yet don't support PSR in Apple panels, so lets keep it disabled
while we work on that.

v2: Renamed DP_DPCD_QUIRK_PSR_NOT_CURRENTLY_SUPPORTED to
DP_DPCD_QUIRK_NO_PSR (Ville)

v3:
Adding documentation to DP_DPCD_QUIRK_NO_PSR(Dhinakaran and Jani)
Fixed typo in comment of the new quirk entry(Jani)

Fixes: 598c6cfe06 (drm/i915/psr: Enable PSR1 on gen-9+ HW)
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181204003403.23361-1-jose.souza@intel.com
(cherry picked from commit 7c5c641a93)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2019-01-10 15:09:35 +02:00
Jani Nikula 038a0a8d29 Merge tag 'gvt-fixes-2019-01-09' of https://github.com/intel/gvt-linux into drm-intel-fixes
gvt-fixes-2019-01-09

- Fix one race issue between pre-scan of guest workload with submission

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
From: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190109050151.GL11631@zhen-hp.sh.intel.com
2019-01-10 15:02:03 +02:00