Commit graph

597974 commits

Author SHA1 Message Date
Steve Cohen
8e17ebd285 drm/msm/sde: set the tile height for all supported formats
The sde_format structure contains a tile_height member which was
never initialized.  SmartDMA validation uses this field and expects
it to be set properly.

Change-Id: I87bb49e5bab63c33a8c01271ee1a38b3cb8372bc
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2018-03-08 12:58:07 -08:00
Anant Goel
92caf2f356 ARM: dts: msm: Add subsys notification virtualization on msm8996 vplatform
Add subsystem_notif_virt device to support subsystem
notifications virtualization for subsystems.

Change-Id: Icc8118e834e2c1c0e54fc7380fe3ea8c7a173665
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-03-08 10:41:05 -08:00
Linux Build Service Account
07324253e2 Merge "DRM: SDE: Fix potential buffer overflow in SDE encoder" 2018-03-08 04:27:51 -08:00
Srinivasarao P
22397c476f Merge android-4.4.120 (d63fdf6) into msm-4.4
* refs/heads/tmp-d63fdf6
  Linux 4.4.120
  MIPS: Implement __multi3 for GCC7 MIPS64r6 builds
  net: gianfar_ptp: move set_fipers() to spinlock protecting area
  sctp: make use of pre-calculated len
  xen/gntdev: Fix partial gntdev_mmap() cleanup
  xen/gntdev: Fix off-by-one error when unmapping with holes
  SolutionEngine771x: fix Ether platform data
  mdio-sun4i: Fix a memory leak
  xen-netfront: enable device after manual module load
  bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine.
  can: flex_can: Correct the checking for frame length in flexcan_start_xmit()
  mac80211: mesh: drop frames appearing to be from us
  drm/ttm: check the return value of kzalloc
  e1000: fix disabling already-disabled warning
  xfs: quota: check result of register_shrinker()
  xfs: quota: fix missed destroy of qi_tree_lock
  IB/ipoib: Fix race condition in neigh creation
  IB/mlx4: Fix mlx4_ib_alloc_mr error flow
  s390/dasd: fix wrongly assigned configuration data
  led: core: Fix brightness setting when setting delay_off=0
  bnx2x: Improve reliability in case of nested PCI errors
  tg3: Enable PHY reset in MTU change path for 5720
  tg3: Add workaround to restrict 5762 MRRS to 2048
  lib/mpi: Fix umul_ppmm() for MIPS64r6
  ARM: dts: ls1021a: fix incorrect clock references
  scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error
  net: arc_emac: fix arc_emac_rx() error paths
  spi: atmel: fixed spin_lock usage inside atmel_spi_remove
  drm/nouveau/pci: do a msi rearm on init
  sget(): handle failures of register_shrinker()
  ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch
  ipv6: icmp6: Allow icmp messages to be looped back
  mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM
  f2fs: fix a bug caused by NULL extent tree
  hrtimer: Ensure POSIX compliance (relative CLOCK_REALTIME hrtimers)
  ANDROID: keychord: Check for write data size
  Revert "binder: add missing binder_unlock()"
  Linux 4.4.119
  binder: add missing binder_unlock()
  drm/amdgpu: Avoid leaking PM domain on driver unbind (v2)
  usb: renesas_usbhs: missed the "running" flag in usb_dmac with rx path
  usb: gadget: f_fs: Process all descriptors during bind
  usb: ldusb: add PIDs for new CASSY devices supported by this driver
  usb: dwc3: gadget: Set maxpacket size for ep0 IN
  drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA
  Add delay-init quirk for Corsair K70 RGB keyboards
  arm64: Disable unhandled signal log messages by default
  usb: ohci: Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()
  irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq()
  x86/oprofile: Fix bogus GCC-8 warning in nmi_setup()
  iio: adis_lib: Initialize trigger before requesting interrupt
  iio: buffer: check if a buffer has been set up when poll is called
  cfg80211: fix cfg80211_beacon_dup
  scsi: ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info
  ip_tunnel: fix preempt warning in ip tunnel creation/updating
  ip_tunnel: replace dst_cache with generic implementation
  PCI: keystone: Fix interrupt-controller-node lookup
  powerpc/64s: Fix RFI flush dependency on HARDLOCKUP_DETECTOR
  netfilter: drop outermost socket lock in getsockopt()
  ANDROID: sdcardfs: Set num in extension_details during make_item

Conflicts:
	drivers/usb/gadget/function/f_fs.c

