summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2017-08-15 22:41:08 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-24 22:29:09 -0400
commit6a8dadcca81fceff9976e8828cceb072873b7bd5 (patch)
tree6a9cb8566b1554f8aaafd81fabce9cfc20122490 /virt
parent8d26f491116feaa0b16de370b6a7ba40a40fa0b4 (diff)
downloadlinux-next-6a8dadcca81fceff9976e8828cceb072873b7bd5.tar.gz
scsi: sg: protect against races between mmap() and SG_SET_RESERVED_SIZE
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>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions