https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255119

--- Comment #5 from commit-h...@freebsd.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=54f98c4dbf9b1203a4e3e1b13fd0738441226991

commit 54f98c4dbf9b1203a4e3e1b13fd0738441226991
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2021-04-19 10:25:30 +0000
Commit:     Konstantin Belousov <k...@freebsd.org>
CommitDate: 2021-04-21 15:06:51 +0000

    vn_open_vnode(): handle error when fp == NULL

    If VOP_ADD_WRITECOUNT() or adv locking failed, so VOP_CLOSE() needs to
    be called, we cannot use fp fo_close() when there is no fp.  This occurs
    when e.g. kernel code directly calls vn_open() instead of the open(2)
    syscall.

    In this case, VOP_CLOSE() can be called directly, after possible lock
    upgrade.

    Reported by:    nv...@gmx.com
    PR:     255119
    Tested by:      pho
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D29830

 sys/kern/vfs_vnops.c | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to