spapr-tpm-proxy: Drop misleading check
Coverity is reporting in CID 1405304 that tpm_execute() may pass a NULL
tpm_proxy->host_path pointer to open(). This is based on the fact that
h_tpm_comm() does a NULL check on tpm_proxy->host_path and then passes
tpm_proxy to tpm_execute().
The check in h_tpm_comm() is abusive actually since a spapr-proxy-tpm
requires a non NULL host_path property, as checked during realize.
Fixes: 0fb6bd0732
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <156805260916.1779401.11054185183758185247.stgit@bahia.lan>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
f42b6f535c
commit
226c9d15df
@ -114,7 +114,7 @@ static target_ulong h_tpm_comm(PowerPCCPU *cpu,
|
||||
return H_FUNCTION;
|
||||
}
|
||||
|
||||
trace_spapr_h_tpm_comm(tpm_proxy->host_path ?: "null", op);
|
||||
trace_spapr_h_tpm_comm(tpm_proxy->host_path, op);
|
||||
|
||||
switch (op) {
|
||||
case TPM_COMM_OP_EXECUTE:
|
||||
|
Loading…
Reference in New Issue
Block a user