diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-05 19:20:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-05 19:20:22 -0400 |
commit | abf7dba7c4f77d781f6df50fefb19a64c5dc331f (patch) | |
tree | 38648731b502d5aec508f3b33f6616190e598eb6 /drivers/android/binder.c | |
parent | 07c4dd3435aa387d3b58f4e941dc516513f14507 (diff) | |
parent | b23220fe054e92f616b82450fae8cd3ab176cc60 (diff) |
Merge tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here is the "big" char and misc driver patches for 4.18-rc1.
It's not a lot of stuff here, but there are some highlights:
- coreboot driver updates
- soundwire driver updates
- android binder updates
- fpga big sync, mostly documentation
- lots of minor driver updates
All of these have been in linux-next for a while with no reported
issues"
* tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (81 commits)
vmw_balloon: fixing double free when batching mode is off
MAINTAINERS: Add driver-api/fpga path
fpga: clarify that unregister functions also free
documentation: fpga: move fpga-region.txt to driver-api
documentation: fpga: add bridge document to driver-api
documentation: fpga: move fpga-mgr.txt to driver-api
Documentation: fpga: move fpga overview to driver-api
fpga: region: kernel-doc fixes
fpga: bridge: kernel-doc fixes
fpga: mgr: kernel-doc fixes
fpga: use SPDX
fpga: region: change api, add fpga_region_create/free
fpga: bridge: change api, don't use drvdata
fpga: manager: change api, don't use drvdata
fpga: region: don't use drvdata in common fpga code
Drivers: hv: vmbus: Removed an unnecessary cast from void *
ver_linux: Drop redundant calls to system() to test if file is readable
ver_linux: Move stderr redirection from function parameter to function body
misc: IBM Virtual Management Channel Driver (VMC)
rpmsg: Correct support for MODULE_DEVICE_TABLE()
...
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r-- | drivers/android/binder.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index e578eee31589..95283f3bb51c 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
@@ -72,10 +72,6 @@ | |||
72 | #include <linux/security.h> | 72 | #include <linux/security.h> |
73 | #include <linux/spinlock.h> | 73 | #include <linux/spinlock.h> |
74 | 74 | ||
75 | #ifdef CONFIG_ANDROID_BINDER_IPC_32BIT | ||
76 | #define BINDER_IPC_32BIT 1 | ||
77 | #endif | ||
78 | |||
79 | #include <uapi/linux/android/binder.h> | 75 | #include <uapi/linux/android/binder.h> |
80 | #include "binder_alloc.h" | 76 | #include "binder_alloc.h" |
81 | #include "binder_trace.h" | 77 | #include "binder_trace.h" |
@@ -2058,8 +2054,8 @@ static size_t binder_validate_object(struct binder_buffer *buffer, u64 offset) | |||
2058 | struct binder_object_header *hdr; | 2054 | struct binder_object_header *hdr; |
2059 | size_t object_size = 0; | 2055 | size_t object_size = 0; |
2060 | 2056 | ||
2061 | if (offset > buffer->data_size - sizeof(*hdr) || | 2057 | if (buffer->data_size < sizeof(*hdr) || |
2062 | buffer->data_size < sizeof(*hdr) || | 2058 | offset > buffer->data_size - sizeof(*hdr) || |
2063 | !IS_ALIGNED(offset, sizeof(u32))) | 2059 | !IS_ALIGNED(offset, sizeof(u32))) |
2064 | return 0; | 2060 | return 0; |
2065 | 2061 | ||
@@ -3925,10 +3921,11 @@ retry: | |||
3925 | binder_inner_proc_unlock(proc); | 3921 | binder_inner_proc_unlock(proc); |
3926 | if (put_user(e->cmd, (uint32_t __user *)ptr)) | 3922 | if (put_user(e->cmd, (uint32_t __user *)ptr)) |
3927 | return -EFAULT; | 3923 | return -EFAULT; |
3924 | cmd = e->cmd; | ||
3928 | e->cmd = BR_OK; | 3925 | e->cmd = BR_OK; |
3929 | ptr += sizeof(uint32_t); | 3926 | ptr += sizeof(uint32_t); |
3930 | 3927 | ||
3931 | binder_stat_br(proc, thread, e->cmd); | 3928 | binder_stat_br(proc, thread, cmd); |
3932 | } break; | 3929 | } break; |
3933 | case BINDER_WORK_TRANSACTION_COMPLETE: { | 3930 | case BINDER_WORK_TRANSACTION_COMPLETE: { |
3934 | binder_inner_proc_unlock(proc); | 3931 | binder_inner_proc_unlock(proc); |
@@ -4696,7 +4693,7 @@ static void binder_vma_close(struct vm_area_struct *vma) | |||
4696 | binder_defer_work(proc, BINDER_DEFERRED_PUT_FILES); | 4693 | binder_defer_work(proc, BINDER_DEFERRED_PUT_FILES); |
4697 | } | 4694 | } |
4698 | 4695 | ||
4699 | static int binder_vm_fault(struct vm_fault *vmf) | 4696 | static vm_fault_t binder_vm_fault(struct vm_fault *vmf) |
4700 | { | 4697 | { |
4701 | return VM_FAULT_SIGBUS; | 4698 | return VM_FAULT_SIGBUS; |
4702 | } | 4699 | } |
@@ -4730,7 +4727,9 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) | |||
4730 | failure_string = "bad vm_flags"; | 4727 | failure_string = "bad vm_flags"; |
4731 | goto err_bad_arg; | 4728 | goto err_bad_arg; |
4732 | } | 4729 | } |
4733 | vma->vm_flags = (vma->vm_flags | VM_DONTCOPY) & ~VM_MAYWRITE; | 4730 | vma->vm_flags |= VM_DONTCOPY | VM_MIXEDMAP; |
4731 | vma->vm_flags &= ~VM_MAYWRITE; | ||
4732 | |||
4734 | vma->vm_ops = &binder_vm_ops; | 4733 | vma->vm_ops = &binder_vm_ops; |
4735 | vma->vm_private_data = proc; | 4734 | vma->vm_private_data = proc; |
4736 | 4735 | ||