Skip to content

Commit 87f00ab

Browse files
committed
ksmbd: use locks_inode_context helper
ksmbd currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Cc: Steve French <[email protected]> Acked-by: Namjae Jeon <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
1 parent a1fde8e commit 87f00ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ksmbd/vfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int check_lock_range(struct file *filp, loff_t start, loff_t end,
321321
unsigned char type)
322322
{
323323
struct file_lock *flock;
324-
struct file_lock_context *ctx = file_inode(filp)->i_flctx;
324+
struct file_lock_context *ctx = locks_inode_context(file_inode(filp));
325325
int error = 0;
326326

327327
if (!ctx || list_empty_careful(&ctx->flc_posix))

0 commit comments

Comments
 (0)