--- zzzz-none-000/linux-4.9.218/include/linux/pipe_fs_i.h 2020-04-02 15:20:41.000000000 +0000 +++ seale-7590ax-750/linux-4.9.218/include/linux/pipe_fs_i.h 2023-03-29 10:59:07.000000000 +0000 @@ -123,6 +123,7 @@ return buf->ops->get(pipe, buf); } +extern const struct pipe_buf_operations packet_pipe_buf_illegal; /** * pipe_buf_release - put a reference to a pipe_buffer * @pipe: the pipe that the buffer belongs to @@ -133,8 +134,10 @@ { const struct pipe_buf_operations *ops = buf->ops; - buf->ops = NULL; - ops->release(pipe, buf); + if (buf->ops != &packet_pipe_buf_illegal) { + buf->ops = &packet_pipe_buf_illegal; + ops->release(pipe, buf); + } } /**