On Tue, 13 May 2025 10:26:45 +0800 Jason Xing <[email protected]> wrote:
> > > > Maybe we don't need to check !chan either. Can it be NULL here? > > It depends on how users call this. If users call this without > initialization of chan, relay_dump() can avoid the crash. It works > like kfree() which prevents the NULL object from being freed. hm, OK. Generally, I don't think that kernel code should be very tolerant of bugs in the caller. If the caller passes us bad stuff then that's the caller's fault and the caller should be fixed. If the client code responds to bad input with a nice solid oops, then great! The caller will get fixed. > BTW, should I merge this commit [1] into the series in V2 so that you > can easily review? > > [1]: > https://lore.kernel.org/all/[email protected]/ That seems unrelated to this work so it seems inappropriate to combine the two. I skipped [1] because I'm waiting for overall clarity on what's happening with relay[fs].
