summaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2015-06-24 12:10:23 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-25 19:34:40 -0400
commita24221dca1868101c9b4b5adde4a6a5b1a3a64a7 (patch)
treef8436d89c3ab895df0cc70579c45e6140bd27d17 /fs/fat
parent1372a3130a3e0bfd38d82d476f0a907cc72ba816 (diff)
downloadlinux-a24221dca1868101c9b4b5adde4a6a5b1a3a64a7.tar.bz2
nfs: fix potential credential leak in ff_layout_update_mirror_cred
If we have two tasks racing to update a mirror's credentials, then they can end up leaking one (or more) sets of credentials. The first task will set mirror->cred and then the second task will just overwrite it. Use a cmpxchg to ensure that the creds are only set once. If we get to the point where we would set mirror->cred and find that they're already set, then we just release the creds that were just found. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Cc: stable@vger.kernel.org # 4.0+ Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/fat')
0 files changed, 0 insertions, 0 deletions