Re: [PATCH] ksmbd: do not log a stale security descriptor as an error

From: Namjae Jeon

Date: Wed Nov 18 2026 - 16:53:42 EST


On Tue, Nov 17, 2026 at 11:50 PM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> ksmbd stores a hash of the file's owner, group, mode and POSIX ACLs with
> each security descriptor. ksmbd_vfs_get_sd_xattr() recomputes the hash
> when it loads the descriptor. If the two differ, the descriptor is stale
> and ksmbd treats it as absent. That is expected after a chmod, chown or
> setfacl on the server, but the function logs "hash value diff" with
> pr_err() every time.
>
> Opens, security queries, hide-unreadable listings and inheritance
> can all load stored descriptors. Repeated opens of a file with a
> stale descriptor can therefore fill the kernel log.
>
> Report a stale descriptor with ksmbd_debug() instead, and include the
> file name in the message.
>
> Signed-off-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks!