mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-30 12:04:07 +00:00
Always include PROT_READ for Linux mmap operations.
Submitted by: Hannu Savolainen <hannu@voxware.pp.fi> via jkh
This commit is contained in:
parent
f50a491f78
commit
28f6972b6e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25219
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.26 1997/03/24 11:24:30 bde Exp $
|
||||
* $Id: linux_misc.c,v 1.27 1997/04/01 08:39:06 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -611,7 +611,7 @@ linux_mmap(struct proc *p, struct linux_mmap_args *args, int *retval)
|
||||
bsd_args.flags |= MAP_ANON;
|
||||
bsd_args.addr = linux_args.addr;
|
||||
bsd_args.len = linux_args.len;
|
||||
bsd_args.prot = linux_args.prot;
|
||||
bsd_args.prot = linux_args.prot | PROT_READ; /* always required */
|
||||
bsd_args.fd = linux_args.fd;
|
||||
bsd_args.pos = linux_args.pos;
|
||||
bsd_args.pad = 0;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.26 1997/03/24 11:24:30 bde Exp $
|
||||
* $Id: linux_misc.c,v 1.27 1997/04/01 08:39:06 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -611,7 +611,7 @@ linux_mmap(struct proc *p, struct linux_mmap_args *args, int *retval)
|
||||
bsd_args.flags |= MAP_ANON;
|
||||
bsd_args.addr = linux_args.addr;
|
||||
bsd_args.len = linux_args.len;
|
||||
bsd_args.prot = linux_args.prot;
|
||||
bsd_args.prot = linux_args.prot | PROT_READ; /* always required */
|
||||
bsd_args.fd = linux_args.fd;
|
||||
bsd_args.pos = linux_args.pos;
|
||||
bsd_args.pad = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user