提交 27b0c099 编写于 作者: S Stefan Berger 提交者: Michael Roth

tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid

Make sure that the new locality passed to tpm_tis_prep_abort()
is valid.

Add a comment to aborting_locty that it may be any locality, including
TPM_TIS_NO_LOCALITY.
Signed-off-by: NStefan Berger <stefanb@linux.ibm.com>
Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
(cherry picked from commit e92b63ea)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 00d0932e
......@@ -263,7 +263,9 @@ static void tpm_tis_prep_abort(TPMState *s, uint8_t locty, uint8_t newlocty)
{
uint8_t busy_locty;
s->aborting_locty = locty;
assert(TPM_TIS_IS_VALID_LOCTY(newlocty));
s->aborting_locty = locty; /* may also be TPM_TIS_NO_LOCALITY */
s->next_locty = newlocty; /* locality after successful abort */
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册