linux-stable/drivers/char
Jarkko Sakkinen fbefc2d289 tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality()
commit a5665ec2af upstream.

This is shown with Samsung Chromebook Pro (Caroline) with TPM 1.2
(SLB 9670):

[    4.324298] TPM returned invalid status
[    4.324806] WARNING: CPU: 2 PID: 1 at drivers/char/tpm/tpm_tis_core.c:275 tpm_tis_status+0x86/0x8f

Background
==========

TCG PC Client Platform TPM Profile (PTP) Specification, paragraph 6.1 FIFO
Interface Locality Usage per Register, Table 39 Register Behavior Based on
Locality Setting for FIFO - a read attempt to TPM_STS_x Registers returns
0xFF in case of lack of locality.

The fix
=======

Decorate tpm_get_timeouts() with request_locality() and release_locality().

Fixes: a3fbfae82b ("tpm: take TPM chip power gating out of tpm_transmit()")
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Laurent Bigonville <bigon@debian.org>
Cc: stable@vger.kernel.org
Reported-by: Lukasz Majczak <lma@semihalf.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-09 11:11:10 +01:00
..
agp agp: use semicolons rather than commas to separate statements 2020-09-28 06:06:52 +10:00
hw_random hwrng: timeriomem - Fix cooldown period calculation 2021-03-04 11:37:49 +01:00
ipmi Bug fix pull for IPMI for 5.10 2020-10-14 15:00:20 -07:00
mwave char/mwave: remove redundant initialization of variable bRC 2020-07-10 14:50:51 +02:00
pcmcia cm4000_cs.c cmm_ioctl(): get rid of pointless access_ok() 2020-05-29 11:04:56 -04:00
tpm tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality() 2021-03-09 11:11:10 +01:00
xilinx_hwicap
xillybus char: xillybus: use devm_platform_ioremap_resource() to simplify code 2019-11-05 18:29:21 +01:00
adi.c
apm-emulation.c
applicom.c misc: cleanup minor number definitions in c file into miscdevice.h 2020-03-18 12:27:03 +01:00
applicom.h
bsr.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
ds1620.c
dsp56k.c
dtlk.c
hangcheck-timer.c
hpet.c char: hpet: Fix out-of-bounds read bug 2020-01-30 06:58:33 +01:00
Kconfig char: virtio: Select VIRTIO from VIRTIO_CONSOLE. 2020-09-07 14:32:40 +02:00
lp.c Merge 5.9-rc3 into char-misc-next 2020-08-31 07:17:17 +02:00
Makefile rtc/alpha: remove legacy rtc driver 2020-03-19 07:41:02 +01:00
mem.c /dev/zero: fixups for ->read 2020-09-07 10:46:35 +02:00
misc.c
mspec.c char: mspec: Use kvzalloc() in mspec_mmap() 2020-08-28 12:10:04 +02:00
nsc_gpio.c
nvram.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nwbutton.c
nwbutton.h misc: cleanup minor number definitions in c file into miscdevice.h 2020-03-18 12:27:03 +01:00
nwflash.c misc: move FLASH_MINOR into miscdevice.h and fix conflicts 2020-03-18 12:27:04 +01:00
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c ppdev: Distribute switch variables for initialization 2020-02-23 20:28:12 +01:00
ps3flash.c
random.c random: fix the RNDRESEEDCRNG ioctl 2021-03-04 11:37:19 +01:00
raw.c raw: don't keep unopened block device around 2020-09-23 10:43:19 -06:00
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c drivers: char: tlclk.c: Avoid data race between init and interrupt handler 2020-04-23 16:55:24 +02:00
toshiba.c misc: cleanup minor number definitions in c file into miscdevice.h 2020-03-18 12:27:03 +01:00
ttyprintk.c ttyprintk: remove redundant initialization of variable ret 2020-07-10 14:50:51 +02:00
uv_mmtimer.c
virtio_console.c virtio: virtio_console: fix DMA memory allocation for rproc serial 2020-11-09 18:03:33 +01:00