Re: [PATCH v2] audit: Avoid excessive dput/dget in audit_context setup and reset paths

From: Al Viro

Date: Tue Feb 03 2026 - 14:58:47 EST


On Tue, Feb 03, 2026 at 02:44:33PM -0500, Waiman Long wrote:

> + /*
> + * Defer the path_put() call of the old pwd to workqueue as
> + * we may be in an atomic context that cannot call path_put()
> + * directly because of might_sleep().
> + */
> + pp = kmalloc(sizeof(*pp), GFP_NOFS);

If that really gets called in atomic context, this kmalloc will
in itself be enough to fuck you over, won't it?