From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Todd Poynor <toddpoynor@google.com>
Cc: Doug Gilbert <dgilbert@interlog.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH] sg: protect against races between mmap() and SG_SET_RESERVED_SIZE
Date: Tue, 22 Aug 2017 22:21:06 -0400 [thread overview]
Message-ID: <yq1d17naust.fsf@oracle.com> (raw)
In-Reply-To: <20170816054108.119890-1-toddpoynor@google.com> (Todd Poynor's message of "Tue, 15 Aug 2017 22:41:08 -0700")
Todd,
> 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.
Applied to 4.14/scsi-queue (with a slight whitespace fix). Thanks!
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2017-08-23 2:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 5:41 [PATCH] sg: protect against races between mmap() and SG_SET_RESERVED_SIZE Todd Poynor
2017-08-23 1:48 ` Douglas Gilbert
2017-08-23 2:21 ` Martin K. Petersen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1d17naust.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=dgilbert@interlog.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=toddpoynor@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox