[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250512204124.5f201b7bcc394f773f2d40b9@linux-foundation.org>
Date: Mon, 12 May 2025 20:41:24 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jason Xing <kerneljasonxing@...il.com>
Cc: axboe@...nel.dk, rostedt@...dmis.org, mhiramat@...nel.org,
mathieu.desnoyers@...icios.com, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Jason Xing
<kernelxing@...cent.com>, Yushan Zhou <katrinzhou@...cent.com>
Subject: Re: [PATCH v1 2/5] relayfs: introduce dump of relayfs statistics
function
On Tue, 13 May 2025 10:26:45 +0800 Jason Xing <kerneljasonxing@...il.com> 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/20250507134225.63248-1-kerneljasonxing@gmail.com/
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].
Powered by blists - more mailing lists