HomeFreeBSD

Prevent null dereferences when accessing dbuf kstat

Description

Prevent null dereferences when accessing dbuf kstat

In arc_buf_info(), the arc_buf_t may have no header. If not, don't try
to fetch the arc buffer stats and instead just zero them.

The null dereferences were observed while accessing the dbuf kstat with
awk on a system in which millions of small files were being created in
order to overflow the system's metadata limit.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #4837

Details

Provenance
Tim Chase <tim@chase2k.com>Authored on Jul 10 2016, 2:09 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 14 2016, 11:25 PM
Parents
rG8d9e12451530: Enable zpool_upgrade test cases
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG8887c7d778dc: Prevent null dereferences when accessing dbuf kstat (authored by Tim Chase <tim@chase2k.com>).Jul 14 2016, 11:25 PM