You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mandatory locking is enforced for cached reads, which violates
default posix semantics, and also it is enforced inconsistently.
This affected recent versions of libreoffice, and can be
demonstrated by opening a file twice from the same client,
locking it from handle one and trying to read from it from
handle two (which fails, returning EACCES).
There is already a mount option "forcemandatorylock"
(which defaults to off), so with this change only when the user
intentionally specifies "forcemandatorylock" on mount will we
break posix semantics on read to a locked range (ie we will
only fail in this case, if the user mounts with
"forcemandatorylock").
An earlier patch fixed the write path.
Fixes: 85160e0 ("CIFS: Implement caching mechanism for mandatory brlocks")
Cc: [email protected]
Cc: Pavel Shilovsky <[email protected]>
Reviewed-by: David Howells <[email protected]>
Reported-by: [email protected]
Reported-by: Kevin Ottens <[email protected]>
Signed-off-by: Steve French <[email protected]>
0 commit comments