Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: ccp - Prevent a possible lost CCP command request

If a CCP command has been queued for processing at the
crypto layer then, when dequeueing it for processing, the
"can backlog" flag must be set so that the request isn't
lost if the CCP backlog queue limit is reached.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Tom Lendacky and committed by
Herbert Xu
0611451b f829e7a3

+4
+4
drivers/crypto/ccp/ccp-crypto-main.c
··· 174 174 175 175 /* Submit the next cmd */ 176 176 while (held) { 177 + /* Since we have already queued the cmd, we must indicate that 178 + * we can backlog so as not to "lose" this request. 179 + */ 180 + held->cmd->flags |= CCP_CMD_MAY_BACKLOG; 177 181 ret = ccp_enqueue_cmd(held->cmd); 178 182 if (ccp_crypto_success(ret)) 179 183 break;