diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-08 15:15:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-08 15:15:47 -0400 |
commit | 29191c7f71aa55401c83df60482417d3c511edde (patch) | |
tree | 58161bbcce76e4416e65559267a5e713b99dad9c | |
parent | b0bc65729070b9cbdbb53ff042984a3c545a0e34 (diff) | |
parent | 6c15a8516b8118eb19a59fd0bd22df41b9101c32 (diff) |
Merge tag 'char-misc-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH:
"Here are two char/misc fixes for 4.0-rc3.
One is a reported binder driver fix needed due to a change in the mm
core that happened in 4.0-rc1. Another is a mei driver fix that
resolves a reported issue in that driver.
Both have been in linux-next for a while"
* tag 'char-misc-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
mei: make device disabled on stop unconditionally
android: binder: fix binder mmap failures
-rw-r--r-- | drivers/android/binder.c | 10 | ||||
-rw-r--r-- | drivers/misc/mei/init.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 33b09b6568a4..6607f3c6ace1 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
@@ -551,7 +551,6 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate, | |||
551 | { | 551 | { |
552 | void *page_addr; | 552 | void *page_addr; |
553 | unsigned long user_page_addr; | 553 | unsigned long user_page_addr; |
554 | struct vm_struct tmp_area; | ||
555 | struct page **page; | 554 | struct page **page; |
556 | struct mm_struct *mm; | 555 | struct mm_struct *mm; |
557 | 556 | ||
@@ -600,10 +599,11 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate, | |||
600 | proc->pid, page_addr); | 599 | proc->pid, page_addr); |
601 | goto err_alloc_page_failed; | 600 | goto err_alloc_page_failed; |
602 | } | 601 | } |
603 | tmp_area.addr = page_addr; | 602 | ret = map_kernel_range_noflush((unsigned long)page_addr, |
604 | tmp_area.size = PAGE_SIZE + PAGE_SIZE /* guard page? */; | 603 | PAGE_SIZE, PAGE_KERNEL, page); |
605 | ret = map_vm_area(&tmp_area, PAGE_KERNEL, page); | 604 | flush_cache_vmap((unsigned long)page_addr, |
606 | if (ret) { | 605 | (unsigned long)page_addr + PAGE_SIZE); |
606 | if (ret != 1) { | ||
607 | pr_err("%d: binder_alloc_buf failed to map page at %p in kernel\n", | 607 | pr_err("%d: binder_alloc_buf failed to map page at %p in kernel\n", |
608 | proc->pid, page_addr); | 608 | proc->pid, page_addr); |
609 | goto err_map_kernel_failed; | 609 | goto err_map_kernel_failed; |
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 9306219d5675..6ad049a08e4d 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -341,6 +341,8 @@ void mei_stop(struct mei_device *dev) | |||
341 | 341 | ||
342 | dev->dev_state = MEI_DEV_POWER_DOWN; | 342 | dev->dev_state = MEI_DEV_POWER_DOWN; |
343 | mei_reset(dev); | 343 | mei_reset(dev); |
344 | /* move device to disabled state unconditionally */ | ||
345 | dev->dev_state = MEI_DEV_DISABLED; | ||
344 | 346 | ||
345 | mutex_unlock(&dev->device_lock); | 347 | mutex_unlock(&dev->device_lock); |
346 | 348 | ||