Re: [PATCH] fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE

Al Viro
2024-08-03T23:06:25Z

On Sat, Aug 03, 2024 at 11:50:54PM +0100, Al Viro wrote:

> The best way to fix that is in dup_fd() - there we both can easily check
> whether we might need to fix anything up and see which word needs the
> upper bits cleared.

PS: we could try and handle that in copy_fd_bitmaps() instead, but there
it's harder to tell whether we need to bother in the first place, so that
add overhead on a fairly hot paths.