Re: [Devel] [PATCH VZ9] fs/fuse kio: fix bug due to potential memory alloc failure

2025-05-29 Thread Alexey Kuznetsov
Ack On Thu, May 29, 2025 at 12:56 PM Liu Kui wrote: > > When the memory allocation for a response msg in cs_get_hdr() fails, > it falls back to rpc_get_hdr() to try to allocate. However the > response msg allocated by rpc_get_hdr() will cause the data being > received into the newly allocated mem

[Devel] [PATCH VZ9] fs/fuse kio: set correct accounting weight for FIEMAP request msg.

2025-05-29 Thread Liu Kui
This is an ancient bug that was never tested. For FIEMAP request, its iochunk.size could be much larger than the size of actual msg flying around. And its accounting weight should be PCS_CS_HOLE_WEIGHT, just like WRITE_HOLE or WRITE_ZERO, instead of its iochunk.size. Otherwise it'll make cs->in_fli