Fix invalid pointer access in trace_dbuf.h
commit0d870a17750feaeee9071c161d3248508a126043
authorChunwei Chen <tuxoko@gmail.com>
Mon, 2 Oct 2023 23:58:01 +0000 (2 16:58 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 3 Oct 2023 16:06:07 +0000 (3 09:06 -0700)
tree125d37dac41d86c532be4890ee16ad04cd1b3ac6
parent608741d062fe4b92c8018fff96b24a9629c08bcb
Fix invalid pointer access in trace_dbuf.h

In dnode_destroy, dn_objset is invalidated. However, it will later call
into dbuf_destroy, in which DTRACE_SET_STATE will try to access spa_name
via dn_objset causing illegal pointer access.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #15333
include/os/linux/zfs/sys/trace_dbuf.h