diff options
author | Jeff Layton | 2023-05-17 12:26:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-06-09 10:34:00 +0200 |
commit | bd424277a1f86c41254d1068889908067d1f6aa5 (patch) | |
tree | b15936c4e75386dd39ca0c9f81a166c0e4d02133 /drivers | |
parent | dac09fec5b57377d4ac1f735762af939fff6fc06 (diff) |
nfsd: make a copy of struct iattr before calling notify_change
[ Upstream commit d53d70084d27f56bcdf5074328f2c9ec861be596 ]
notify_change can modify the iattr structure. In particular it can
end up setting ATTR_MODE when ATTR_KILL_SUID is already set, causing
a BUG() if the same iattr is passed to notify_change more than once.
Make a copy of the struct iattr before calling notify_change.
Reported-by: Zhi Li <yieli@redhat.com>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2207969
Tested-by: Zhi Li <yieli@redhat.com>
Fixes: 34b91dda7124 ("NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions