diff options
| author | Qianchang Zhao <pioooooooooip@gmail.com> | 2025-11-09 10:00:55 +0900 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-11-30 21:11:44 -0600 |
| commit | 5d510ac31626ed157d2182149559430350cf2104 (patch) | |
| tree | 05391042aacdf058a04077220247643ece3ee950 /rust/kernel/alloc/kvec/errors.rs | |
| parent | 9c98f5eec877976dad1179149038a4b164e236b1 (diff) | |
ksmbd: skip lock-range check on equal size to avoid size==0 underflow
When size equals the current i_size (including 0), the code used to call
check_lock_range(filp, i_size, size - 1, WRITE), which computes `size - 1`
and can underflow for size==0. Skip the equal case.
Cc: stable@vger.kernel.org
Reported-by: Qianchang Zhao <pioooooooooip@gmail.com>
Reported-by: Zhitong Liu <liuzhitong1993@gmail.com>
Signed-off-by: Qianchang Zhao <pioooooooooip@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