Change-Id: I594b9686fd64d4b62ebef4452d4f1ccca4f5a77b
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-03-08 17:53:30 +05:30
Anant Goel
f64af1ec50 soc: qcom: subsystem_notif_virt: Add virtual subsystem notification driver
The guest VM uses this driver to communicate subsystem state related
notifications to a backend driver via the virtual device's registers.

Change-Id: I612fcb641c4d531c1d2c0fd18f44f7ebff040f2c
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-03-07 12:05:28 -08:00
Linux Build Service Account
b02928f9da Merge "i2c-msm-v2: Replace HW recovery mechanism with SW bit-banging" 2018-03-07 09:16:40 -08:00
Linux Build Service Account
1ccffb8bdd Merge "ais: match type to avoid array overflow" 2018-03-07 09:16:39 -08:00
Linux Build Service Account
5f0137e535 Merge "sched: add sched_get_cpu_last_busy_time() API" 2018-03-07 09:16:38 -08:00
Linux Build Service Account
bbfcd05a31 Merge "Revert "ARM: dts: msm: Disable SPI CAN controller on msm8996 CV2X boards"" 2018-03-07 09:16:37 -08:00
Linux Build Service Account
52981940d7 Merge "clk: qcom: mdss: improve DSI PLL's performance" 2018-03-07 09:16:35 -08:00
Linux Build Service Account
a3c86eca63 Merge "msm: vidc: enable port reconfig for thumbnail session" 2018-03-07 09:16:34 -08:00
Linux Build Service Account
ef0769db30 Merge "Merge android-4.4.118 (5f7f76a) into msm-4.4" 2018-03-07 09:16:32 -08:00
Linux Build Service Account
296628bc78 Merge "Merge android-4.4.117 (4ec3656) into msm-4.4" 2018-03-07 09:16:31 -08:00
Linux Build Service Account
d30c02ed5b Merge "Merge android-4.4.116 (20ddb25) into msm-4.4" 2018-03-07 09:16:30 -08:00
Linux Build Service Account
40cb358707 Merge "clk: msm: Add reset support in dummy clock driver" 2018-03-07 09:16:29 -08:00
Zhiqiang Tu
c22296053a defconfig: msm: Disable secure qsee support for msm8996 auto
Automotive platform doesn't need secure qsee support.

Change-Id: I9f7885b6057bb44c158eb5e32ebbff85bb598c2e
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-03-07 15:29:07 +08:00
Manoj Prabhu B
a2ad16a353 diag: Proper update of logging mode
The patch properly updates the logging mode after an user PD
on-device logging session is killed preventing a mutex deadlock
and thereby safe ODL session clearing.

CRs-Fixed: 2154183
Change-Id: I8451ed3869f5b75860684d5ef4119befd0cb2723
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2018-03-07 12:21:21 +05:30
Gustavo Solaira
7327c28169 Revert "ARM: dts: msm: Disable SPI CAN controller on msm8996 CV2X boards"
This reverts commit a8c85fc795.
Reverted because support for MPC5746C SPI-CAN is being
added back to the platform.

Change-Id: Ib14caf39a8cba9c6028abceb85adcd43df53ba06
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-03-06 22:47:50 -08:00
Lei wang
94e90bcf7f profiler: memset cnt_buf before use
fix cnf_buf.cmd is uninitialized in bw_profiling_get

Change-Id: I9638fe423e6768c66a85e80c0d5175b8a33c1901
Signed-off-by: Lei wang <leiwan@codeaurora.org>
2018-03-06 22:04:33 -08:00
Can Guo
8a7e59ba7f scsi: ufs: do not destroy clk scaling work queue if it is NULL
Function ufshcd_hba_exit might be called to destroy clk scaling work queue
if failure happends in function ufshcd_init before clk gating work queue
is created. This change fixs it by skipping destroying clk scaling work
queue if it is NULL.

Change-Id: Ifb1c46f490749e4afe7cea331c29d073175f68ef
Signed-off-by: Can Guo <cang@codeaurora.org>
2018-03-07 13:03:25 +08:00
Linux Build Service Account
834739e911 Merge "drm/msm-hyp: overwrite hyp ioctls used by libgbm" 2018-03-06 20:57:58 -08:00
Linux Build Service Account
c70b573a90 Merge "ath10k: fix the invalid STA disconnect after wow resume" 2018-03-06 20:57:57 -08:00
Linux Build Service Account
25eb087db9 Merge "defconfig: arm64: msm: Enable SPMI msm8996 virtual platform" 2018-03-06 20:57:55 -08:00
Linux Build Service Account
39e3389b79 Merge "ASoC: msm: Support Channel Mixer Cfg" 2018-03-06 20:57:54 -08:00
Linux Build Service Account
83efda84fc Merge "ARM: dts: msm: Disable usb phy by default on msm8996 vplatform" 2018-03-06 20:57:53 -08:00
Linux Build Service Account
2ad3d8cb64 Merge "spmi: msm: correct len part in formatted cmd value." 2018-03-06 20:57:51 -08:00
Linux Build Service Account
df41a54a67 Merge "drm/msm: HPD_OFF Property for SDE HDMI Connector" 2018-03-06 20:57:50 -08:00
Guchun Chen
cf8812ee6e clk: qcom: mdss: improve DSI PLL's performance
To improve performance margin for DSI's PLL at cold temperature case,
the value of DSIPHY_PLL_PLL_ICPMSET should be changed from 0x24 to 0x3f.

Change-Id: I139e37e137355c5e8f0b3bebd28b23a09593dd13
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2018-03-07 11:10:56 +08:00
Jeykumar Sankaran
240bc58d6a drm/msm/sde: add validation checks for source split
Planes configured on the same blend stage must be
contiguous by their destination width, same destination
height and yoffsets. This changes validates the source
split pair before staging them.

Change-Id: I6e77b48a29477c4594e4693d1be95f91b73f1ed2
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2018-03-06 14:22:32 -08:00
Camus Wong
74f60692b1 drm/msm-hyp: overwrite hyp ioctls used by libgbm
Handle ioctls called by libgbm in the virtual kernel driver
to support front-end library and avoid modifying libgbm.

Change-Id: Ie4e567cea7338b4ba68080decf85dfa45e040dac
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2018-03-06 09:54:53 -05:00
Pavankumar Kondeti
3c44396107 sched: add sched_get_cpu_last_busy_time() API
sched_get_cpu_last_busy_time() returns the last time stamp when
a given CPU is busy with more than 2 runnable tasks or has load
greater than 50% of it's max capacity. The LPM driver can make
use of this API and create a policy to prevent a recently loaded
CPU entering deep sleep state.

This API is implemented only for the higher capacity CPUs in
the system. It returns 0 for other CPUs.

Change-Id: I97ef47970a71647f4f55f21165d0cc1351770a53
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2018-03-06 19:46:33 +05:30
Sarada Prasanna Garnayak
ab809bba58 ath10k: fix the invalid STA disconnect after wow resume
Clear the previous wakeup reason data and reset the wakeup
reason event field to avoid the STA disconnect with invalid
wow event.

CRs-Fixed: 2199100
Change-Id: If45b5ae6e6f93ab9068b59a5e31f46b829363936
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2018-03-06 03:57:03 -08:00
Greg Kroah-Hartman
d63fdf61a4 This is the 4.4.120 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlqaaMQACgkQONu9yGCS
 aT4KzBAAvCqibAFMAux179fHPZD3bUKdHPLKtyFFiqEo72x85VbzGMyF+8z0G9ci
 uEIbg9nChvMEajggZ11I4Ydi8vBFNomYCp9I5d9ozDS18fUi0dLUPrRBbbKome5I
 qVygmKshx7QKuiiVNknecQczqZbrd6cqOHJqJH/W6TUEPNsC7gta0bAB40DeWjQk
 1SSKYEstaz7For4ZH9mjNqM/KF0RSWUt8/iLs8u4EQcSs47CMkUMFv3PwtITC8if
 9lgsk+DZ5ua3DLrpRvMX8pL/hC1GZaceun7hn0aBIa/YmAYC6EsT5PB2SDX1ULC/
 dUw1TjXpt/pJvhzxm+YZ4tq6JkxGDT6cfb3LwmGwSm+XUp299y7WBseC8U7GLBIp
 hLLhSGTUtVkQbZ+dX24Hw+mwsgbdFbvFvwoeCBxfqAqgz/OeG4+zIXY94aBt0hxo
 4qzzYqs4RuLS2bf+Gx6V2gfsqX6T9EXDIEUh+ybz+rAYBwLl9EVK7wVDB/ZjonTe
 0/OUIQZEFS8g6kBczHQFISqoV+7ChwMwznEv8ZulYtdovPqGW7h10ZLAEm0L1i6d
 xXtjxYezSaaiTWg44fbGjSTzUBso0+Mlxf6Q8YO2inxPQlLLdaTiPBxkTxY6M9Re
 pmt8Z0o2796AsYbNrnBm5Y+8MTusdOWukFtUxz2vE8TR1r8mXO8=
 =jkg+
 -----END PGP SIGNATURE-----

