linux-brain/drivers/char
George Wilson 9c4e0cab83 tpm: ibmvtpm: retry on H_CLOSED in tpm_ibmvtpm_send()
commit eba5cf3dcb844c82f54d4a857e124824e252206d upstream.

tpm_ibmvtpm_send() can fail during PowerVM Live Partition Mobility resume
with an H_CLOSED return from ibmvtpm_send_crq().  The PAPR says, 'The
"partner partition suspended" transport event disables the associated CRQ
such that any H_SEND_CRQ hcall() to the associated CRQ returns H_Closed
until the CRQ has been explicitly enabled using the H_ENABLE_CRQ hcall.'
This patch adds a check in tpm_ibmvtpm_send() for an H_CLOSED return from
ibmvtpm_send_crq() and in that case calls tpm_ibmvtpm_resume() and
retries the ibmvtpm_send_crq() once.

Cc: stable@vger.kernel.org # 3.7.x
Fixes: 132f762947 ("drivers/char/tpm: Add new device driver to support IBM vTPM")
Reported-by: Linh Pham <phaml@us.ibm.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: George Wilson <gcwilson@linux.ibm.com>
Tested-by: Linh Pham <phaml@us.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-29 16:31:29 +02:00
..
agp char: amd64-agp: Use 64-bit arithmetic instead of 32-bit 2018-07-10 13:50:31 +10:00
hw_random hwrng: imx-rngc - fix an error path 2020-04-13 10:45:10 +02:00
ipmi ipmi: fix hung processes in __get_guid() 2020-04-17 10:48:53 +02:00
mwave char/mwave: fix potential Spectre v1 vulnerability 2019-01-31 08:14:36 +01:00
pcmcia char: pcmcia: remove redundant pointer dev 2018-07-03 13:01:57 +02:00
tpm tpm: ibmvtpm: retry on H_CLOSED in tpm_ibmvtpm_send() 2020-04-29 16:31:29 +02:00
xilinx_hwicap char: xilinx_hwicap: Fix warnings in the driver 2017-08-28 17:04:47 +02:00
xillybus PCI: Add Altera vendor ID 2018-03-14 19:13:47 +01:00
Kconfig tty: mark Siemens R3964 line discipline as BROKEN 2019-04-17 08:38:47 +02:00
Makefile char: sparc64: Add privileged ADI driver 2018-06-05 11:24:55 -07:00
adi.c char: sparc64: Add privileged ADI driver 2018-06-05 11:24:55 -07:00
apm-emulation.c proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
applicom.c applicom: Fix potential Spectre v1 vulnerabilities 2019-03-10 07:17:20 +01:00
applicom.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bsr.c
ds1620.c proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
dsp56k.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
dtlk.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
efirtc.c proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
generic_nvram.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
hangcheck-timer.c treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
hpet.c hpet: Fix division by zero in hpet_time_div() 2019-07-31 07:27:10 +02:00
lp.c lp: fix sparc64 LPSETTIMEOUT ioctl 2019-12-13 08:50:58 +01:00
mbcs.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mbcs.h
mem.c /dev/mem: Bail out upon SIGKILL. 2019-10-05 13:10:11 +02:00
misc.c proc: introduce proc_create_seq{,_data} 2018-05-16 07:23:35 +02:00
mspec.c char: mspec: change return type to vm_fault_t 2018-04-23 13:51:53 +02:00
nsc_gpio.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
nvram.c proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
nwbutton.c treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
nwbutton.h treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
nwflash.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
pc8736x_gpio.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
powernv-op-panel.c
ppdev.c ppdev: fix PPGETTIME/PPSETTIME ioctls 2019-12-17 20:35:13 +01:00
ps3flash.c
random.c random: always use batched entropy for get_random_u{32,64} 2020-04-13 10:45:09 +02:00
raw.c treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
rtc.c char: rtc: remove task handling 2018-08-02 17:16:03 +02:00
scx200_gpio.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
snsc.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
snsc.h
snsc_event.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
sonypi.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
tb0219.c mips: separate extable.h, switch module.h to it 2016-10-05 18:36:18 -04:00
tlclk.c timer: Remove last user of TIMER_INITIALIZER 2017-10-05 15:01:18 +02:00
toshiba.c proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
ttyprintk.c ttyprintk: fix a potential deadlock in interrupt context issue 2020-02-05 14:43:39 +00:00
uv_mmtimer.c
virtio_console.c virtio_console: allocate inbufs in add_port() only if it is needed 2019-12-01 09:16:10 +01:00