summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2017-08-15 22:41:08 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-13 14:09:45 -0700
commit0d7592a03b8abd032afa19aed99ab89dec7f394a (patch)
tree9497a84492f1815b6e9de66388ec9f514d536784 /net/unix/af_unix.c
parent9a4cabf3bf8b0ac0993b9c45a37def6ec2d60da6 (diff)
scsi: sg: protect against races between mmap() and SG_SET_RESERVED_SIZE
commit 6a8dadcca81fceff9976e8828cceb072873b7bd5 upstream. Take f_mutex around mmap() processing to protect against races with the SG_SET_RESERVED_SIZE ioctl. Ensure the reserve buffer length remains consistent during the mapping operation, and set the "mmap called" flag to prevent further changes to the reserved buffer size as an atomic operation with the mapping. [mkp: fixed whitespace] Signed-off-by: Todd Poynor <toddpoynor@google.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions