Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mnm9994u/aries
base: baa55d5b7d
...
head fork: mnm9994u/aries
compare: b1dd7993f6
Checking mergeability… Don't worry, you can still create the pull request.
This comparison is big! We're only showing the most recent 250 commits
Commits on Dec 09, 2012
stratosk aries: rfkill: fix unbalanced irq (forgot this) fb884cd
stratosk Disable incall volume settings
Too much distortion
313ada4
stratosk 2.8.0 bfb252a
Commits on Dec 10, 2012
stratosk 3.0.56 8e8d81a
Commits on Dec 11, 2012
stratosk 2.8.0c e79e5fe
stratosk 2.8.0v b152d79
Commits on Dec 16, 2012
@jt1134 jt1134 ce147: fix reporting of model number
Change-Id: I0247c5bb3cf87f22630ccb65e84f14498d8bb36c

Signed-off-by: stratosk <stratosk@semaphore.gr>
7e427b2
Commits on Dec 17, 2012
stratosk 3.0.57 75e0d77
@jt1134 jt1134 ce147: fix derp in model number reporting patch
- oooooooooops

Change-Id: I608145d369781c9549085f2a889eeeee52fcf14f

Signed-off-by: stratosk <stratosk@semaphore.gr>
071744c
Commits on Dec 18, 2012
stratosk 2.8.3 be6b002
Commits on Dec 28, 2012
stratosk Experiment with SAI 75924c8
stratosk 2.8.4 a68cdb9
Dmitry Shmidt net: wireless: bcmdhd: Avoid suspend on watchdog
Change-Id: Ic41a8f369a2ee8b2a0084e6a1cbf6b454ff53353
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
d3d2e95
Jithu Jance net: wireless: bcmdhd: Enable P2P probe request handling only during …
…discovery

Change-Id: I2db29d5ed7f66f2a45feb890c81d510fcad24dd2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
aad26d5
Dmitry Shmidt ipv4: Check if dev_out is NULL in ip_route_output_slow()
Change-Id: If04a8e99942dbe7e099e736dc87c2a49e1e778f9
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
b74f665
Dmitry Shmidt ipv4: Skip calling fib_detect_death() if fib_dev is NULL
Change-Id: I1b8c6c7e79cb8a05b4b715ddb3299d74edef0e14
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
d698ade
Dmitry Shmidt net: wireless: bcmdhd: Increase PNO wakelock to 7 sec
Change-Id: Ife7bac08d16e19b37d16f697e4ad9765ca6efbb7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
9203189
andy2_kuo net: wireless: bcmdhd: Prevent HT Avail timeout to frozen device whil…
…e asleep

Change-Id: I6ccd035539a3a3074b7ff1e06854ce396d784fc4
d78044f
Dmitry Shmidt net: wireless: bcmdhd: Postpone taking wd_wake lock
Change-Id: I3926d7a1a357d173144f408996f35f0929db711e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
3a61083
stratosk Revert: net: wireless: bcmdhd: Avoid suspend on watchdog 7ec501e
stratosk Revert "net: wireless: bcmdhd: Postpone taking wd_wake lock"
This reverts commit 3a61083.
9443123
Commits on Dec 29, 2012
stratosk Reduce number of buffers to save available RAM
thanks to DerTeufel
1e0d63a
stratosk 2.8.5 f8491f4
stratosk Latest changes from 3.4 b3b7387
stratosk block: Adding ROW scheduling algorithm
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
---
v4:
  - Fix bug in idling mechanism:
    -- Fix the delay passed to scedule_delayed_work
    -- Change the idle delay and idling-trigger frequency to be HZ
dependent
  - Destroy idle_workqueue on queue exit
  - Update the documentation
v3:
  - Fix bug in forced dispatch: Don't idle if forced dispatch
v2:
  No changes. Resend.
v1: Initial version
d287754
Commits on Dec 30, 2012
stratosk Make it GPL to work as module 3b762cc
stratosk 2.9.0 0b53453
stratosk SAI 9d6b914
stratosk Configs for captivate and vibrant 6c9f4e9
Commits on Jan 01, 2013
stratosk Drop BLN, implement CM LED 5ec4e18
stratosk SAI: file format a8ac6c8
Commits on Jan 03, 2013
@toddpoynor toddpoynor cpufreq: interactive: fix deadlock on spinlock in timer
Need to use irqsave/restore spinlock calls to avoid a deadlock in calls
from the timer.

Change-Id: I15b6b590045ba1447e34ca7b5ff342723e53a605
Signed-off-by: Todd Poynor <toddpoynor@google.com>
961ad00
Commits on Jan 05, 2013
Stratos Karafotis Logger from 3.8 263fd70
Stratos Karafotis Lowmemorykiller from 3.8 2190134
Stratos Karafotis Time gpio from 3.8 b7dbf29
Commits on Jan 06, 2013
Stratos Karafotis Remove max frequency to 800MHz when screen off 040f841
Stratos Karafotis 2.9.2 df71043
stratosk This function should remain cf95474
stratosk 2.9.3 f7c49ba
Commits on Jan 07, 2013
stratosk Implement both BLN and CM led e5177c6
stratosk 2.9.4 714adda
Commits on Jan 11, 2013
stratosk 3.0.58 06582e5
Lianwei Wang cpufreq: interactive: fix race on governor start/stop
There is race condition when both two cpu do CPUFREQ_GOV_STOP and one cpu
do CPUFREQ_GOV_START soon. The sysfs_remove_group is not done yet on one
cpu, but sysfs_create_group is called on another cpu, which cause governor
start failed and then kernel panic in timer callback because the policy and
cpu mask are all kfree in cpufreq driver.

Replace atomic with mutex to lock the whole START/STOP sequence.

Change-Id: I3762b3d44315ae021b8275aca84f5ea9147cc540
Signed-off-by: Lianwei Wang <a22439@motorola.com>
3b3bbda
@toddpoynor toddpoynor 2.9.5 ceaa336
Commits on Jan 13, 2013
stratosk Some work on SAI 7bf6a9e
Commits on Jan 17, 2013
stratosk 3.0.59 cae3bd3
stratosk Use default work queue instead of a new one
Fixed the coding style and make it compliant with Linux
c6a09fd
stratosk 2.9.7 2e2b40d
Commits on Jan 19, 2013
stratosk More work on SAI 2544874
Commits on Jan 21, 2013
stratosk 3.0.60 8579fd7
Commits on Jan 22, 2013
stratosk more experiments 0cbd6a6
stratosk 2.9.8 1461b77
Commits on Jan 23, 2013
stratosk Add tunables through sysfs 9e1ca54
Commits on Jan 28, 2013
stratosk 3.0.61 44661f5
Commits on Jan 31, 2013
stratosk drivers: android: Restructure code in lowmemorykiller
This patch restructure code for better readability and easier
maintenance.

Also introduces lowmemorykiller.h header file.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
bb891a5
stratosk Inline function step_update 068ec63
stratosk Use savedefconfig to produce semaphore's defconfig 30ad973
Commits on Feb 03, 2013
stratosk Drop header file e1f6b5e
stratosk Revert: Drop header file 0ec3f0f
stratosk Revert: drivers: android: Restructure code in lowmemorykiller 8b8f16b
Commits on Feb 04, 2013
stratosk 3.0.62 8e61dff
stratosk Fix coding style issues
Also rename sampling_down_max_momentum and
sampling_down_momentum_senstivity to shorter names
c2243e3
stratosk Save 2 subtractions
Use pre-calculated up_threshold - down-differential as down_diff
10dbefe
stratosk Fix warning about show_boosttime
Remove unused function
d2cf59b
stratosk Decrease sampling down momemtum faster
For more energy efficiency
66153f3
stratosk Fix coding style 1131b4c
stratosk 2.9.9 0c66901
Commits on Feb 07, 2013
stratosk Captivate and Vibrant defconfigs aa252fb
Commits on Feb 11, 2013
stratosk 3.0.63 2a514d3
stratosk Filter input for more smooth adjustments
Also replace unsigned int tuners with shorts
e69969a
stratosk 2.9.10 ab835a8
Commits on Feb 14, 2013
stratosk 3.0.64 86375e0
Commits on Feb 17, 2013
stratosk 3.0.65 83b8e51
Commits on Feb 18, 2013
stratosk 3.0.66-rc1 3fbb85f
Commits on Feb 19, 2013
stratosk Enable USB HID 656b2b9
stratosk 2.9.11 ab2560e
Commits on Feb 21, 2013
stratosk 3.0.66 a0324ad
stratosk cpufreq: ondemand: Calculate gradient of CPU load to early increase f…
…requency

Instead of checking only the absolute value of CPU load_freq to increase
frequency, we detect forthcoming CPU load rise and increase frequency
earlier.

Every sampling rate, we calculate the gradient of load_freq. If it is
too steep we assume that the load most probably will go over
up_threshold in next iteration(s) and we increase frequency immediately.

New tuners are introduced:
- early_demand: to enable this functionality (disabled by default).
- grad_up_threshold: over this gradient of load we will increase
frequency immediately.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
0d614b9
Commits on Feb 22, 2013
stratosk 2.9.12 52b2440
Commits on Feb 23, 2013
stratosk Captivate and Vibrant configs for 2.9.12 bc906f1
Commits on Feb 28, 2013
stratosk 3.0.67 5357a4a
Commits on Mar 04, 2013
stratosk turn off some debug messages cb191cc
stratosk 3.0.68
Rejected:

diff a/kernel/cgroup.c b/kernel/cgroup.c	(rejected hunks)
@@ -359,12 +359,20 @@ static void __put_css_set(struct css_set *cg, int
taskexit)
 		struct cgroup *cgrp = link->cgrp;
 		list_del(&link->cg_link_list);
 		list_del(&link->cgrp_link_list);
+
+		/*
+		 * We may not be holding cgroup_mutex, and if cgrp-
>count is
+		 * dropped to 0 the cgroup can be destroyed at any
time, hence
+		 * rcu_read_lock is used to keep it alive.
+		 */
+		rcu_read_lock();
 		if (atomic_dec_and_test(&cgrp->count) &&
 		    notify_on_release(cgrp)) {
 			if (taskexit)
 				set_bit(CGRP_RELEASABLE, &cgrp->flags);
 			check_for_release(cgrp);
 		}
+		rcu_read_unlock();

 		kfree(link);
 	}
22fdb84
stratosk 2.9.13 9eab005
Commits on Mar 08, 2013
stratosk cpufreq: conservative: Fix sampling_down_factor
 functionality

sampling_down_factor tunable is unused since commit
8e677ce (4 years ago).

This patch restores the original functionality and documents the
tunable.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
1936979
stratosk cpufreq: conservative: Fix the logic in frequency
decrease checking

When we evaluate the CPU load for frequency decrease we have to compare
the load against down_threshold. There is no need to subtract 10 points
from down_threshold.

Instead, we have to use the default down_threshold or user's selection
unmodified.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
206a0a5
stratosk cpufreq: conservative: Use an inline function to evaluate
Use an inline function to evaluate freq_target to avoid duplicate code.

Also, define a macro for the default frequency step.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
bf34198
Commits on Mar 14, 2013
stratosk 3.0.69 952f2b0
stratosk 2.9.15 ebc346c
Commits on Mar 20, 2013
stratosk 3.0.70 63d3a1d
Commits on Mar 25, 2013
@br101 br101 bcmdhd: Enable Ad-Hoc (IBSS) mode
This enables Ad-Hoc (IBSS) mode for bcmdhd. We basically just need to set the
interface flag and avoid some P2P specific settings while scanning.

Also add the "station get" command for IBSS mode.

Signed-off-by: Bruno Randolf <br1@einfach.org>

Change-Id: I10a047f76495d7fedfee16d0ac10de239e494567
Signed-off-by: stratosk <stratosk@semaphore.gr>
e02f3e5
Commits on Mar 28, 2013
stratosk Add parabolic function to update brightness 8a2ae82
stratosk 3.0.71 5b586e6
stratosk 2.9.18 583e788
Commits on Apr 06, 2013
stratosk 3.0.72 59601b0
stratosk ext4: fixup 64-bit divides in 3.0-stable backport of upstream fix
Replace C division operators with div64_u64 for divides introduced in:
commit 503f4bd
ext4: use atomic64_t for the per-flexbg free_clusters count

Specific to the 3.0-stable backport of the upstream patch.

Signed-off-by: Todd Poynor <toddpoynor@xxxxxxxxxx>
5677149
Commits on Apr 07, 2013
Arve Hjønnevåg staging: android: lowmemorykiller: Don't count reserved free memory
The amount of reserved memory varies between devices. Subtract it
here to reduce the amount of devices specific tuning needed for the
minfree values.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
264e19e
Arve Hjønnevåg staging: android: lowmemorykiller: Change default debug_level to 1
The select...to kill messages are not very useful when not debugging
the lowmemorykiller itself. After the change to check TIF_MEMDIE
instead of using a task notifer this message can also get very
noisy.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
bd81fc5
Dmitry Voytik staging: android: lowmemorykiller: well-marked debug print
Add "lowmemorykiller:" prefix to the debug print so it's easier to
analyse LMK's debug output:
dmesg | grep lowmemorykiller

Signed-off-by: Dmitry Voytik <dvv.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
3b6581c
Nick Kralevich staging: android: logger: Allow a UID to read it's own log entries
Modify the kernel logger to record the UID associated with
the log entries. Always allow the same UID which generated a
log message to read the log message.

Allow anyone in the logs group, or anyone with CAP_SYSLOG, to
read all log entries.

In addition, allow the client to upgrade log formats, so they
can get additional information from the kernel.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Nick Kralevich <nnk@google.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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
48a2908
Charndeep Grewal staging: android: logger: enforce GID and CAP check on log flush
Restrict log flushing to those in the logs group, or
anyone with CAP_SYSLOG.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Charndeep Grewal <csgrewa@tycho.ncsc.mil>
Signed-off-by: Charndeep Grewal <csgrewa@tycho.ncsc.mil>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
54f0562
Kent Overstreet aio: don't include aio.h in sched.h
Faster kernel compiles by way of fewer unnecessary includes.

[akpm@linux-foundation.org: fix fallout]
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
7a406b9
Nick Kralevich staging: android: logger: Allow a UID to read it's own log entries
Modify the kernel logger to record the UID associated with
the log entries. Always allow the same UID which generated a
log message to read the log message.

Allow anyone in the logs group, or anyone with CAP_SYSLOG, to
read all log entries.

In addition, allow the client to upgrade log formats, so they
can get additional information from the kernel.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Nick Kralevich <nnk@google.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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
4c4fdef
stratosk disable android_ram_console a64f803
stratosk Replace printk with pr_*
Also suppress some messages
a51fa06
stratosk video: samsung: Fix warning
Fix the following warning

drivers/video/samsung/s3cfb_mdnie.c: In function
‘mdnieset_ui_file_cmd_show’:
drivers/video/samsung/s3cfb_mdnie.c:614:2: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
2ce0575
stratosk Average adc value instead of normalized brightness 8a73c0c
stratosk Introduce max_br_threshold
Over this value (from light sensor) the brightness will be updated its
max value.

Thanks to Necromancer3 for this idea.
69483b6
stratosk android: lowmemorykiller: Add whitelist PIDs that never been killed
Add a whitelist parameter that lets user-space specify a set of PIDs (up
to 6) that never been killed. Works in similar way like adj and minfree.

For example:
echo "PID1, PID2" > /sys/module/lowmemorykiller/parameters/w_list
954ab18
Commits on Apr 08, 2013
Arve Hjønnevåg Staging: android: binder: Don't call dump_stack in binder_vma_open
If user-space partially unmaps the driver, binder_vma_open
would dump the kernel stack. This is not a kernel bug however
and will be treated as if the whole area was unmapped once
binder_vma_close gets called.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: stratosk <stratosk@semaphore.gr>
b760b60
Arve Hjønnevåg Staging: android: binder: Fix crashes when sharing a binder file betw…
…een 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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
eb3571b
Justin P. Mattock drivers:staging:android Typos: fix some comments that have typos in t…
…hem.

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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
4336dc8
David Howells Wrap accesses to the fd_sets in struct fdtable
Wrap accesses to the fd_sets in struct fdtable (for recording open files and
close-on-exec flags) so that we can move away from using fd_sets since we
abuse the fd_set structs by not allocating the full-sized structure under
normal circumstances and by non-core code looking at the internals of the
fd_sets.

The first abuse means that use of FD_ZERO() on these fd_sets is not permitted,
since that cannot be told about their abnormal lengths.

This introduces six wrapper functions for setting, clearing and testing
close-on-exec flags and fd-is-open flags:

	void __set_close_on_exec(int fd, struct fdtable *fdt);
	void __clear_close_on_exec(int fd, struct fdtable *fdt);
	bool close_on_exec(int fd, const struct fdtable *fdt);
	void __set_open_fd(int fd, struct fdtable *fdt);
	void __clear_open_fd(int fd, struct fdtable *fdt);
	bool fd_is_open(int fd, const struct fdtable *fdt);

Note that I've prepended '__' to the names of the set/clear functions because
they require the caller to hold a lock to use them.

Note also that I haven't added wrappers for looking behind the scenes at the
the array.  Possibly that should exist too.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120216174942.23314.1364.stgit@warthog.procyon.org.uk
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: stratosk <stratosk@semaphore.gr>
6d9f7cb
David Howells fs: Remove missed ->fds_bits from cessation use of fd_set structs int…
…ernally

Stephen Rothwell reported that the following commit broke the
linux-next build:

  1fd36adcd98c: Replace the fd_sets in struct fdtable with an array of unsigned longs

Fix places where ->fds_bits needed to be removed as the core
kernel no longer uses fd_set internally for file descriptor
table management.  There are two places:

 (1) drivers/staging/android/binder.c

 (2) arch/mips/kernel/kspd.c

     Question: Should sp_cleanup() in the MIPS arch be using find_next_bit()
     or fls()?

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Ralf Bächle <ralf@linux-mips.org>
cc: Arve Hjønnevåg <arve@android.com>
Link: http://lkml.kernel.org/r/20120224105707.32170.11550.stgit@warthog.procyon.org.uk
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: stratosk <stratosk@semaphore.gr>
611dea2
@ruanzhengwang ruanzhengwang Staging:android: Change type for binder_debug_no_lock switch to bool
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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
c020586
Arve Hjønnevåg Staging: android: binder: Fix use-after-free bug
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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
145531c
Sherwin Soltani drivers: staging: android: binder.c: fix printk macros
Change printk() messages to pr_* macros.

Signed-off-by: Sherwin Soltani <sherwin@wybc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
4b291cf
Sachin Kamat Staging: android: binder: Make task_get_unused_fd_flags function static
Silence the following warning:
drivers/staging/android/binder.c:368:5: warning:
symbol 'task_get_unused_fd_flags' was not declared. Should it be static?

Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
ba2707a
Sachin Kamat Staging: android: binder: Remove an inconsequential conditional macro
Removes an inconsequential conditional macro.

Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
00aa30b
@ebiederm ebiederm userns: Add kuid_t and kgid_t and associated infrastructure in uidgid.h
Start distinguishing between internal kernel uids and gids and
values that userspace can use.  This is done by introducing two
new types: kuid_t and kgid_t.  These types and their associated
functions are infrastructure are declared in the new header
uidgid.h.

Ultimately there will be a different implementation of the mapping
functions for use with user namespaces.  But to keep it simple
we introduce the mapping functions first to separate the meat
from the mechanical code conversions.

Export overflowuid and overflowgid so we can use from_kuid_munged
and from_kgid_munged in modular code.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: stratosk <stratosk@semaphore.gr>
2041f87
@ebiederm ebiederm userns: Add a Kconfig option to enforce strict kuid and kgid type checks
Make it possible to easily switch between strong mandatory
type checks and relaxed type checks so that the code can
easily be tested with the type checks and then built
with the strong type checks disabled so the resulting
code can be used.

Require strong mandatory type checks when enabling the user namespace.
It is very simple to make a typo and use the wrong type allowing
conversions to/from userspace values to be bypassed by accident,
the strong type checks prevent this.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: stratosk <stratosk@semaphore.gr>
b33a8a6
Al Viro binder: don't allow mmap() by process other than proc->tsk
we really shouldn't do get_files_struct() on a different process
and use it to modify the sucker later on.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: stratosk <stratosk@semaphore.gr>
5d37654
stratosk userns: Convert binder ipc to use kuids
Cc: Arve Hjønnevåg <arve@android.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
8278075
stratosk new helper: __alloc_fd()
Essentially, alloc_fd() in a files_struct we own a reference to.
Most of the time wanting to use it is a sign of lousy API
design (such as android/binder).  It's *not* a general-purpose
interface; better that than open-coding its guts, but again,
playing with other process' descriptor table is a sign of bad
design.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
b87dc05
stratosk expose a low-level variant of fd_install() for binder
Similar situation to that of __alloc_fd(); do not use unless you
really have to.  You should not touch any descriptor table other
than your own; it's a sure sign of a really bad API design.

As with __alloc_fd(), you *must* use a first-class reference to
struct files_struct; something obtained by get_files_struct(some task)
(let alone direct task->files) will not do.  It must be either
current->files, or obtained by get_files_struct(current) by the
owner of that sucker and given to you.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
5a21ea6
stratosk take descriptor-related part of close() to file.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
e0b3090
Arve Hjønnevåg Staging: android: binder: Add some missing binder_stat_br calls
Cached thread return errors, death notifications and new looper
requests were not included in the stats.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
cec5710
stratosk Staging: android: binder: Add some tracepoints
Add tracepoints:
- ioctl entry and exit
- Main binder lock: lock, locked and unlock
- Command and return buffer opcodes
- Transaction: create and receive
- Transaction buffer: create and free
- Object and file descriptor transfer
- binder_update_page_range

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
73c70fd
Arve Hjønnevåg Staging: android: binder: Fix memory leak on thread/process exit
If a thread or process exited while a reply, one-way transaction or
death notification was pending, the struct holding the pending work
was leaked.

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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
aa0c395
Arve Hjønnevåg Staging: android: binder: Allow using highmem for binder buffers
The default kernel mapping for the pages allocated for the binder
buffers is never used. Set the __GFP_HIGHMEM flag when allocating
these pages so we don't needlessly use low memory pages that may
be required elsewhere.

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>
Signed-off-by: stratosk <stratosk@semaphore.gr>
082323f
@unmole unmole Staging: android: binder: Fixed multi-line strings
Changed all user visible multi-line strings to single line.
Removed 'binder:' prefix on stings.

Signed-off-by: Anmol Sarma <unmole.in@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
47942e5
@CruzBishop CruzBishop staging: android: Fix two checkpatch issues in binder.c
This fixes two instances of
"static const char * array should probably be static const char * const"

I have seen other commits doing this in other files, so I am
assuming it should be done here as well.

Please tell me if this is wrong :)

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: stratosk <stratosk@semaphore.gr>
d163f11
stratosk 2.9.20 b7e609c
Commits on Apr 09, 2013
stratosk captivate and vibrant defconfigs 83479d4
Commits on Apr 10, 2013
stratosk Enable again RAM_CONSOLE
It caused bootloops to some devices (specially in captivate and vibrant)
7e98e6e
@dvdhrm dvdhrm HID: uhid: introduce user-space I/O driver support for HID
This adds a dummy driver that will support user-space I/O drivers for the
HID subsystem. This allows to write transport-level drivers like USB-HID
and Bluetooth-HID in user-space.

Low-Energy Bluetooth needs this to feed HID data that is parsed in
user-space back into the kernel.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
699c02e
@dvdhrm dvdhrm HID: uhid: add internal message buffer
When receiving messages from the HID subsystem, we need to process them
and store them in an internal buffer so user-space can read() on the char
device to retrieve the messages.

This adds a static buffer for 32 messages to each uhid device. Each
message is dynamically allocated so the uhid_device structure does not get
too big.

uhid_queue() adds a message to the buffer. If the buffer is full, the
message is discarded. uhid_queue_event() is an helper for messages without
payload.

This also adds a public header: uhid.h. It contains the declarations for
the user-space API. It is built around "struct uhid_event" which contains
a type field which specifies the event type and each event can then add a
variable-length payload. For now, there is only a dummy event but later
patches will add new event types and payloads.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16231e1
@dvdhrm dvdhrm HID: uhid: allow poll()'ing on uhid devices
As long as the internal buffer is not empty, we return POLLIN to
user-space.

uhid->head and uhid->tail are no atomics so the comparison may return
inexact results. However, this doesn't matter here as user-space would
need to poll() in two threads simultaneously to trigger this. And in this
case it doesn't matter if a cached result is returned or the exact new
result as user-space does not know which thread returns first from poll()
and the following read(). So it is safe to compare the values without
locking.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
0bde55a
@dvdhrm dvdhrm HID: uhid: implement read() on uhid devices
User-space can use read() to get a single event from uhid devices. read()
does never return multiple events. This allows us to extend the event
structure and still keep backwards compatibility.

If user-space wants to get multiple events in one syscall, they should use
the readv()/writev() syscalls which are supported by uhid.

This introduces a new lock which helps us synchronizing simultaneous reads
from user-space. We also correctly return -EINVAL/-EFAULT only on errors
and retry the read() when some other thread captured the event faster than
we did.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14d89cb
@dvdhrm dvdhrm HID: uhid: implement write() on uhid devices
Similar to read() you can only write() a single event with one call to an
uhid device. To write multiple events use writev() which is supported by
uhid.

We currently always return -EOPNOTSUPP but other events will be added in
later patches.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
02bb89a
@dvdhrm dvdhrm HID: uhid: add UHID_CREATE and UHID_DESTROY events
UHID_CREATE and UHID_DESTROY are used to create and destroy a device on an
open uhid char-device. Internally, we allocate and register an HID device
with the HID core and immediately start the device. From now on events may
be received or sent to the device.

The UHID_CREATE event has a payload similar to the data used by
Bluetooth-HIDP when creating a new connection.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2a9c92c
@dvdhrm dvdhrm HID: uhid: allow feeding input data into uhid devices
This adds a new event type UHID_INPUT which allows user-space to feed raw
HID reports into the HID subsystem. We copy the data into kernel memory
and directly feed it into the HID core.

There is no error handling of the events couldn't be parsed so user-space
should consider all events successfull unless read() returns an error.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5e0af17
@dvdhrm dvdhrm HID: uhid: forward hid report-descriptor to hid core
When the uhid_hid_parse callback is called we simply forward it to
hid_parse_report() with the data that we got in the UHID_CREATE event.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4f32707
@dvdhrm dvdhrm HID: uhid: add UHID_START and UHID_STOP events
We send UHID_START and UHID_STOP events to user-space when the HID core
starts/stops the device. This notifies user-space about driver readiness
and data-I/O can start now.

