On Fri, Nov 08, 2019 at 11:22:48AM +0200, Tero Kristo wrote: > On 08/11/2019 11:16, Herbert Xu wrote: > > On Fri, Nov 08, 2019 at 09:40:57AM +0200, Tero Kristo wrote: > > > > > > The problem is not detecting a hung task, the problem is determining what > > > caused the hang. Personally I don't care if the system dies if a crypto > > > accelerator self test has failed, as long as I get reported about the exact > > > nature of the failure. The failures are expected to happen only in > > > development phase of a crypto driver. > > > > > > With the timeout patch in place, I get reported what exact crypto test case > > > failed and I can focus my debug efforts on that one. > > > > If that's all you need then how about just making the wait killable? > > Yeah, that would be an alternative. > I don't see how making crypto_wait_req killable would be any better than adding a timeout, since in both cases the crypto operation would still be proceeding in the background while things are being freed. Would it help if the crypto self-tests printed a pr_debug() message when starting each test vector? These wouldn't be shown by default, but it would be possible to enable them using dynamic-debug or by adding '#define DEBUG' to the top of the source file. - Eric