Re: [patch 0/4] uaccess: Provide and use helpers for user masked access
From: Al Viro
Date: Wed Aug 20 2025 - 19:48:32 EST
On Tue, Aug 19, 2025 at 01:39:09AM +0100, Al Viro wrote:
> I'm still trying to come up with something edible for lock_mount() -
> the best approximation I've got so far is
>
> CLASS(lock_mount, mp)(path);
> if (IS_ERR(mp.mp))
> bugger off
... and that does not work, since DEFINE_CLASS() has constructor return
a value that gets copied into the local variable in question.
Which is unusable for situations when a part of what constructor is
doing is insertion of that local variable into a list.
__cleanup() per se is still usable, but... no DEFINE_CLASS for that kind
of data structures ;-/