Merge 4.4.120 into android-4.4

Changes in 4.4.120
	hrtimer: Ensure POSIX compliance (relative CLOCK_REALTIME hrtimers)
	f2fs: fix a bug caused by NULL extent tree
	mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM
	ipv6: icmp6: Allow icmp messages to be looped back
	ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch
	sget(): handle failures of register_shrinker()
	drm/nouveau/pci: do a msi rearm on init
	spi: atmel: fixed spin_lock usage inside atmel_spi_remove
	net: arc_emac: fix arc_emac_rx() error paths
	scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error
	ARM: dts: ls1021a: fix incorrect clock references
	lib/mpi: Fix umul_ppmm() for MIPS64r6
	tg3: Add workaround to restrict 5762 MRRS to 2048
	tg3: Enable PHY reset in MTU change path for 5720
	bnx2x: Improve reliability in case of nested PCI errors
	led: core: Fix brightness setting when setting delay_off=0
	s390/dasd: fix wrongly assigned configuration data
	IB/mlx4: Fix mlx4_ib_alloc_mr error flow
	IB/ipoib: Fix race condition in neigh creation
	xfs: quota: fix missed destroy of qi_tree_lock
	xfs: quota: check result of register_shrinker()
	e1000: fix disabling already-disabled warning
	drm/ttm: check the return value of kzalloc
	mac80211: mesh: drop frames appearing to be from us
	can: flex_can: Correct the checking for frame length in flexcan_start_xmit()
	bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine.
	xen-netfront: enable device after manual module load
	mdio-sun4i: Fix a memory leak
	SolutionEngine771x: fix Ether platform data
	xen/gntdev: Fix off-by-one error when unmapping with holes
	xen/gntdev: Fix partial gntdev_mmap() cleanup
	sctp: make use of pre-calculated len
	net: gianfar_ptp: move set_fipers() to spinlock protecting area
	MIPS: Implement __multi3 for GCC7 MIPS64r6 builds
	Linux 4.4.120

Change-Id: Ie363d2e798f7bbe76e728c995e605af94667dfe5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-03-06 03:31:47 -08:00
Andy Sun
eed92b4a0f ais: match type to avoid array overflow
Fix buffer overflow and array index out of bounds cases.
Because size of int(32bits) unequal to size of long(64bits). 

Change-Id: I45a70ec5b6926698bb444fc78f85785bc4a25ea5
Signed-off-by: Andy Sun <bins@codeaurora.org>
2018-03-06 16:16:46 +08:00
Aditya Bavanari
893f3cf2fb asoc: msm: add check for integer overflow
Add check for integer overflow of user
supplied data for ADSP stream command.

CRs-Fixed: 2173850
Change-Id: Ic70093e890b7a6dd07529d77d10fff003282a8ea
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-03-06 12:52:27 +05:30
Linux Build Service Account
99b73ed59a Merge "soc: qcom: scm_qcpe: Derive HAB id from HAB vmid dt node" 2018-03-05 14:12:24 -08:00
Linux Build Service Account
b6633295ce Merge "msm: kgsl: Limit the maximum number of contexts" 2018-03-05 14:12:22 -08:00
Linux Build Service Account
307aaed1e4 Merge "msm: mdss: Fix scalar LUT handling" 2018-03-05 14:12:21 -08:00
Paras Nagda
6d5592aa85 msm: vidc: enable port reconfig for thumbnail session
Send port reconfig to client for thumbnail session
when driver received sufficient resources from firmware.

This is needed as there are issues in DPB management
in firmware.

Change-Id: I7c2992e6be87fd277b209554d1aa7c4d0a088738
Signed-off-by: Paras Nagda <pnagda@codeaurora.org>
2018-03-05 05:52:34 -08:00
Cong Tang
1280bf572d ASoC: msm: Upgrade AFE TDM Driver to support 32 Channels
HLOS update AFE TDM driver to support 32 channels playback
and capture since ADSP firmware has already support on this.
Only TDM interface would support 32 channels ability.

Change-Id: I22c23a4b8b43fcbe9950b5df5e8a8faa374efce4
Signed-off-by: Cong Tang <congt@codeaurora.org>
2018-03-05 18:30:08 +08:00
Harshdeep Dhatt
3f5a22eca9 msm: kgsl: Limit the maximum number of contexts
Enforce a limit of 200 contexts per process. This is done so
that a process cannot use up all the available contexts and
prevent other processes from starving.

Change-Id: I6eda123128381a213315561cd42335e0944f1f55
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
2018-03-05 01:17:09 -08:00
Yimin Peng
2c6e820516 spmi: msm: correct len part in formatted cmd value.
When the bytes count required by SPMI clients is 8, read and write
fail. This was observed when PMIC MPPs initialized. Fix this by
adding bytes count restore in cmd formation as read and write process.

Change-Id: I56dbbc0b8e99727c29ddae568ce6f17195888b4a
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
2018-03-05 15:43:31 +08:00
Harshdeep Dhatt
b67de7b731 msm: kgsl: Increase memstore size
Increase the memstore size to 32k. Memstore has for long
been limited to 200 contexts and now it will be 814.

Change-Id: I1287669f0be38afe13ff8e386f5296e8f4e77627
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
2018-03-05 12:10:15 +05:30
Zhiqiang Tu
a1ef93ac8d ARM: dts: msm: Disable usb phy by default on msm8996 vplatform
Disable usb phy by default and only enable them for the targets
which require the support for usb phy.

Change-Id: I55d5cba5ef06d3269cc9600dfec866c0f88b31ab
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-03-05 09:16:34 +08:00
Amit Blay
552c3a28c9 soc: qcom: scm_qcpe: Derive HAB id from HAB vmid dt node
Derive the QCPE HAB id from the HAB vmid DTS node, rather
than have it hard coded into the driver.

Change-Id: I29ec7647890f8bc194d31f0402c5ed314572462f
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2018-03-04 10:06:03 +02:00
Greg Kroah-Hartman
47356cfded Linux 4.4.120 2018-03-03 10:19:46 +01:00
James Hogan
cacdb01624 MIPS: Implement __multi3 for GCC7 MIPS64r6 builds
commit ebabcf17bcd7ce968b1631ebe08236275698f39b upstream.

GCC7 is a bit too eager to generate suboptimal __multi3 calls (128bit
multiply with 128bit result) for MIPS64r6 builds, even in code which
doesn't explicitly use 128bit types, such as the following:

unsigned long func(unsigned long a, unsigned long b)
{
	return a > (~0UL) / b;
}

Which GCC rearanges to:

return (unsigned __int128)a * (unsigned __int128)b > 0xffffffffffffffff;

Therefore implement __multi3, but only for MIPS64r6 with GCC7 as under
normal circumstances we wouldn't expect any calls to __multi3 to be
generated from kernel code.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: James Hogan <jhogan@kernel.org>
Tested-by: Waldemar Brodkorb <wbx@openadk.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Maciej W. Rozycki <macro@mips.com>
Cc: Matthew Fortune <matthew.fortune@mips.com>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17890/
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:19:46 +01:00
Yangbo Lu
37d866a9e5 net: gianfar_ptp: move set_fipers() to spinlock protecting area
[ Upstream commit 11d827a993a969c3c6ec56758ff63a44ba19b466 ]

set_fipers() calling should be protected by spinlock in
case that any interrupt breaks related registers setting
and the function we expect. This patch is to move set_fipers()
to spinlock protecting area in ptp_gianfar_adjtime().

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:19:45 +01:00
Marcelo Ricardo Leitner
adad04f306 sctp: make use of pre-calculated len
[ Upstream commit c76f97c99ae6d26d14c7f0e50e074382bfbc9f98 ]

Some sockopt handling functions were calculating the length of the
buffer to be written to userspace and then calculating it again when
actually writing the buffer, which could lead to some write not using
an up-to-date length.

This patch updates such places to just make use of the len variable.

Also, replace some sizeof(type) to sizeof(var).

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:19:45 +01:00
Ross Lagerwall
041250d9c3 xen/gntdev: Fix partial gntdev_mmap() cleanup
[ Upstream commit cf2acf66ad43abb39735568f55e1f85f9844e990 ]

When cleaning up after a partially successful gntdev_mmap(), unmap the
successfully mapped grant pages otherwise Xen will kill the domain if
in debug mode (Attempt to implicitly unmap a granted PTE) or Linux will
kill the process and emit "BUG: Bad page map in process" if Xen is in
release mode.

This is only needed when use_ptemod is true because gntdev_put_map()
will unmap grant pages itself when use_ptemod is false.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:19:45 +01:00