Bug 267706 - [PATCH] ufs/ext2: Fix vop_readdir's ncookies handling
Summary: [PATCH] ufs/ext2: Fix vop_readdir's ncookies handling
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-11 10:31 UTC by kusumi.tomohiro
Modified: 2023-01-14 18:56 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kusumi.tomohiro 2022-11-11 10:31:54 UTC
https://www.dragonflybsd.org/~tkusumi/diff/freebsd/0001-ufs-ext2-Fix-vop_readdir-s-ncookies-handling.patch

https://github.com/kusumi/freebsd-src/commits/ncookies_1

This should be updating ncookies pointer value, not the pointer itself.
Callers in NFS are passing int variable in stack.
Comment 1 Kirk McKusick freebsd_committer freebsd_triage 2023-01-02 03:27:41 UTC
I will get the fix committed.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-01-02 03:31:22 UTC
A commit in branch main references this bug:

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

commit e84e44215fe19dad4d1779d5ee0b2f2d2739f016
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2023-01-02 03:29:43 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2023-01-02 03:30:14 +0000

    Fix vop_readdir's ncookies handling in UFS and EXT2.

    Submitted by: Kusumi Tomohiro
    PR:           267706
    MFC after:    1 week

 sys/fs/ext2fs/ext2_lookup.c | 2 +-
 sys/ufs/ufs/ufs_vnops.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-01-14 18:49:33 UTC
A commit in branch stable/13 references this bug:

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

commit caf4d617945efea8c59443d8ab184c288bae43be
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2023-01-02 03:29:43 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2023-01-14 18:48:48 +0000

    Fix vop_readdir's ncookies handling in UFS and EXT2.

    Submitted by: Kusumi Tomohiro
    PR:           267706

    (cherry picked from commit e84e44215fe19dad4d1779d5ee0b2f2d2739f016)

 sys/fs/ext2fs/ext2_lookup.c | 2 +-
 sys/ufs/ufs/ufs_vnops.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 4 Kirk McKusick freebsd_committer freebsd_triage 2023-01-14 18:56:29 UTC
MFC'ed to 13.