Re: [PATCH] pNFS: Fix use-after-free in pnfs_update_layout()

Markus Elfring <[email protected]>
Newsgroups gmane.linux.kernel.janitors,gmane.linux.nfs,gmane.linux.kernel.stable,gmane.linux.kernel
Message-ID <[email protected]>
…
> Fix this by moving the tracepoint call before pnfs_put_layout_hdr(lo).

Or:
Thus move a pnfs_put_layout_hdr(lo) call between a trace_pnfs_update_layout() call
and a goto statement.


How do you think about to avoid a bit of duplicate source code
in the implementation of the function “pnfs_update_layout” then?
https://elixir.bootlin.com/linux/v7.1-rc4/source/fs/nfs/pnfs.c#L2128-L2385
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.1-rc4#n526


Were any source code analysis tools involved in the detection of improvable places?

Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.