android_kernel_samsung_msm8976/include
David Herrmann e3609fdb39 mm: allow drivers to prevent new writable mappings
This patch (of 6):

The i_mmap_writable field counts existing writable mappings of an
address_space.  To allow drivers to prevent new writable mappings, make
this counter signed and prevent new writable mappings if it is negative.
This is modelled after i_writecount and DENYWRITE.

This will be required by the shmem-sealing infrastructure to prevent any
new writable mappings after the WRITE seal has been set.  In case there
exists a writable mapping, this operation will fail with EBUSY.

Note that we rely on the fact that iff you already own a writable mapping,
you can increase the counter without using the helpers.  This is the same
that we do for i_writecount.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Ryan Lortie <desrt@desrt.ca>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Daniel Mack <zonque@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-08 05:52:37 -07:00
..
acpi
asm-generic asm-generic: Fix local variable shadow in __set_fixmap_offset 2019-07-27 22:08:56 +02:00
clocksource
crypto crypto: authenc - Export key parsing helper function 2019-07-27 21:53:36 +02:00
drm treewide: Fix typo in Documentation/DocBook 2019-07-27 22:10:20 +02:00
dt-bindings
keys KEYS: user: Align the payload buffer 2019-07-27 22:10:23 +02:00
kvm
linux mm: allow drivers to prevent new writable mappings 2020-10-08 05:52:37 -07:00
math-emu
media media: v4l: event: Prevent freeing event subscriptions while accessed 2019-07-27 21:51:55 +02:00
memory
misc
net net: fix possible overflow in __sk_mem_raise_allocated() 2020-02-12 22:53:24 +01:00
pcmcia
ras
rdma RDMA/core: Fix incorrect structure packing for booleans 2019-07-27 21:43:09 +02:00
rxrpc
scsi scsi: libsas: align sata_device's rps_resp on a cacheline 2019-07-27 21:46:11 +02:00
sdp
soc/qcom qseecom: Add a new smc cmd to check RPMB key provision status 2019-07-27 22:10:55 +02:00
sound lsm: check payload size validity before using it as array index 2019-07-27 22:10:55 +02:00
target target: Avoid mappedlun symlink creation during lun shutdown 2019-07-27 21:44:16 +02:00
trace Revert "lowmemorykiller: adapt to vmpressure" 2019-07-27 22:09:44 +02:00
uapi shm: add sealing API 2020-10-08 05:52:37 -07:00
video
xen
Kbuild