Re: [PATCH] padata: Remove broken queue flushing

From: Herbert Xu
Date: Tue Nov 19 2019 - 17:50:25 EST

On Tue, Nov 19, 2019 at 05:44:32PM -0500, Daniel Jordan wrote:
> I assume you mean the third patch you recently posted, "crypto: pcrypt - Avoid
> deadlock by using per-instance padata queues". That's true, the problem is
> fixed there, and the bug being present in bisection doesn't seem like enough
> justification to implement something short-lived just to prevent it.

Right. But as pcrypt is the only user this should still work.

> Makes sense to me, though I don't see how it's enforced now in pcrypt. I'm not
> an async crypto person, but wouldn't unloading the pcrypt module when there are
> still outstanding async jobs break this rule?

It's enforced through module reference counting. While there are
any outstanding requests, there must be allocated crypto tfms. Each
crypto tfm maintains a module reference count on pcrypt which
prevents it from being unloaded.

> Actually, I'm working on an RFC right now to add more users for padata. It
> should be posted in the coming week or two, and I hope it can be part of that
> discussion.


Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page:
PGP Key: