12300 Memory leak in rfs3_readdirplus()

Review Request #2515 — Created Feb. 12, 2020 and submitted

marcel
illumos-gate
master
12300
58ffeab...
general
This fixes memory leak in rfs3_readdirplus().
Using the reproduction steps I confirmed that with the fix the leak is no
longer there.
mscheler
  1. Ship It!
  2. 
      
vgusev
  1. Looks good, but maybe put kmem_free() there it was originally, i.e. after DTRACE_NFSV3_5(op__readdirplus__done) ?

    Also I would move there at the end "kmem_free(namlen, args->dircount)"

    Logic is simple: Move all freeings at the end to protect against possible use-after-free now or later.

    1. No, I won't do that.

  2. 
      
marcel
Review request changed

Status: Closed (submitted)

Change Summary:

commit dfdcac05b5cbcf4d3441fd96be492cec26eb3d24
Author:     Marcel Telka <marcel@telka.sk>
AuthorDate: Tue Feb 11 06:45:10 2020 +0100
Commit:     Dan McDonald <danmcd@joyent.com>
CommitDate: Wed Feb 12 10:53:04 2020 -0500

    12300 Memory leak in rfs3_readdirplus()
    Reviewed by: Matthias Scheler <mscheler@tintri.com>
    Reviewed by: Vitaliy Gusev <gusev.vitaliy@icloud.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

:100644 100644 1368da2199 9a62cea6d7 M	usr/src/uts/common/fs/nfs/nfs3_srv.c
Loading...