This directly forwards the callbacks from hid-core to user-space.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
46671f6
@dvdhrm dvdhrm HID: uhid: forward open/close events to user-space
HID core notifies us with *_open/*_close callbacks when there is an actual
user of our device. We forward these to user-space so they can react on
this. This allows user-space to skip I/O unless they receive an OPEN
event. When they receive a CLOSE event they can stop I/O again to save
energy.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
262c7aa
@dvdhrm dvdhrm HID: uhid: forward output request to user-space
If the hid-driver wants to send standardized data to the device it uses a
linux input_event. We forward this to the user-space transport-level
driver so they can perform the requested action on the device.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c3fb789
@dvdhrm dvdhrm HID: uhid: forward raw output reports to user-space
Some drivers that use non-standard HID features require raw output reports
sent to the device. We now forward these requests directly to user-space
so the transport-level driver can correctly send it to the device or
handle it correspondingly.

There is no way to signal back whether the transmission was successful,
moreover, there might be lots of messages coming out from the driver
flushing the output-queue. However, there is currently no driver that
causes this so we are safe. If some drivers need to transmit lots of data
this way, we need a method to synchronize this and can implement another
UHID_OUTPUT_SYNC event.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ad08a3f
@dvdhrm dvdhrm HID: uhid: implement feature requests
HID standard allows sending a feature request to the device which is
answered by an HID report. uhid implements this by sending a UHID_FEATURE
event to user-space which then must answer with UHID_FEATURE_ANSWER. If it
doesn't do this in a timely manner, the request is discarded silently.

We serialize the feature requests, that is, there is always only a single
active feature-request sent to user-space, other requests have to wait.
HIDP and USB-HID do it the same way.

Because we discard feature-requests silently, we must make sure to match
a response to the corresponding request. We use sequence-IDs for this so
user-space must copy the ID from the request into the answer.
Feature-answers are ignored if they do not contain the same ID as the
currently pending feature request.

Internally, we must make sure that feature-requests are synchronized with
UHID_DESTROY and close() events. We must not dead-lock when closing the
HID device, either, so we have to use separate locks.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
990697e
@dvdhrm dvdhrm HID: uhid: add documentation
This describes the protocol used by uhid for user-space applications. It
describes the details like non-blocking I/O and readv/writev for multiple
events per syscall.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8fd199d
@dvdhrm dvdhrm HID: uhid: add example program
This adds an example user-space program that emulates a 3 button mouse
with wheel. It detects keyboard presses and moves the mouse accordingly.

It register a fake HID device to feed the raw HID reports into the kernel.
In this example, you could use uinput to get the same result, but this
shows how to get the same behavior with uhid so you don't need HID parsers
in user-space.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
eedf2dc
Jiri Kosina HID: uhid: silence gcc warning
gcc is giving me:

drivers/hid/uhid.c: In function ‘uhid_hid_get_raw’:
drivers/hid/uhid.c:157: warning: ‘len’ may be used uninitialized in this function

which is clearly bogus, as

- when used as memcpy() argument, it's initialized properly
- the code is structured in a way that either 'ret' or 'len'
  is always initialized, so the return statement always has
  an initialized value.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
405fd74
Vinicius Costa Gomes HID: uhid: Fix sending events with invalid data
This was detected because events with invalid types were arriving
to userspace.

The code before this patch would only work for the first event in the
queue (when uhid->tail is 0).

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Reviewed-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5d4c3dd
@shayneholmes shayneholmes config: Enable UHID 9083a55
stratosk 2.9.21 d8199d2
Commits on Apr 12, 2013
stratosk 3.0.73 78419d6
stratosk Merge branch 'jb-4.2.1-with-uhid' of https://github.com/simonmelhart/…
…samsung-kernel-aries into jb-4.2.1

Thanks to n8r for implementing it to Semaphore.
5bddea3
Commits on Apr 19, 2013
stratosk 3.0.74 9a2550f
stratosk 2.9.22 aa4b96c
Commits on Apr 26, 2013
stratosk 3.0.75 a17a875
stratosk build UHID as module 11f6acd
stratosk 2.9.23 7d268d2
Commits on May 01, 2013
stratosk 3.0.76
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
bbf1cef
Stratos Karafotis sema_autobr: Change max_lux input to 4000 9e7a8ea
Stratos Karafotis 2.9.24
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
ac1bf4f
Commits on May 03, 2013
Stratos Karafotis sema_autobr: Fix typo
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
2effd94
Commits on May 08, 2013
Stratos Karafotis 3.0.77
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
e061f02
Commits on May 09, 2013
Stratos Karafotis sema_autobr: max_br_threshold can be 0
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
04f6b67
Commits on May 12, 2013
Stratos Karafotis 3.0.78 0972b8c
Stratos Karafotis sema_autobr: Permit greater values for more slower updates
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
11baa4b
Commits on May 13, 2013
Stratos Karafotis Revert "Disable incall volume settings"
This reverts commit 313ada4.
81f0d7a
Stratos Karafotis 2.9.25
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
e109dc4
Commits on May 19, 2013
Stratos Karafotis 3.0.79
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
edc85be
Commits on May 25, 2013
Stratos Karafotis 3.0.80
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
9a7f883
Commits on Jun 02, 2013
Stratos Karafotis cpufreq: ondemand: Change the calculation of target frequency
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
160b14f
Stratos Karafotis 2.9.26
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
759a92b
Commits on Jun 18, 2013
Stratos Karafotis 3.0.81
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
29d06c3
Stratos Karafotis 3.0.82
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
f8c99af
Commits on Jun 23, 2013
Stratos Karafotis 3.0.83
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
84bb042
Commits on Jun 26, 2013
Stratos Karafotis cpufreq: ondemand: Drop early_demand
Since we changed the calculation of target frequency early demand is
kind of useless.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
774792c
Commits on Jun 29, 2013
Stratos Karafotis 3.0.84
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
7943fba
Dmitry Shmidt net: wireless: bcmdhd: Update to version 5.90.195.104
- Fix p2p support for new wpa_supplicant
- Propagate disconnect error code for cfg80211

Change-Id: I9643fbad7b6170b0e794fd7854201931d5eefb22
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

Conflicts:
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
6ee2dd1
@ajs1984 ajs1984 gpu: pvr: Update to DDK 1.8@2198402
- Implemented a DC API change which queues a dummy display flip to
   workaround a rare and difficult to reproduce synchronization
   deadlock.
 - Eliminate log spam from Linux shrinker integration.

Conflicts:
	drivers/gpu/pvr/pvrversion.h
fbc814a
@imoseyon imoseyon gpu: pvr: bypass compat check if version is same but build # is diffe…
…rent

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
e1f6bdb
Stratos Karafotis 3.0.0
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
25ff13f
Commits on Aug 04, 2013
Stratos Karafotis 3.0.85
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
47f54c6
Stratos Karafotis 3.0.86
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
b226134
Stratos Karafotis 3.0.87
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
5170720
Stratos Karafotis 3.0.88 b9715ea
Stratos Karafotis 3.0.89
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
c28712e
Commits on Aug 11, 2013
@stephensmalley stephensmalley yaffs: fix getxattr support
When passed a buffer size of 0, getxattr(2) is documented to return the
size of the attribute value.  However, yaffs returns -ERANGE instead.
This breaks SELinux usage of getxattr.  Fix yaffs to return the
attribute size in this case.

Change-Id: I410e96ad36741b8fd6aef70d0aabc22391c8d5ac
Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>
754f06c
@stephensmalley stephensmalley yaffs: set security attribute at file creation
Add support to yaffs to set the security attribute of new inodes when
they are created.  This parallels similar support in other filesystems,
and is a requirement for SELinux and other MAC systems.

Change-Id: I46ffb4f6aabebfa7bd66a502b6d890998b0da08c
Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>
43d0376
@stephensmalley stephensmalley Do not ratelimit audit messages. We want to see them all.
Change-Id: I19c29788cc33b0f59e0bdfe04fe67c247239c559
71451e1
@stephensmalley stephensmalley Add permission checking for binder IPC.
Change-Id: Ia224e29427d39a6eeb0800a65ad2a8df2e91bebc

Conflicts:
	drivers/staging/android/binder.c
7040be4
Stratos Karafotis Revert "Add permission checking for binder IPC."
This reverts commit 7040be4.
706145b
JP Abgrall netfilter: xt_qtaguid: remove AID_* dependency for access control
qtaguid limits what can be done with /ctrl and /stats based on group
membership.
This changes removes AID_NET_BW_STATS and AID_NET_BW_ACCT, and picks
up the groups from the gid of the matching proc entry files.

Signed-off-by: JP Abgrall <jpa@google.com>
Change-Id: I42e477adde78a12ed5eb58fbc0b277cdaadb6f94
630042e
JP Abgrall netfilter: xt_qtaguid: extend iface stat to report protocols
In the past the iface_stat_fmt would only show global bytes/packets
for the skb-based numbers.
For stall detection in userspace, distinguishing tcp vs other protocols
makes it easier.
Now we report
  ifname total_skb_rx_bytes total_skb_rx_packets total_skb_tx_bytes
  total_skb_tx_packets {rx,tx}_{tcp,udp,ohter}_{bytes,packets}

Bug: 6818637
Signed-off-by: JP Abgrall <jpa@google.com>
72e00a8
JP Abgrall netfilter: xt_qtaguid: Allow tracking loopback
In the past it would always ignore interfaces with loopback addresses.
Now we just treat them like any other.
This also helps with writing tests that check for the presence
of the qtaguid module.

Signed-off-by: JP Abgrall <jpa@google.com>
9ca5a51
JP Abgrall netfilter: qtaguid: rate limit some of the printks
Some of the printks are in the packet handling path.
We now ratelimit the very unlikely errors to avoid
kmsg spamming.

Signed-off-by: JP Abgrall <jpa@google.com>
51dfc68
Stratos Karafotis config: Support for SELinux
Thanks to CM

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
0d258c2
@stephensmalley stephensmalley Add permission checking for binder IPC.
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
d14ffb1
@stephensmalley stephensmalley Do not apply permission checks to private files.
Change-Id: I472d9630de5113667c289dce7e4fdc8eace04e36
118391b
@stephensmalley stephensmalley Fix security_binder_transfer_binder hook.
Drop the owning task argument to security_binder_transfer_binder
since ref->node->proc can be NULL (dead owner?).
Revise the SELinux checking to apply a single transfer check between
the source and destination tasks.  Owning task is no longer relevant.
Drop the receive permission definition as it is no longer used.

This makes the transfer permission similar to the call permission; it is only
useful if you want to allow a binder IPC between two tasks (call permission)
but deny passing of binder references between them (transfer permission).

Change-Id: I6ec460ede8e07dadc9f52b61534b2b0021617302
f5d1eca
Commits on Aug 13, 2013
Stratos Karafotis 3.0.90
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
c29ce6e
Commits on Aug 16, 2013
Stratos Karafotis config: Enable more options for SELinux
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
70e6136
Stratos Karafotis 3.0.91
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
50a3680
Stratos Karafotis config: Disable SELinux
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
4bb3526
Stratos Karafotis 3.1.0
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
0e17131
Commits on Aug 23, 2013
@PRJosh PRJosh More options for SELinux on captivate
Change-Id: I0abfc59b1e0bb109301f45f6682b2f406b200468
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
23d5d05
@PRJosh PRJosh Revert "config: Disable SELinux"
This reverts commit 4bb3526.
f9b7406
Commits on Sep 21, 2013
Stratos Karafotis 3.0.92
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
2a8b1eb
Stratos Karafotis 3.0.93
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
7c71859
Stratos Karafotis 3.0.94
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
6b72b9a
Stratos Karafotis 3.0.95
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
a0dcb56
Stratos Karafotis 3.0.96
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
20b21e6
Commits on Sep 27, 2013
@PRJosh PRJosh More SELinux options on vibrant
Change-Id: Iade8aa0d3977c53618838690ad1fba14ada62fa7
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
caf1404
Stratos Karafotis 3.0.97
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
9515d52
Stratos Karafotis 3.2.0
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
8b4049b
@PRJosh PRJosh Merge remote-tracking branch 'stratos/jb-4.3' into jb-4.3 ba4f22d
@PRJosh PRJosh Updated defconfigs
Change-Id: I33071c454a1f5a5a1216038c1aa8635323f76ba7
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
23bc109
Commits on Oct 27, 2013
Stratos Karafotis config: Captivate and Vibrant updates
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
8b60eec
Stratos Karafotis 3.0.98
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
1ced057
Stratos Karafotis 3.0.99
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
88a9e75
Stratos Karafotis 3.0.100
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
71e1002
Stratos Karafotis 3.0.101
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
5922b6b
Stratos Karafotis 3.3.0
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
57411c5
@PRJosh PRJosh Merge remote-tracking branch 'stratos/jb-4.3' into HEAD
Conflicts:
	arch/arm/configs/semaphore_captivate_defconfig
	arch/arm/configs/semaphore_vibrant_defconfig

Change-Id: I9e9fe777bf3bd0b43df739c79e795f586993e5e5
2480ea7
Commits on Dec 04, 2013
Stratos Karafotis config: Enable SELinux
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
076fb4f
Stratos Karafotis config: compile FUSE built-in
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
35f2408
Commits on Dec 06, 2013
Stratos Karafotis 3.4.0
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
54254e8
@PRJosh PRJosh Merge remote-tracking branch 'stratos/kk-4.4' into HEAD 90ea39e
Commits on Dec 14, 2013
@PRJosh PRJosh Update defconfig to include fuse
Change-Id: I6796001a92e82f16799746185055bfebf6653629
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
c0155e1
Commits on Jan 19, 2014
@pawitp pawitp S5PC11X: JPEG: add ioctl to export memory configuration
This allows userspace libs3cjpeg to read memory configuration
from the kernel instead of using the hardcoded value.

Change-Id: I61248d659dbccf2e6cc656adc7fdf18773c2fcbd
f7bb29c
@pawitp pawitp aries: optimize JPEG memory configuration
Only 1MB is required for encoding of VGA JPEG images (used by FFC).
Note that thumbnail encoding function is not used.

Change-Id: Icea2fc74dfc692d98ae041b785238d6b847c4ddd
dd45f26
@mnm9994u Fix Buffers Count
Change-Id: Ie91979fb12fe38b3287634213dc3661a4651d502
dbc4456
@longman88 longman88 mutex: Make more scalable by doing less atomic operations
Date	Thu, 4 Apr 2013 10:54:16 -0400

In the __mutex_lock_common() function, an initial entry into
the lock slow path will cause two atomic_xchg instructions to be
issued. Together with the atomic decrement in the fast path, a total
of three atomic read-modify-write instructions will be issued in
rapid succession. This can cause a lot of cache bouncing when many
tasks are trying to acquire the mutex at the same time.

This patch will reduce the number of atomic_xchg instructions used by
checking the counter value first before issuing the instruction. The
atomic_read() function is just a simple memory read. The atomic_xchg()
function, on the other hand, can be up to 2 order of magnitude or even
more in cost when compared with atomic_read(). By using atomic_read()
to check the value first before calling atomic_xchg(), we can avoid a
lot of unnecessary cache coherency traffic. The only downside with this
change is that a task on the slow path will have a tiny bit
less chance of getting the mutex when competing with another task
in the fast path.

The same is true for the atomic_cmpxchg() function in the
mutex-spin-on-owner loop. So an atomic_read() is also performed before
calling atomic_cmpxchg().

The mutex locking and unlocking code for the x86 architecture can allow
any negative number to be used in the mutex count to indicate that some
tasks are waiting for the mutex. I am not so sure if that is the case
for the other architectures. So the default is to avoid atomic_xchg()
if the count has already been set to -1. For x86, the check is modified
to include all negative numbers to cover a larger case.

The following table shows the scalability data on an 8-node 80-core
Westmere box with a 3.7.10 kernel. The numactl command is used to
restrict the running of the high_systime workloads to 1/2/4/8 nodes
with hyperthreading on and off.

+-----------------+------------------+------------------+----------+
|  Configuration  | Mean Transaction | Mean Transaction | % Change |
|		  |  Rate w/o patch  | Rate with patch  |	   |
+-----------------+------------------------------------------------+
|		  |              User Range 1100 - 2000		   |
+-----------------+------------------------------------------------+
| 8 nodes, HT on  |      36980       |      148590      | +301.8%  |
| 8 nodes, HT off |      42799       |      145011      | +238.8%  |
| 4 nodes, HT on  |	 61318       |      118445      |  +51.1%  |
| 4 nodes, HT off |     158481       |      158592      |   +0.1%  |
| 2 nodes, HT on  |     180602       |      173967      |   -3.7%  |
| 2 nodes, HT off |     198409       |      198073      |   -0.2%  |
| 1 node , HT on  |     149042       |      147671      |   -0.9%  |
| 1 node , HT off |     126036       |      126533      |   +0.4%  |
+-----------------+------------------------------------------------+
|		  |              User Range 200 - 1000		   |
+-----------------+------------------------------------------------+
| 8 nodes, HT on  |      41525       |      122349      | +194.6%  |
| 8 nodes, HT off |      49866       |      124032      | +148.7%  |
| 4 nodes, HT on  |	 66409       |      106984      |  +61.1%  |
| 4 nodes, HT off |     119880       |      130508      |   +8.9%  |
| 2 nodes, HT on  |     138003       |      133948      |   -2.9%  |
| 2 nodes, HT off |     132792       |      131997      |   -0.6%  |
| 1 node , HT on  |     116593       |      115859      |   -0.6%  |
| 1 node , HT off |     104499       |      104597      |   +0.1%  |
+-----------------+------------------+------------------+----------+
AIM7 benchmark run has a pretty large run-to-run variance due to random
nature of the subtests executed. So a difference of less than +-5%
may not be really significant.

This patch improves high_systime workload performance at 4 nodes
and up by maintaining transaction rates without significant drop-off
at high node count.  The patch has practically no impact on 1 and 2
nodes system.

The table below shows the percentage time (as reported by perf
record -a -s -g) spent on the __mutex_lock_slowpath() function by
the high_systime workload at 1500 users for 2/4/8-node configurations
with hyperthreading off.

+---------------+-----------------+------------------+---------+
| Configuration | %Time w/o patch | %Time with patch | %Change |
+---------------+-----------------+------------------+---------+
|    8 nodes    |      65.34%     |      0.69%       |  -99%   |
|    4 nodes    |       8.70%	  |      1.02%	     |  -88%   |
|    2 nodes    |       0.41%     |      0.32%       |  -22%   |
+---------------+-----------------+------------------+---------+
It is obvious that the dramatic performance improvement at 8
nodes was due to the drastic cut in the time spent within the
__mutex_lock_slowpath() function.

The table below show the improvements in other AIM7 workloads (at 8
nodes, hyperthreading off).

+--------------+---------------+----------------+-----------------+
|   Workload   | mean % change | mean % change  | mean % change   |
|              | 10-100 users  | 200-1000 users | 1100-2000 users |
+--------------+---------------+----------------+-----------------+
| alltests     |     +0.6%     |   +104.2%      |   +185.9%       |
| five_sec     |     +1.9%     |     +0.9%      |     +0.9%       |
| fserver      |     +1.4%     |     -7.7%      |     +5.1%       |
| new_fserver  |     -0.5%     |     +3.2%      |     +3.1%       |
| shared       |    +13.1%     |   +146.1%      |   +181.5%       |
| short        |     +7.4%     |     +5.0%      |     +4.2%       |
+--------------+---------------+----------------+-----------------+
Signed-off-by: Waiman Long <Waiman.Long@hp.com>
Reviewed-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
19e8dc4
@longman88 longman88 mutex: restrict mutex spinning to only one task per mutex
Date	Thu, 4 Apr 2013 10:54:17 -0400

The current mutex spinning code allow multiple tasks to spin on a
single mutex concurrently. There are two major problems with this
approach:

 1. This is not very energy efficient as the spinning tasks are not
    doing useful work. The spinning tasks may also block other more
    important or useful tasks from running as preemption is disabled.
    Only one of the spinners will get the mutex at any time. The
    other spinners will have to wait for much longer to get it.

 2. The mutex data structure on x86-64 should be 32 bytes. The spinning
    code spin on lock->owner which, in most cases, should be in the same
    64-byte cache line as the lock->wait_lock spinlock. As a result,
    the mutex spinners are contending the same cacheline with other
    CPUs trying to get the spinlock leading to increased time spent
    on the spinlock as well as on the mutex spinning.

These problems are worse on system with large number of CPUs. One way
to reduce the effect of these two problems is to allow only one task
to be spinning on a mutex at any time.

This patch adds a new spinner field in the mutex.h to limit the
number of spinner to only one task. That will increase the size of
the mutex by 8 bytes in a 64-bit environment (4 bytes in a 32-bit
environment).

The AIM7 benchmarks were run on 3.7.10 derived kernels to show the
performance changes with this patch on a 8-socket 80-core system
with hyperthreading off.  The table below shows the mean % change
in performance over a range of users for some AIM7 workloads with
just the less atomic operation patch (patch 1) vs the less atomic
operation patch plus this one (patches 1+2).

+--------------+-----------------+-----------------+-----------------+
|   Workload   | mean % change   | mean % change   | mean % change   |
|              | 10-100 users    | 200-1000 users  | 1100-2000 users |
+--------------+-----------------+-----------------+-----------------+
| alltests     |     -0.2%       |     -3.8%       |    -4.2%        |
| five_sec     |     -0.6%       |     -2.0%       |    -2.4%        |
| fserver      |     +2.2%       |    +16.2%       |    +2.2%        |
| high_systime |     -0.3%       |     -4.3%       |    -3.0%        |
| new_fserver  |     +3.9%       |    +16.0%       |    +9.5%        |
| shared       |     -1.7%       |     -5.0%       |    -4.0%        |
| short        |     -7.7%       |     +0.2%       |    +1.3%        |
+--------------+-----------------+-----------------+-----------------+
It can be seen that this patch improves performance for the fserver and
new_fserver workloads while suffering some slight drop in performance
for the other workloads.

Signed-off-by: Waiman Long <Waiman.Long@hp.com>
Reviewed-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
341b6f7
Alex Shi rwsem: steal writing sem for better performance
Commit 5a50508 changes to rwsem from mutex, caused aim7 fork_test
performance to dropped 50%. Yuanhan liu did an analysis, found it was
caused by strict sequential writing. Ingo suggest stealing sem writing from
front task in wait queue. https://lkml.org/lkml/2013/1/29/84

So does this patch.
In this patch, I just allow write stealing to happen when the first waiter
is also writer. The performance fully is now fully recovered.

Reported-by: lkp@linux.intel.com
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alex Shi <alex.shi@intel.com>
0972938
@mnm9994u lib/rwsem.c: fix compatibility issues with Linux 3.0.y
Change-Id: I1524cdc6894a4bf8243c6c47a17f225a83d9cec2
0079629
Volodymyr Mieshkov ext4: prevent kernel panic in case of uninitialized jinode
ext4: prevent kernel panic in case of uninitialized jinode

In some cases the kernel crash occurs during system suspend/resume:

[ 4095.041351] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 4095.050689] pgd = c0004000
[ 4095.053985] [00000000] *pgd=00000000
[ 4095.058807] Internal error: Oops: 5 [#1] PREEMPT SMP
[ 4095.064483] Modules linked in: wl12xx mac80211 pvrsrvkm_sgx540_120 cfg80211 compat [last unloaded: wl12xx_sdio]
[ 4095.064575] CPU: 1    Tainted: G    B        (3.0.31-01807-gfac16a0 #1)
[ 4095.064605] PC is at jbd2_journal_file_inode+0x38/0x118
[ 4095.064666] LR is at mpage_da_map_and_submit+0x48c/0x618
[ 4095.064697] pc : [<c01da5a8>]    lr : [<c01aeac0>]    psr: 60000013
[ 4095.064697] sp : c6e07c80  ip : c6e07ca0  fp : c6e07c9c
[ 4095.064727] r10: 00000001  r9 : c6e06000  r8 : 00000179
[ 4095.064758] r7 : c6e07ca0  r6 : c73b8400  r5 : 00000000  r4 : c59a7d80
[ 4095.064758] r3 : 00000038  r2 : 00000800  r1 : 00000000  r0 : c7754fc0
[ 4095.064788] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[ 4095.064819] Control: 10c5387d  Table: 86cc804a  DAC: 00000015
[ 4095.064849]
[ 4095.064849] PC: 0xc01da528:
[ 4095.064880] a528  0a000003 e3a05000 e1a00005 e24bd020 e89da9f0 e5951010 e3e06000 e14b22dc
.....
[ 4095.070373] 7fe0: c00a48ac 00000013 00000000 c6e07ff8 c00a48ac c00c0a94 84752f09 60772177
[ 4095.070404] Backtrace:
[ 4095.070465] [<c01da570>] (jbd2_journal_file_inode+0x0/0x118) from [<c01aeac0>] (mpage_da_map_and_submit+0x48c/0x618)
[ 4095.070495]  r7:c6e07ca0 r6:c6e07d00 r5:c6e07d90 r4:c7754fc0
[ 4095.070556] [<c01ae634>] (mpage_da_map_and_submit+0x0/0x618) from [<c01af40c>] (ext4_da_writepages+0x2a4/0x5c8)
[ 4095.070617] [<c01af168>] (ext4_da_writepages+0x0/0x5c8) from [<c0112af4>] (do_writepages+0x34/0x40)
[ 4095.070678] [<c0112ac0>] (do_writepages+0x0/0x40) from [<c01645a4>] (writeback_single_inode+0xd4/0x288)
[ 4095.070709] [<c01644d0>] (writeback_single_inode+0x0/0x288) from [<c0164ed4>] (writeback_sb_inodes+0xb4/0x184)
[ 4095.070770] [<c0164e20>] (writeback_sb_inodes+0x0/0x184) from [<c01655a0>] (writeback_inodes_wb+0xc4/0x13c)
[ 4095.070831] [<c01654dc>] (writeback_inodes_wb+0x0/0x13c) from [<c01658f0>] (wb_writeback+0x2d8/0x464)
[ 4095.070861] [<c0165618>] (wb_writeback+0x0/0x464) from [<c0165cb8>] (wb_do_writeback+0x23c/0x2c4)
[ 4095.070922] [<c0165a7c>] (wb_do_writeback+0x0/0x2c4) from [<c0165df4>] (bdi_writeback_thread+0xb4/0x2dc)
[ 4095.070953] [<c0165d40>] (bdi_writeback_thread+0x0/0x2dc) from [<c00c0b18>] (kthread+0x90/0x98)
[ 4095.071014] [<c00c0a88>] (kthread+0x0/0x98) from [<c00a48ac>] (do_exit+0x0/0x72c)
[ 4095.071044]  r7:00000013 r6:c00a48ac r5:c00c0a88 r4:c78c7ec4
[ 4095.071105] Code: e89da8f0 e5963000 e3130002 1afffffa (e5913000)
[ 4095.071166] ---[ end trace 7fe9f9b727e5cf78 ]---
[ 4095.071197] Kernel panic - not syncing: Fatal exception

The probably reason of such behaviour is an inode opened in READ mode
has been marked as 'dirty' somehow and written back by ext4_da_writepages.
Cause jinode == NULL it could lead to the kernel panic.

The patch prevents kernel panic and helps to investigate the problem
providing an inode number.

Change-Id: I1d77a011b580db682b8e2d122ef3d5e44e0ce5c7
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
fbdfc70
@mnm9994u tmpfs: fix mempolicy object leaks
This patch fixes several mempolicy leaks in the tmpfs mount logic.
These leaks are slow - on the order of one object leaked per mount
attempt.

Leak 1 (umount doesn't free mpol allocated in mount):
    while true; do
        mount -t tmpfs -o mpol=interleave,size=100M nodev /mnt
        umount /mnt
    done

Leak 2 (errors parsing remount options will leak mpol):
    mount -t tmpfs -o size=100M nodev /mnt
    while true; do
        mount -o remount,mpol=interleave,size=x /mnt 2> /dev/null
    done
    umount /mnt

Leak 3 (multiple mpol per mount leak mpol):
    while true; do
        mount -t tmpfs -o mpol=interleave,mpol=interleave,size=100M nodev /mnt
        umount /mnt
    done

This patch fixes all of the above.  I could have broken the patch into
three pieces but is seemed easier to review as one.

Signed-off-by: Greg Thelen <gthelen@google.com>
modified for Mako kernel from LKML reference

Change-Id: I44b4bcf90506f5d30406a783378bc601bbe33622
1c053f5
Alex Shi rwsem: steal writing sem for better performance
Commit 5a50508 changes to rwsem from mutex, caused aim7 fork_test
performance to dropped 50%. Yuanhan liu did an analysis, found it was
caused by strict sequential writing. Ingo suggest stealing sem writing from
front task in wait queue. https://lkml.org/lkml/2013/1/29/84

So does this patch.
In this patch, I just allow write stealing to happen when the first waiter
is also writer. The performance fully is now fully recovered.

Reported-by: lkp@linux.intel.com
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alex Shi <alex.shi@intel.com>

Conflicts:

	lib/rwsem.c
0a7dd31
@franciscofranco franciscofranco drivers: mmc: disable CRC
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
81f9fd2
Sujit Reddy Thumma mmc: core: Fix possbile memory leak
Fix possible memory leak detected by kmemleak:

unreferenced object 0xc0f80f00 (size 64):
  comm "swapper/0", pid 1, jiffies 4294937508 (age 82.980s)
  hex dump (first 32 bytes):
    6d 6d 63 30 5f 64 65 74 65 63 74 00 72 79 2e 68  mmc0_detect.ry.h
    00 07 00 00 68 77 63 61 70 2e 68 00 02 00 00 70  ....hwcap.h....p
  backtrace:
    [<c010a1fc>] __kmalloc+0x164/0x220
    [<c01e1630>] kvasprintf+0x38/0x58
    [<c01e1668>] kasprintf+0x18/0x24
    [<c02fcf60>] mmc_alloc_host+0x114/0x1b4
    [<c0311c84>] msmsdcc_probe+0xc14/0x1fd8
    [<c022b40c>] platform_drv_probe+0x14/0x18
    [<c022a144>] driver_probe_device+0x144/0x334
    [<c022a394>] __driver_attach+0x60/0x84
    [<c022884c>] bus_for_each_dev+0x4c/0x78
    [<c0229720>] bus_add_driver+0xd0/0x250
    [<c022a884>] driver_register+0x9c/0x128
    [<c00086bc>] do_one_initcall+0x90/0x160
    [<c06d1904>] kernel_init+0xe8/0x1a4
    [<c000ee4c>] kernel_thread_exit+0x0/0x8
    [<ffffffff>] 0xffffffff

Change-Id: I3b29d71463af849a072cabbe56637adf6db6d0da
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
92e9dc7
@franciscofranco franciscofranco power: decrease the amount of time the device waits after entering lo…
…w power mode to freeze processes. Testing phase at the moment.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
2dae7a0
Anurag Singh input: evdev: Move wake_lock_destroy call
Calling wake_lock_destroy from inside a spinlock
protected region (or, in general, from atomic context)
leads to a 'scheduling while atomic bug' because the
internal wakeup source deletion logic calls
synchronize_rcu, which can sleep. Moreover,
since the interal lists are already protected with
RCUs and spinlocks, putting the wake_lock_destroy
call in a spinlock is redundant.

Change-Id: I10a2239b664a5f43e54495f24fe588fb09282305
Signed-off-by: Anurag Singh <anursing@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
affd667
@markus-oberhumer markus-oberhumer lib/lzo: Rename lzo1x_decompress.c to lzo1x_decompress_safe.c
Rename the source file to match the function name and thereby
also make room for a possible future even slightly faster
"non-safe" decompressor version.

Change-Id: I482ee415d43c5aaa77d34946ae1fa0af5465b007
Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
f5dfc7b
@markus-oberhumer markus-oberhumer lib/lzo: Update LZO compression to current upstream version
This commit updates the kernel LZO code to the current upsteam version
which features a significant speed improvement - benchmarking the Calgary
and Silesia test corpora typically shows a doubled performance in
both compression and decompression on modern i386/x86_64/powerpc machines.

Change-Id: Ifcde45460c856644097bdeb612f0d68c6429f03c
Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
c6857e4
@markus-oberhumer markus-oberhumer lib/lzo: huge LZO decompression speedup on ARM by using unaligned access
Change-Id: I4dc172b2822504c3f2db1913ed9404e031861d55
Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
b450d63
@wildea01 wildea01 ARM: kconfig: select HAVE_EFFICIENT_UNALIGNED_ACCESS for CPUv6+ && MMU
Modern ARM CPUs can perform efficient unaligned memory accesses in
hardware and this feature is relied up on by code such as the dcache
word-at-a-time name hashing.

[pawitp: adapt to kernel 3.0]

Change-Id: I41559fc9255229e2601f4bef28aa8d48246156b7
Signed-off-by: Will Deacon <will.deacon@arm.com>
ed591e5
@minchank minchank mm: remove compressed copy from zram in-memory
Swap subsystem does lazy swap slot free with expecting the page would be
swapped out again so we can avoid unnecessary write.

But the problem in in-memory swap(ex, zram) is that it consumes memory
space until vm_swap_full(ie, used half of all of swap device) condition
meet.  It could be bad if we use multiple swap device, small in-memory
swap and big storage swap or in-memory swap alone.

This patch makes swap subsystem free swap slot as soon as swap-read is
completed and make the swapcache page dirty so the page should be
written out the swap device to reclaim it.  It means we never lose it.

I tested this patch with kernel compile workload.

1. before

   compile time : 9882.42
   zram max wasted space by fragmentation: 13471881 byte
   memory space consumed by zram: 174227456 byte
   the number of slot free notify: 206684

2. after

   compile time : 9653.90
   zram max wasted space by fragmentation: 11805932 byte
   memory space consumed by zram: 154001408 byte
   the number of slot free notify: 426972

[akpm@linux-foundation.org: tweak comment text]
[artem.savkov@gmail.com: fix BUG due to non-swapcache pages in end_swap_bio_read()]
[akpm@linux-foundation.org: invert unlikely() test, augment comment, 80-col cleanup]
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Konrad Rzeszutek Wilk <konrad@darnok.org>
Cc: Shaohua Li <shli@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Conflicts:
	mm/page_io.c

Change-Id: I8f11fb7f0391954435002e7f290352f311c907d4
b1dd799