diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2024-12-28 12:55:17 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-01 18:39:37 +0100 |
| commit | 1c3cf02db81021a0c93b327449115c1f80276ab9 (patch) | |
| tree | 0c98b463c6952b2aba4377df90e83bb7b125ee51 /mm | |
| parent | 4516febe325342555bb09ca5b396fb816d655821 (diff) | |
| download | linux-1c3cf02db81021a0c93b327449115c1f80276ab9.tar.gz linux-1c3cf02db81021a0c93b327449115c1f80276ab9.tar.bz2 linux-1c3cf02db81021a0c93b327449115c1f80276ab9.zip | |
libfs: Return ENOSPC when the directory offset range is exhausted
commit 903dc9c43a155e0893280c7472d4a9a3a83d75a6 upstream.
Testing shows that the EBUSY error return from mtree_alloc_cyclic()
leaks into user space. The ERRORS section of "man creat(2)" says:
> EBUSY O_EXCL was specified in flags and pathname refers
> to a block device that is in use by the system
> (e.g., it is mounted).
ENOSPC is closer to what applications expect in this situation.
Note that the normal range of simple directory offset values is
2..2^63, so hitting this error is going to be rare to impossible.
Fixes: 6faddda69f62 ("libfs: Add directory operations for stable offsets")
Cc: stable@vger.kernel.org # v6.9+
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Yang Erkun <yangerkun@huawei.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://lore.kernel.org/r/20241228175522.1854234-2-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions
