Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote: > > + /* > + * Pass current's thread info pointer to sha1_ce_transform() > + * below if we want it to play nice under preemption. > + */ > + if ((IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY) || > + IS_ENABLED(CONFIG_PREEMPT)) && !in_interrupt()) > + ti = current_thread_info(); Instead of in_interrupt you should test CRYPTO_TFM_REQ_MAY_SLEEP. It's not a matter of correctness but it may avoid unnecessary breaks in the loop. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html