Re: [GIT PULL] io_uring fix for 5.11 final

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 12, 2021 at 12:22 PM Jens Axboe <axboe@xxxxxxxxx> wrote:
>
>   My other idea was
> to add a check in path resolution that catches it, for future safe
> guards outside of send/recvmsg. That's obviously a separate change
> from the comment, but would be nice to have.

I wonder how painful it would be to just make sure that kernel threads
have a NULL ->fs and ->files by default.

But maybe the oops in a kernel thread ends up being too painful and
harder to debug and deal with, and a special check is preferred just
because a WARN_ON_ONCE() wouldn't cause any other downstream issues.

Yes, some kernel threads do need to do pathname lookups (and io_uring
isn't the only such thing), but I think they are generally fairly
special cases (ie things like usermode helper, firmware loaders, etc).

           Linus



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux