summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android
AgeCommit message (Collapse)AuthorFilesLines
2012-03-15Staging: android: ram_console.c:Greg Kroah-Hartman1-0/+4
Fix build error when CONFIG_PRINTK is not selected. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09Staging: android: binder: Fix use-after-free bugArve Hjønnevåg1-1/+4
binder_update_page_range could read freed memory if the vma of the selected process was freed right before the check that the vma belongs to the mm struct it just locked. If the vm_mm pointer in that freed vma struct had also been rewritten with a value that matched the locked mm struct, then the code would proceed and possibly modify the freed vma. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09staging: ram_console: Fix section mismatchesStephen Boyd1-5/+2
WARNING: vmlinux.o(.text+0xfcf6e): Section mismatch in reference from the function ram_console_driver_probe() to the function .init.text:persistent_ram_init_ringbuffer() The function ram_console_driver_probe() references the function __init persistent_ram_init_ringbuffer(). This is often because ram_console_driver_probe lacks a __init annotation or the annotation of persistent_ram_init_ringbuffer is wrong. Move this driver to platform_driver_probe() because ram console devices aren't going to be added and removed at runtime. Also shorten the probe function name since driver is redundant and makes the function name long. Cc: Android Kernel Team <kernel-team@android.com> Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08staging: android: ram_console: honor dmesg_restrictNick Kralevich1-0/+3
The Linux kernel has a setting called dmesg_restrict. When true, only processes with CAP_SYSLOG can view the kernel dmesg logs. This helps prevent leaking of kernel information into user space. On Android, it's possible to bypass these restrictions by viewing /proc/last_kmsg. This change makes /proc/last_kmsg require the same permissions as dmesg. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Nick Kralevich <nnk@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08staging: android: ram_console: fix crash in ram_console_late_initColin Cross1-0/+3
If the persistent ram buffer is not available, ram_console_late_init would crash when dereferencing ram_console_zone. Return early if ram console was not initialized. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08staging: android: persistent_ram: add notrace to persistent_ram_writeColin Cross1-4/+4
Add the notrace attribute to persistent_ram_write and the non-ecc functions that it calls to allow persistent_ram to be used for ftracing (only when ecc is disabled). CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08staging: android: persistent_ram: make persistent_ram_write atomicColin Cross1-39/+101
Allow persistent_ram_write to be called on multiple cpus at the same time, as long as ecc is not in use. Uses atomics for the buffer->start and buffer->size counters. [jstultz: Fix up some pr_info casting issues on 64bit] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08staging: android: persistent_ram: handle reserving and mapping memoryColin Cross3-61/+144
Replace the ioremapped memory passed in from the drivers with a memblock_reserve and vmap. Adds a new function, persistent_ram_early_init, designed to be called from the machine init_early callback, that calls memblock_remove and saves the provided persistent ram area layout. Drivers only pass in their struct device * and ecc settings. Locating and mapping the memory is now handled entirely within persistent_ram. Also, convert ram_console to the new persistent_ram_init parameters that only take a struct device * and ecc settings. [jstultz: Fix pr_info casting issues on 64bit, folded two patches as the build breaks if they are apart. Also replaced phys_to_page() w/ pfn_to_page(addr>>PAGE_SHIFT), as phys_to_page is only on a few arches.] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08staging: android: persistent_ram: refactor ecc supportColin Cross4-147/+143
Remove CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION and related #ifdefs. Also allow persistent ram zones without ecc enabled. For some use cases, like the data portion of the upcoming persistent_vars patches, or a persistent ftrace ringbuffer, ecc on every update is too expensive. CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08staging: android: ram_console: split out persistent ramColin Cross5-274/+396
Split ram_console into two halves. persistent_ram is a set of apis that handle a block of memory that does not get erased across a reboot. It provides functions to fill it as a single buffer or a ring buffer, and to extract the old data after a reboot. It handles ecc on the data to correct bit errors introduced during reboot. ram_console is now a small wrapper around persistent_ram that feeds console data into the ringbuffer, and exports the old data to /proc/last_kmsg after a reboot. [jstultz: Moved persistent_ram.h to staging dir] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07staging: android: ram_console: drop verbose ram_console supportColin Cross2-8/+0
Equivalent functionality can be obtained with loglevel=15 CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07staging: android: ram_console: drop early buffer supportColin Cross2-45/+0
Early ramconsole is not very useful, an early crash will prevent getting the logged data out on the next boot, and CONFIG_DEBUG_LL=y will get the same information. Drop it to simplify a future refactoring. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07staging: android: ram_console: move footer stringsColin Cross1-47/+68
Don't store the bootinfo string and the ecc status string with the recovered old log data. This will simplify refactoring the persistent ram code out of the ram console code later. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07staging: android: ram_console: set CON_ANYTIME console flagDima Zavin1-1/+1
We want to ensure that we get all the console messages, even ones that occur while the printing CPU is not yet online. [jstultz: tweaked commit subject line] CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Dima Zavin <dima@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07Staging: android: lowmemorykiller.cGreg Kroah-Hartman1-1/+1
Fix compiler warning about the type of the module parameter. Cc: San Mehat <san@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07staging: android/lowmemorykiller: Don't unregister notifier from atomic contextPaul E. McKenney1-7/+7
The lowmemorykiller registers an atomic notifier for notfication of when the task is freed. From this atomic notifier callback, it removes the atomic notifier via task_free_unregister(). This is incorrect because atomic_notifier_chain_unregister() calls syncronize_rcu(), which can sleep, which shouldn't be done from an atomic notifier. Fix this by registering the notifier during init, and only unregister it if the lowmemorykiller is unloaded. Rebased to -next by Paul E. McKenney. Rebased to -next again by Anton Vorontsov. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Christian Bejram <christian.bejram@stericsson.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07Staging:android: Change type for binder_debug_no_lock switch to boolZhengwang Ruan1-1/+1
GCC warns that module_param_named() indirectly returns a bool type value which is different from 'int' type binder_debug_no_lock declared. Change it to bool because it is a internal switch for debugging. Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29Staging: android: timed_gpio: Removed spaces before tabsJohannes Thumshirn1-3/+3
Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24staging: logger: hold mutex while removing readerRabin Vincent1-0/+5
The readers list is traversed under the log->mutex lock (for example from fix_up_readers()), but the deletion of elements from this list is not being done under this lock. Cc: Brian Swetland <swetland@google.com> Cc: Dima Zavin <dima@android.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13staging: android, lowmemorykiller: convert to use oom_score_adjDavid Rientjes1-21/+22
/proc/pid/oom_adj is deprecated and will be removed in August 2012 according to Documentation/feature-removal-schedule.txt. Convert its usage in the lowmemorykiller to use the new interface, oom_score_adj, instead. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10Merge tag 'staging-3.3-rc3' into staging-nextGreg Kroah-Hartman12-49/+1122
This was done to resolve some merge issues with the following files that had changed in both branches: drivers/staging/rtl8712/rtl871x_sta_mgt.c drivers/staging/tidspbridge/rmgr/drv_interface.c drivers/staging/zcache/zcache-main.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Support old drivers via preprocessor aliasingJohn Stultz2-0/+23
Older out of tree drivers that were desgined to the Android Alarm in-kernel API may not build due to the namespace collision fixed in an earlier patch. Per Arve's suggestion, this patch provides preprocessor macros that allow older drivers to build. CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Fixup minor pr_alarm warningsJohn Stultz1-2/+2
This patch fixes the following warnings: drivers/staging/android/alarm.c: In function ‘alarm_timer_triggered’: drivers/staging/android/alarm.c:344: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’ drivers/staging/android/alarm.c:367: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’ CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Fix bad index when canceling alarms[]JP Abgrall1-1/+1
It was using ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK as an index. CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> CC: JP Abgrall <jpa@google.com> Change-Id: I919860cc71254453e382616bce9fd5455802cb3d Signed-off-by: JP Abgrall <jpa@google.com> [jstultz: Tweaked commit subject] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Update hrtimer if alarm at the head of the queue is ↵Arve Hjønnevåg1-4/+7
reprogrammed If an alarm was restarted with a value that moved it away from the head of a queue, the hrtimer would not be updated. This would cause unnecessary wakeups. CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Change-Id: If379f8dd92b0bdb3173bd8d057adfe0dc1d15259 Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Disable Android alarm driver by defaultPraneeth Kumar Bajjuri1-1/+1
Do not enable Android alarm driver by default CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> CC: Praneeth Bajjuri <praneeth@ti.com> Change-Id: Iff8f7a65c4eceecfd084074937c72824697b5e7f Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> [jstultz: tweaked commit subject & msg] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Reenable android alarm driverJohn Stultz2-0/+19
Now that it builds, re-enable android alarm driver in the makefile and kconfig CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: HACK: wakelock workaroundJohn Stultz2-2/+23
Allow Android alarmtimer device to build while wakelocks are still out of tree. CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Fix namespace collision with upstreamed alarmtimersJohn Stultz3-33/+35
The upstreamed alarmtimers are similar but not quite 100% API compatibile with the android in-kernel alarm api. To aid the transition, prefix the the android in-kernel api with android_ CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Fix include compile issuesJohn Stultz2-4/+2
The file asm/mach/time.h doesn't exist on all arches, so include <linux/time.h>. Also linux/sysdev.h is gone so kill it. CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Add needed module.h includesAndy Green2-0/+2
Add module.h includes required to build CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> CC: Andy Green <andy.green@linaro.org> Signed-off-by: Andy Green <andy.green@linaro.org> [jstultz: Tweaked commit subject, folded two patches into one] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Don't use save_time_delta.Arve Hjønnevåg1-5/+6
Remove references to non-existant save_time_delta. Change-Id: Iaefeca497de02fe36b7f5d79075912f6e349ec53 CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> [Added commit message -jstultz] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: android-alarm: Add android alarm driver & in-kernel alarm interfaceArve Hjønnevåg3-0/+978
Drivers can now create alarms that will use an hrtimer while the system is running and the rtc to wake up from suspend. CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> [Fold and move alarm driver and interface to staging, fix whitespace issue, drop kconfig & make file changes as it currently doesn't build -jstultz] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android/lowmemorykiller: Do not kill kernel threadsAnton Vorontsov1-0/+3
LMK should not try killing kernel threads. Suggested-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android/lowmemorykiller: No need for task->signal checkAnton Vorontsov1-7/+1
task->signal == NULL is not possible, so no need for these checks. Suggested-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android/lowmemorykiller: Better mm handlingAnton Vorontsov1-7/+9
LMK should not directly check for task->mm. The reason is that the process' threads may exit or detach its mm via use_mm(), but other threads may still have a valid mm. To catch this we use find_lock_task_mm(), which walks up all threads and returns an appropriate task (with lock held). Suggested-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android/lowmemorykiller: Don't grab tasklist_lockAnton Vorontsov1-3/+4
Grabbing tasklist_lock has its disadvantages, i.e. it blocks process creation and destruction. If there are lots of processes, blocking doesn't sound as a great idea. For LMK, it is sufficient to surround tasks list traverse with rcu_read_{,un}lock(). >From now on using force_sig() is not safe, as it can race with an already exiting task, so we use send_sig() now. As a downside, it won't kill PID namespace init processes, but that's not what we want anyway. Suggested-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android: logger: clarify non-update of w_off in do_write_log_from_userTim Bird1-0/+6
Add comment to explain when w_off is not updated in case of failed second fragment copy to buffer. Signed-off-by: Tim Bird <tim.bird@am.sony.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android: logger: clarify code in clock_intervalTim Bird1-8/+20
Add commentary, rename the function and make the code easier to read. Signed-off-by: Tim Bird <tim.bird@am.sony.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android: logger: reorder prepare_to_wait and mutex_lockTim Bird1-1/+2
If mutex_lock waits, it will return in state TASK_RUNNING, rubbing out the effect of prepare_to_wait(). Signed-off-by: Tim Bird <tim.bird@am.sony.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android: logger: simplify and optimize get_entry_lenTim Bird1-8/+12
Make this code slightly easier to read, and eliminate calls to sub-routines. Some of these were previously optimized away by the compiler, but one memcpy was not. In my testing, this makes the code about 20% smaller, and has no sub-routine calls and no branches (on ARM). v2 of this patch is, IMHO, easier to read than v1. Compared to that patch it uses __u8 instead of unsigned char, for consistency with the __u16 val data type, simplifies the conditional expression, adds a another comment, and moves a common statement out of the if. Signed-off-by: Tim Bird <tim.bird@am.sony.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android: logger: Change logger_offset() from macro to functionTim Bird1-6/+10
Convert to function and add log as a parameter, rather than relying on log in the context of the macro. Signed-off-by: Tim Bird <tim.bird@am.sony.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08drivers/staging/android/timed_gpio.c: Stlye fixesTracey Dent1-3/+3
Just made it more neat and not bother scripts/checkpatch.pl Signed-off-by: Tracey Dent <tdent48227@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08drivers/staging/android/ashmem.c: CleanupsTracey Dent1-2/+2
Minor cleanups that consist of removal of a whitespace and make file_operations const. Signed-off-by: Tracey Dent <tdent48227@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08Staging: android: ram_console: Use resource_size functionThomas Meyer1-1/+1
The semantic patch that makes this change is available in scripts/coccinelle/api/resource_size.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08drivers:staging:android Typos: fix some comments that have typos in them.Justin P. Mattock2-2/+2
Below is a patch that fixes some typos in some comments. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android: ram_console use kmemdup instead of kmallocGreg Dietsche1-3/+2
Replace kmalloc + memcpy will kmemdup in ram_console_late_init Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android/ram_console: Don't build on arches w/o ioremapAnton Vorontsov1-0/+1
This patch fixes UML build: CC drivers/staging/android/ram_console.o drivers/staging/android/ram_console.c: In function 'ram_console_driver_probe': drivers/staging/android/ram_console.c:358:2: error: implicit declaration of function 'ioremap' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [drivers/staging/android/ram_console.o] Error 1 Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: android: lowmemorykiller: Don't wait more than one second for a ↵Arve Hjønnevåg1-1/+4
process to die If a process forked and the child process was killed by the lowmemorykiller, the lowmemory killer would be disabled until the parent process reaped the child or it died itself. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08Staging: android: binder: Fix crashes when sharing a binder file between ↵Arve Hjønnevåg1-1/+11
processes Opening the binder driver and sharing the file returned with other processes (e.g. by calling fork) can crash the kernel. Prevent these crashes with the following changes: - Add a mutex to protect against two processes mmapping the same binder_proc. - After locking mmap_sem, check that the vma we want to access (still) points to the same mm_struct. - Use proc->tsk instead of current to get the files struct since this is where we get the rlimit from. Signed-off-by: Arve Hjønnevåg <arve@android.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>