aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-23cgroup: fix AOSP's cgroup subsys permission checkAmit Pundir
Mainline commit dedf22e9e66e "cgroup: separate out cgroup_procs_write_permission() from __cgroup_procs_write()", moved out task/process migration permission check from __cgroup_procs_write() into cgroup_procs_write_permission(). Hence reformat the changes from AOSP commit 53b5e2f0b1ce "cgroup: Add generic cgroup subsystem permission checks" accordingly. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-23power: suspend_time: include module.h instead of init.hAmit Pundir
Include module.h instead of init.h since module_{init,exit} is no longer part of init.h, they have been moved to module.h instead. See mainline commit 0fd972a7d91d "module: relocate module_init from init.h to module.h" for more details. Otherwise we run into following build failure: -------------------- CC kernel/power/suspend_time.o kernel/power/suspend_time.c:110:1: warning: data definition has no type or storage class [enabled by default] kernel/power/suspend_time.c:110:1: error: type defaults to ‘int’ in declaration of ‘module_init’ [-Werror=implicit-int] kernel/power/suspend_time.c:110:1: warning: parameter names (without types) in function declaration [enabled by default] kernel/power/suspend_time.c:111:1: warning: data definition has no type or storage class [enabled by default] kernel/power/suspend_time.c:111:1: error: type defaults to ‘int’ in declaration of ‘module_exit’ [-Werror=implicit-int] kernel/power/suspend_time.c:111:1: warning: parameter names (without types) in function declaration [enabled by default] kernel/power/suspend_time.c:99:12: warning: ‘suspend_time_syscore_init’ defined but not used [-Wunused-function] kernel/power/suspend_time.c:106:13: warning: ‘suspend_time_syscore_exit’ defined but not used [-Wunused-function] cc1: some warnings being treated as errors make[2]: *** [kernel/power/suspend_time.o] Error 1 make[1]: *** [kernel/power] Error 2 make[1]: *** Waiting for unfinished jobs.... -------------------- Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-23Merge 'linaro-android-4.1' into v4.2-rc3Amit Pundir
Merge early linaro-android-4.1 snapshot into v4.2-rc3. For the records, it is not a "linaro-android-4.1" tag merge in v4.2-rc3. "linaro-android-4.1" tag is couple of commits ahead at this point. I'll be cherrypicking those changes into this llct branch as well so no need to panic. Signed-off-by: Amit Pundir <amit.pundir@linaro.org> AOSP patches dropped in this merge: ==> AOSP's RNDIS multipacket and Uplink data aggregation support is temporarily dropped because of broken build. Need some time to sort this one out. * commit e77389702c49 "USB: gadget: rndis: Add module parameter for DL max packets per xfer" * commit 0e8b24fb6c0b "ndis: Add debug support to disable RNDIS Multipacket Feature" * commit e298eec11b3a "RNDIS: Add Data aggregation (multi packet) support" * commit c5ecbca49ba3 "usb: Add support for rndis uplink aggregation" * commit 34c2b5747249 "USB: rndis: Free the rndis response queue during REMOTE_NDIS_RESET_MSG" ==> Dropped AOSP's clock frequency stats accounting support, for now, due to non-trivial merge conflicts. Need some time to sort this one out as well. * commit 3a3804ba0a4a "clk: debugfs: Support frequency stats accounting" Conflicts: arch/arm/mm/fault.c ==> Refactor changes from AOSP commit 73e652f2b871 "ARM: fault: assume no context when IRQs are disabled during data abort." to align with changes from mainline commit 70ffdb9393a7 "mm/fault, arch: Use pagefault_disable() to check for disabled pagefaults in the handler". drivers/base/power/wakeup.c ==> Picked changes from mainline commit 4990d4fe327b "PM / Wakeirq: Add automated device wake IRQ handling" as well as AOSP changes from commit 171b2594e9a4 "wakeup: Add last wake up source logging for suspend abort reason." drivers/clk/Kconfig drivers/clk/clk.c ==> Picked mainline changes and dropped AOSP's clock frequency stats accounting support temporarily as mentioned above. drivers/input/evdev.c ==> Picked changes from mainline commit 67367fd259f2 "Input: evdev - use kvfree() in evdev_release()" as well as AOSP changes from commit fd10c981e1b3 "Input: evdev - Add ioctl to block suspend while event queue is not empty." drivers/mmc/core/core.c ==> Picked changes from mainline commit 8f11d1064e01 "mmc: core: Hold re-tuning during erase commands" as well as AOSP changes from commit c01980e6c9a2 "mmc: Add tracepoints of mmc block operations". drivers/staging/android/lowmemorykiller.c ==> Refactor changes from AOSP commit bad385c687f8 "lowmemorykiller: make default lowmemorykiller debug message useful", to align with changes from mainline commit e1099a69a624 "android, lmk: avoid setting TIF_MEMDIE if process has already exited". drivers/usb/gadget/function/f_rndis.c drivers/usb/gadget/function/rndis.c drivers/usb/gadget/function/rndis.h ==> Dropped AOSP's RNDIS multipacket and Uplink data aggregation support because of broken build and non-trivial conflicts. fs/fuse/dev.c ==> Refactor changes from AOSP commit 71a389ba6177 "fuse: Freeze client on suspend when request sent to userspace", to align with changes from mainline commit 33e14b4dfdc4 "fuse: req state use flags". include/linux/cgroup.h kernel/cgroup.c ==> Refactor changes from AOSP commit 53b5e2f0b1ce "cgroup: Add generic cgroup subsystem permission checks", to align with changes from mainline commit b4a04ab7a37b "cgroup: separate out include/linux/cgroup-defs.h". include/uapi/linux/netfilter/xt_socket.h ==> Picked changes from mainline commit 01555e74bde5 "netfilter: xt_socket: add XT_SOCKET_RESTORESKMARK flag" as well as linaro-android fixes from commit 1f9ab8933609 "Fix xt_qtaguid build error". kernel/power/suspend.c ==> Add changes from AOSP commit 722c1106fc36 "power: Adds functionality to log the last suspend abort reason." kernel/trace/trace_functions_graph.c ==> Dropped changes from mainline commits 9023c930902f "tracing: Rename (un)register_ftrace_event() to (un)register_trace_event()" and 9106b6938291 "tracing: Add ftrace events for graph tracer" since they are incompatible with AOSP commit 6f6f99a38132 "trace: add non-hierarchical function_graph option". net/rfkill/core.c ==> Refactor changes from AOSP commit 1fb6edeb817a "rfkill: Introduce CONFIG_RFKILL_PM and use instead of CONFIG_PM to power down", to align with changes from mainline commit 28f297a7af7e "net: rfkill: Switch to PM ops".
2015-07-21android: configs: base: enable USB_CONFIGFSAmit Pundir
Now that Android is moving towards ConfigFS based USB gadgets, lets enable USB_CONFIGFS instead of obsolete USB_G_ANDROID composite driver which doesn't even build now. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21net: ipv6: fix virtual tunneling buildAmit Pundir
IPv6 PMTUD has been updated to support UID-based routing. Pass INVALID_UID as the socket UID to ip6_update_pmtu(), otherwise we run into following build error: ---------------- CC net/ipv6/ip6_vti.o net/ipv6/ip6_vti.c: In function ‘vti6_err’: net/ipv6/ip6_vti.c:559:3: error: too few arguments to function ‘ip6_update_pmtu’ In file included from include/net/ip_tunnels.h:19:0, from net/ipv6/ip6_vti.c:44: include/net/ip6_route.h:110:6: note: declared here make[2]: *** [net/ipv6/ip6_vti.o] Error 1 ---------------- Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21net: core: fix Null ptr dereference in UID-based routingAmit Pundir
sock_i_uid(struct sock *) is being called without checking for a valid "struct sock" pointer, resulting in following Null pointer dereference: [ 17.633071] Unable to handle kernel NULL pointer dereference at virtual address 00000198 [ 17.641087] pgd = ffffffc07a554000 [ 17.644465] [00000198] *pgd=00000000fa49b003, *pud=00000000fa49b003, *pmd=0000000000000000 [ 17.652669] Internal error: Oops: 96000006 [#1] PREEMPT SMP [ 17.658186] Modules linked in: [ 17.661217] CPU: 1 PID: 1333 Comm: S21avahi-daemon Not tainted 4.0.0-rc7+ #2 [ 17.668195] Hardware name: ARM Juno development board (r0) (DT) [ 17.674055] task: ffffffc976936800 ti: ffffffc079c0c000 task.ti: ffffffc079c0c000 [ 17.681470] PC is at _raw_read_lock_bh+0x34/0x54 [ 17.686042] LR is at sock_i_uid+0x24/0x64 Not that we need to check for valid pointer everytime we call sock_i_uid() but plan is to at least do it when we are doing this Null pointer check for other arguments. Change-Id: I04521c1c38179687acd91d155ea2fd4658573ae7 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21xt_qtaguid: check xt_sock socket before releasingAmit Pundir
Bug in xt_qtaguid wherein xt_socket_get_*_sk() can steal the sk from skb without taking a reference, so we may end up lowering the refcnt of sk too much. This is hard to trigger, you need to take a special path in tcp_v4, half closed state + remote has to send you some data packets. [ 74.024530] ------------[ cut here ]------------ [ 74.029157] kernel BUG at net/ipv4/inet_timewait_sock.c:101! [ 74.034822] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM [ 74.052880] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: P C O 3.14.13-1.1pre+ #25 [ 74.060806] task: cd88f400 ti: cd8a8000 task.ti: cd8a8000 [ 74.066219] PC is at __inet_twsk_kill+0x138/0x15c [ 74.070930] LR is at __inet_twsk_kill+0x10c/0x15c [ 74.075639] pc : [<c041efa0>] lr : [<c041ef74>] psr: 600f0013 [ 74.075639] sp : cd8a9cb0 ip : 000008d8 fp : 00000000 [ 74.087128] r10: 00000001 r9 : 000043b0 r8 : cda38ba0 [ 74.092357] r7 : 00000001 r6 : 00000001 r5 : 00000002 r4 : c7f50bc0 [ 74.098891] r3 : 00000002 r2 : 00000100 r1 : 200f0093 r0 : 00000016 [ 74.105426] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel [ 74.112742] Control: 30c5387d Table: 0c6c5e40 DAC: fffffffd [ 74.703277] [<c041efa0>] (__inet_twsk_kill) from [<c04376b4>] (tcp_timewait_state_process+0x30c/0x380) [ 74.712595] [<c04376b4>] (tcp_timewait_state_process) from [<c0436d54>] (tcp_v4_rcv+0x17c/0x7c0) [ 74.721391] [<c0436d54>] (tcp_v4_rcv) from [<c04148b8>] (ip_local_deliver_finish+0xd0/0x2b0) [ 74.729840] [<c04148b8>] (ip_local_deliver_finish) from [<c0414be0>] (ip_rcv_finish+0x148/0x36c) [ 74.738638] [<c0414be0>] (ip_rcv_finish) from [<c03b9b00>] (__netif_receive_skb_core+0x200/0x75c) [ 74.747522] [<c03b9b00>] (__netif_receive_skb_core) from [<c03ba104>] (netif_receive_skb_internal+0x30/0xbc) [ 74.757365] [<c03ba104>] (netif_receive_skb_internal) from [<c04d30d0>] (brcm_tag_rcv+0x13c/0x178) Bug (and subsequent fix) reported by an external tester. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21android: configs: base: enable IPV6Kevin Hilman
android-base.cfg already enables several IPV6 sub-options, but not the main IPV6 option. Without this, build errors such has this: net/netfilter/xt_qtaguid.c:1591: undefined reference to `xt_socket_get6_sk' occur if the starting defconfig hasn't already enabled IVP6, Change-Id: I265089a2eec1ef8938e0a6fb95e1aacd16d99281 Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-07-21net/Kconfig: paranoid only for androidKevin Hilman
Currently, paranoid networking is enabled by default whether or not and android kernel is being built. However, it should be enabled by default only when and Android kernel is being built. To fix, use "default ANDROID" instead of "default y" Change-Id: Ia19ab766e3497f07ccee846bec1f5fd4017e5977 Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-07-21export tcp_nuke_addr to build ipv6 as moduleAndrey Konovalov
Otherwise we run into following build error: -----8<----- ... CC [M] lib/zlib_deflate/deftree.o CC [M] lib/zlib_deflate/deflate_syms.o LD [M] lib/zlib_deflate/zlib_deflate.o Building modules, stage 2. MODPOST 46 modules ERROR: "tcp_nuke_addr" [net/ipv6/ipv6.ko] undefined! make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make: *** [sub-make] Error 2 -----8<----- Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21tcp: Fix build error if IPV6 is not selectedTushar Behera
If CONFIG_IPV6=m is selected, we are getting following build errors. net/built-in.o: In function `tcp_is_local6': net/ipv4/tcp.c:3261: undefined reference to `rt6_lookup' Making the code conditional upon only CONFIG_IPV6=y fixes this issue. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: John Stultz <john.stultz@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2015-07-21video: adf: build fixesAmit Pundir
Couple of ADF build fixes for v4.1 adf/adf_fops.c fix: get_unused_fd() is obsolete, use get_unused_fd_flags(O_CLOEXEC) instead to allocate a default file descriptor. This fix is a followup of upstream commit f938612dd97d "include/linux/file.h: remove get_unused_fd() macro". adf/adf_memblock.c fix: Fix dma_buf_export() call. Based on mainline commit d8fbe341beb6 "dma-buf: cleanup dma_buf_export() to make it easily extensible". Otherwise we run into following build failures: ---------- CC drivers/video/adf/adf_fops.o CC drivers/video/adf/adf_memblock.o drivers/video/adf/adf_memblock.c: In function ‘adf_memblock_export’: drivers/video/adf/adf_memblock.c:154:2: warning: passing argument 1 of ‘dma_buf_export’ from incompatible pointer type [enabled by default] In file included from drivers/video/adf/adf_memblock.c:15:0: include/linux/dma-buf.h:211:17: note: expected ‘const struct dma_buf_export_info *’ but argument is of type ‘struct adf_memblock_pdata *’ drivers/video/adf/adf_memblock.c:154:2: error: too many arguments to function ‘dma_buf_export’ In file included from drivers/video/adf/adf_memblock.c:15:0: include/linux/dma-buf.h:211:17: note: declared here make[3]: *** [drivers/video/adf/adf_memblock.o] Error 1 make[3]: *** Waiting for unfinished jobs.... drivers/video/adf/adf_fops.c: In function ‘adf_device_post_config’: drivers/video/adf/adf_fops.c:228:2: error: implicit declaration of function ‘get_unused_fd’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [drivers/video/adf/adf_fops.o] Error 1 make[2]: *** [drivers/video/adf] Error 2 make[2]: *** Waiting for unfinished jobs.... ---------- Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21Fix xt_qtaguid build errorAmit Pundir
Add missing header <linux/miscdevice.h> and export xt_socket_lookup_slow_v* functions to be used in xt_qtaguid, otherwise we run into following error: ------------------ CC net/netfilter/xt_qtaguid.o net/netfilter/xt_qtaguid.c: In function ‘qtaguid_find_sk’: net/netfilter/xt_qtaguid.c:1591:3: error: implicit declaration of function ‘xt_socket_lookup_slow_v6’ [-Werror=implicit-function-declaration] net/netfilter/xt_qtaguid.c:1591:6: warning: assignment makes pointer from integer without a cast [enabled by default] net/netfilter/xt_qtaguid.c:1594:3: error: implicit declaration of function ‘xt_socket_lookup_slow_v4’ [-Werror=implicit-function-declaration] net/netfilter/xt_qtaguid.c:1594:6: warning: assignment makes pointer from integer without a cast [enabled by default] net/netfilter/xt_qtaguid.c: At top level: net/netfilter/xt_qtaguid.c:2902:15: error: variable ‘qtu_device’ has initializer but incomplete type net/netfilter/xt_qtaguid.c:2903:2: error: unknown field ‘minor’ specified in initializer net/netfilter/xt_qtaguid.c:2903:11: error: ‘MISC_DYNAMIC_MINOR’ undeclared here (not in a function) net/netfilter/xt_qtaguid.c:2903:2: warning: excess elements in struct initializer [enabled by default] net/netfilter/xt_qtaguid.c:2903:2: warning: (near initialization for ‘qtu_device’) [enabled by default] net/netfilter/xt_qtaguid.c:2904:2: error: unknown field ‘name’ specified in initializer net/netfilter/xt_qtaguid.c:2904:2: warning: excess elements in struct initializer [enabled by default] net/netfilter/xt_qtaguid.c:2904:2: warning: (near initialization for ‘qtu_device’) [enabled by default] net/netfilter/xt_qtaguid.c:2905:2: error: unknown field ‘fops’ specified in initializer net/netfilter/xt_qtaguid.c:2905:2: warning: excess elements in struct initializer [enabled by default] net/netfilter/xt_qtaguid.c:2905:2: warning: (near initialization for ‘qtu_device’) [enabled by default] net/netfilter/xt_qtaguid.c: In function ‘qtaguid_mt_init’: net/netfilter/xt_qtaguid.c:3014:6: error: implicit declaration of function ‘misc_register’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[2]: *** [net/netfilter/xt_qtaguid.o] Error 1 make[1]: *** [net/netfilter] Error 2 make: *** [net] Error 2 make: *** Waiting for unfinished jobs.... ------------------ Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21clk: debugfs: fix build for frequency stats accountingAmit Pundir
Refactor changes from AOSP commit 3a3804ba0a4a "clk: debugfs: Support frequency stats accounting", based on mainline changes. Mainly commits 035a61c314eb "clk: Make clk API return per-user struct clk instances" and b09d6d991025 "clk: remove clk-private.h". Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21trace: fix aosp's non-hierarchical function_graph buildAmit Pundir
AOSP commit 6f6f99a38132 "trace: add non-hierarchical function_graph option", run into following build error: -------------------- CC kernel/trace/trace_output.o kernel/trace/trace_output.c: In function ‘trace_graph_ent_trace’: kernel/trace/trace_output.c:906:2: error: invalid use of void expression kernel/trace/trace_output.c:912:2: error: invalid use of void expression kernel/trace/trace_output.c: In function ‘trace_graph_ent_raw’: kernel/trace/trace_output.c:927:10: error: invalid use of void expression kernel/trace/trace_output.c: In function ‘trace_graph_ent_hex’: kernel/trace/trace_output.c:941:2: error: implicit declaration of function ‘SEQ_PUT_HEX_FIELD_RET’ [-Werror=implicit-function-declaration] kernel/trace/trace_output.c: In function ‘trace_graph_ent_bin’: kernel/trace/trace_output.c:955:2: error: implicit declaration of function ‘SEQ_PUT_FIELD_RET’ [-Werror=implicit-function-declaration] kernel/trace/trace_output.c: In function ‘trace_graph_ret_trace’: kernel/trace/trace_output.c:983:2: error: invalid use of void expression kernel/trace/trace_output.c:989:2: error: invalid use of void expression kernel/trace/trace_output.c: In function ‘trace_graph_ret_raw’: kernel/trace/trace_output.c:1007:10: error: invalid use of void expression cc1: some warnings being treated as errors make[2]: *** [kernel/trace/trace_output.o] Error 1 make[1]: *** [kernel/trace] Error 2 make[1]: *** Waiting for unfinished jobs.... -------------------- Fixes: 1) Do not use return value of trace_seq_printf() in syscall tracing, use trace_seq_has_overflowed() instead (mainline commit 183742f08c55). 2) Use SEQ_PUT_{FIELD,HEX_FIELD} macros instead of obsolete SEQ_PUT_{FIELD_RET,HEX_FIELD_RET} macros (mainline commit 19a7fe206232, "tracing: Add trace_seq_has_overflowed() and trace_handle_return()"). Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21ARM: smp: fix arch_trigger_all_cpus_backtraceAmit Pundir
Fix AOSP's arch_trigger_all_cpus_backtrace implementation for ARM (commit d4dcc857a55b) based on mainline commit f3aca3d09525 "nmi: provide the option to issue an NMI back trace to every cpu but current" to fix the broken build. Also replace obsolete cpu_clear() and cpu_isset() calls with clear_bit() and test_bit repectively. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2015-07-21Merge branch 'android-3.18' of https://android.googlesource.com/kernel/commonAmit Pundir
Merge AOSP's 'android-3.18' branch in Linux-4.1 * android-3.18: (581 commits) cpu_power: Avoids race condition when the task exits. uid_cputime: Avoids double accounting of process stime, utime and cpu_power in task exit. Shrink ashmem directly through shmem_fallocate sched: cpufreq: update power usage only if cpufreq_stat is enabled cpufreq: Iterate over all the possible cpus to create powerstats. uid_cputime: Extends the cputime functionality to report power per uid sched: cpufreq: Adds a field cpu_power in the task_struct cpufreq_stats: Adds the fucntionality to load current values for each frequency for all the cores. cgroup: Fix issues in allow_attach callback New Build Breakage in branch: kernel-m-dev-tegra-flounder-3.10 @ 1960706 net/unix: sk_socket can disappear when state is unlocked selinux: enable genfscon labeling for sysfs and pstore files ext4: don't save the error information if the block device is read-only selinux: enable per-file labeling for debugfs files. cpufreq: interactive: Rearm governor timer at max freq cpufreq: interactive: Implement cluster-based min_sample_time cpufreq: interactive: Exercise hispeed settings at a policy level cpufreq: interactive: Round up timer_rate to match jiffy cpufreq: interactive: Don't set floor_validate_time during boost suspend: Return error when pending wakeup source is found. ... Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Dropped AOSP Patches: ==> We need to investigate if we need following set of patches, so dropping them for now. * commit 1307afc31753 "ARM: convert build of appended dtb zImage to list of dtbs" * commit 082d89f7f2ae "ARM64: add option to build Image.gz/dtb combo" * commit 2c84417a1305 "mmc: mmcblk: Add support for deferred SD bus resume" ==> cpufreq_stats set of patches for "persistent stats data across cpu hotplug" and "power/current stat per cpufreq" need a major refactoring so dropping them for now. * commit 7502d79f3615 "cpufreq: Persist cpufreq time in state data across hotplug" * commit 501a08a8fbb3 "cpufreq: stats: hold reference on global cpufreq" * commit 7f53705d4ca3 "cpufreq_stats: Adds the fucntionality to load current values for each frequency for all the cores" * commit 141aa174ac26 "sched: cpufreq: Adds a field cpu_power in the task_struct" * commit 4b254ff54bf9 "uid_cputime: Extends the cputime functionality to report power per uid" * commit 553b785b5383 "cpufreq: Iterate over all the possible cpus to create powerstats." * commit 7717da919c87 "uid_cputime: Avoids double accounting of process stime, utime and cpu_power in task exit" * commit a63e9712ac7a "cpu_power: Avoids race condition when the task exits." Note: VireshK recently pushed similar cpufreq hotplug changes to 4.2-rc1 and current/voltage stats per frequency is also mainline is working on. So I guess it is easier to just backport those cpufreq changes to 4.1 once they are done. Or we can just refactor these AOSP cpufreq_stats changes and live with it for now? Conflicts and Resolutions: Documentation/networking/ip-sysctl.txt ==> Added mainline commit 9f0761c15 "ipv6: add documentation for stable_secret, idgen_delay and idgen_retries knobs" Makefile ==> Kept mainline changes for v4.1 code NAME instead of AOSP's v3.18. arch/arm/Kconfig.debug ==> Added AOSP commit 7f865d188 "ARM: Fix "Make low-level printk work" to use a separate config option". arch/arm/boot/dts/Makefile ==> Picked mainline changes and dropped AOSP commit 1307afc31753, "ARM: convert build of appended dtb zImage to list of dtbs" which need refactoring. arch/arm/include/asm/hardware/coresight.h arch/arm/kernel/etm.c ==> Picked mainline commit 184901a06a36 "ARM: removing support for etb/etm in arch/arm/kernel/". arch/arm/kernel/process.c ==> Added AOSP commits ac20546 "[ARM] process: Add display of memory around registers when displaying regs.", and d4dcc857 "ARM: smp: implement arch_trigger_all_cpus_backtrace using IPI", Moved AOSP commit 2cc932a "ARM: add option to flush console before reboot" to arch/arm/kernel/reboot.c as suggested by this mainline commit 045ab94e10ee "ARM: move reboot code to arch/arm/kernel/reboot.c". arch/arm64/Kconfig arch/arm64/boot/dts/Makefile ==> Picked mainline changes and dropped AOSP commit 082d89f7f2ae "ARM64: add option to build Image.gz/dtb combo" which need refactoring. arch/arm64/include/asm/cpufeature.h arch/arm64/kernel/Makefile arch/arm64/kernel/cpuinfo.c ==> Picked mainline changes which is a superset of AOSP changes. arch/arm64/kernel/setup.c ==> Dropped AOSP changes since mainline already moved that ARM64's early_mem initialization part of code to mm/init.c. Relevant mainline commit 6083fe74b7bf "arm64: respect mem= for EFI". drivers/base/cpu.c ==> Picked mainline changes and dropped AOSP changes from commit 9025d688a3bc "cpu: add generic support for CPU feature based module autoloading". So now we use CONFIG_GENERIC_CPU_AUTOPROBE everywhere instead of mixing it with CONFIG_HAVE_CPU_AUTOPROBE. This is what mainline did as well, commit 2b9c1f03278a "x86: align x86 arch with generic CPU modalias handling". drivers/char/Kconfig drivers/char/mem.c ==> DEVMEM/DEVKMEM conflicting changes. Kept mainline changes and dropped AOSP's. drivers/clk/Kconfig drivers/clk/clk.c ==> Picked and refactored AOSP changes from commit 3a3804b "clk: debugfs: Support frequency stats accounting" by moving CONFIG_COMMON_CLK_FREQ_STATS_ACCOUNTING code from now obsolete include/linux/clk-private.h to drivers/clk/clk.c and kept mainline changes otherwise. drivers/cpufreq/cpufreq_stats.c ==> This one is in total chaos due to recent mainline changes conflicting with AOSP's patches for "persistent cpufreq_stats data across cpu hotplug" and "power/current stats per cpufreq". Dropped all AOSP patches for now since they need major refactoring and also because mainline is working on similar feature implementations. drivers/hid/hid-multitouch.c ==> Picked mainline changes as well as AOSP commits 9956451 "hid-multitouch: Filter collections by application usage.", and 274ba2d "HID: Add input_register callback." drivers/mmc/card/block.c ==> Dropped changes from AOSP commit 2c84417a1305 "mmc: mmcblk: Add support for deferred SD bus resume", which is broken at so many levels. drivers/mmc/core/sdio_bus.c ==> Picked mainline as well as AOSP changes from commit 488ad4b90b85 "mmc: Add concept of an 'embedded' SDIO device." drivers/staging/android/Kconfig ==> Added AOSP changes from commit c034ef7 "staging: android: lowmemorykiller: Add config option to support oom_adj values" drivers/staging/android/TODO ==> Picked AOSP commit 85139a99fe48 "staging: remove Greg's TODO, now obsolete." drivers/staging/android/ashmem.c ==> Picked AOSP commit 7394e76edff5 "Shrink ashmem directly through shmem_fallocate" over mainline commit 72c72bdf7bf5 "VFS: Rename do_fallocate() to vfs_fallocate()". drivers/staging/android/binder.c ==> Kept mainline commit 777783e0abae "staging: android: binder: move to the "real" part of the kernel". drivers/usb/gadget/Kconfig drivers/usb/gadget/configfs.c drivers/usb/gadget/function/Makefile ==> Picked mainline changes as well as AOSP's USB configfs gadget implementation for MTP/PTP, RNDIS, ANDROID_ACCESORIES etc. drivers/usb/gadget/udc/udc-core.c ==> Refactored AOSP commit 2896b29 "HACK: usb: gadget: Fix enumeration on boot". We should revisit this and check if we still need this HACK. fs/fuse/dev.c ==> Picked mainline changes from commit e2e40f2c1ed4 "fs: move struct kiocb to fs.h" as well as AOSP changes from commit 71a389b "fuse: Freeze client on suspend when request sent to userspace". fs/pstore/inode.c ==> Picked changes from mainline commit dbaffde76405 "pstore: Use scnprintf() in pstore_mkfile()" over AOSP commit 0fb7895 "pstore: use scnprintf". fs/pstore/ram.c ==> Duplicate prz_ok() definition conflict, removed one definition. Picked AOSP changes from commit cac2eb7 "pstore/ram: Give proper names to dump-related variables" as well as changes from mainline commit a28726b4fb62 "pstore/ram: Strip ramoops header for correct decompression" include/asm-generic/seccomp.h ==> Remove duplicate __NR_seccomp_sigreturn_32 definition. Picked mainline changes. include/linux/clk-private.h ==> Picked mainline commit b09d6d991025 "clk: remove clk-private.h". include/linux/cpu.h ==> Picked mainline changes as well as changes from AOSP commit f0cf66df8 "Move x86_64 idle notifiers to generic" include/linux/mm_types.h ==> Kept mainline changes from commit ac51b934f "mm: replace vma->sharead.linear with vma->shared" and refactored AOSP changes from commit 964e307e0 "mm: add a field to store names for private anonymous memory". include/linux/pstore.h ==> Added changes from mainline commit ae011d2e "pstore: Add pstore type id for PPC64 opal nvram partition". include/linux/security.h security/capability.c security/security.c security/selinux/hooks.c security/selinux/include/classmap.h ==> Kept mainline changes for coding style cleanups. include/net/tcp.h net/ipv4/sysctl_net_ipv4.c net/ipv4/tcp_input.c ==> Picked mainline changes as well as AOSP changes from commit fac8460 "tcp: add a sysctl to config the tcp_default_init_rwnd". include/uapi/linux/ipv6.h ==> Added mainline changes. include/uapi/linux/prctl.h ==> Picked mainline changes as well as refactored AOSP changes to keep PR_SET_TIMERSLACK_PID to 41 and assigned 127 to PR_SET_THP_DISABLE because AOSP still expects PR_SET_TIMERSLACK_PID to be 41. include/uapi/linux/rtnetlink.h ==> Picked mainline changes as well as AOSP changes from commit ba3d8d3f "net: core: Support UID-based routing.". kernel/debug/debug_core.c ==> Picked mainline changes as well as AOSP changes from commit e7051b407 "debug: add parameters to prevent entering debug mode on errors". kernel/power/Kconfig ==> Added AOSP changes from commits ab10023e0 "cpu_pm: Add cpu power management notifiers" and 7e0e70173 "power: Add option to log time spent in suspend". kernel/power/process.c ==> Picked AOSP changes from commit 5bc08b27 "power: Avoids bogus error messages for the suspend aborts." over mainline changes from commit 35536ae170f0 PM: convert printk to pr_* equivalent". kernel/power/suspend.c ==> Picked mainline changes as well as AOSP changes from commit 722c1106f "power: Adds functionality to log the last suspend abort reason." kernel/printk/printk.c ==> Picked mainline changes as well as AOSP changes from commit 7f865d188 "ARM: Fix "Make low-level printk work" to use a separate config option". kernel/sys.c ==> Picked mainline changes as well as AOSP changes from commit 964e307e0 "mm: add a field to store names for private anonymous memory". kernel/trace/trace_output.c ==> Refactor and picked AOSP changes from commit 0438cf86a "trace: Add an option to show tgids in trace output". kernel/watchdog.c ==> Picked AOSP changes from commit 6f5f01007 "hardlockup: detect hard lockups without NMIs using secondary cpus". as well as refactored mainline changes from commit b3738d293 "watchdog: Add watchdog enable/disable all functions" by wrapping it under CONFIG_HARDLOCKUP_DETECTOR_NMI instead of CONFIG_HARDLOCKUP_DETECTOR as intended by the AOSP commit. mm/memcontrol.c ==> Picked AOSP changes and refactored AOSP changes from commit 701112f "memcg: add permission check". mm/mmap.c ==> Picked AOSP changes from commit 964e307e0 "mm: add a field to store names for private anonymous memory". net/Kconfig ==> Picked mainline changes over AOSP changes from commit 38bd652 "net: Fix CONFIG_RPS option to be turned off". net/Makefile ==> Picked mainline changes as well as AOSP changes from commit e84594a68 "net: activity_stats: Add statistics for network transmission activity". net/core/fib_rules.c net/ipv4/inet_connection_sock.c net/ipv6/route.c ==> Picked mainline changes as well as AOSP changes from commit ba3d8d3f9 "net: core: Support UID-based routing." net/ipv6/addrconf.c ==> Picked mainline changes from commit c58da4c65 "net: ipv6: allow explicitly choosing optimistic addresses" over AOSP changes from commit 4461760 "net: ipv6: allow choosing optimistic addresses with use_optimistic". Also picked AOSP commit 63003d5 "net: ipv6: autoconf routes into per-device tables". net/netfilter/xt_socket.c ==> Picked mainline changes from commit d64d80a2 "netfilter: x_tables: don't extract flow keys on early demuxed sks in socket match" over AOSP commit e0bffd5 "netfilter: Build fixups - kuid/kguid changes & xt_socket_get/put_sk". Also picked mainline changes from commit 78296c97 "netfilter: xt_socket: fix a stack corruption bug" over AOSP changes. scripts/Makefile.lib ==> Dropped AOSP changes from commits 1307afc "ARM: convert build of appended dtb zImage to list of dtbs" and f4d4ffc "kbuild: dtbs_install: new make target". security/selinux/avc.c ==> Picked AOSP changes from commit ba733f985 "SELinux: per-command whitelisting of ioctls". security/selinux/ss/avtab.h ==> Picked mainline changes as well as AOSP changes from commit ba733f985 "SELinux: per-command whitelisting of ioctls".
2015-07-19Linux 4.2-rc3tracking-mainline-llct-20150723.2tracking-mainline-llct-20150723.1tracking-mainline-llct-20150723.0tracking-mainline-llct-20150720.0Linus Torvalds
2015-07-19Merge tag 'scsi-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two fairly simple fixes: one is a change that causes us to have a very low queue depth leading to performance issues and the other is a null deref occasionally in tapes thanks to use after put" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fix host max depth checking for the 'queue_depth' sysfs interface st: null pointer dereference panic caused by use after kref_put by st_open
2015-07-19Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds
Pull MIPS fixes from Ralf Baechle: "Another round of MIPS fixes for 4.2. Things are looking quite decent at this stage but the recent work on the FPU support took its toll: - fix an incorrect overly restrictive ifdef - select O32 64-bit FP support for O32 binary compatibility - remove workarounds for Sibyte SB1250 Pass1 parts. There are rare fixing the workarounds is not worth the effort. - patch up an outdated and now incorrect comment" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: fpu.h: Allow 64-bit FPU on a 64-bit MIPS R6 CPU MIPS: SB1: Remove support for Pass 1 parts. MIPS: Require O32 FP64 support for MIPS64 with O32 compat MIPS: asm-offset.c: Patch up various comments refering to the old filename.
2015-07-19Merge branch 'parisc-4.2-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: "A memory leak fix from Christophe Jaillet which was introduced with kernel 4.0 and which leads to kernel crashes on parisc after 1-3 days" * 'parisc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: mm: Fix a memory leak related to pmd not attached to the pgd
2015-07-19Merge tag 'armsoc-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "By far most of the fixes here are updates to DTS files to deal with some mostly minor bugs. There's also a fix to deal with non-PM kernel configs on i.MX, a regression fix for ethernet on PXA platforms and a dependency fix for OMAP" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: keystone: dts: rename pcie nodes to help override status ARM: keystone: dts: fix dt bindings for PCIe ARM: pxa: fix dm9000 platform data regression ARM: dts: Correct audio input route & set mic bias for am335x-pepper ARM: OMAP2+: Add HAVE_ARM_SCU for AM43XX MAINTAINERS: digicolor: add dts files ARM: ux500: fix MMC/SD card regression ARM: ux500: define serial port aliases ARM: dts: OMAP5: Add #iommu-cells property to IOMMUs ARM: dts: OMAP4: Add #iommu-cells property to IOMMUs ARM: dts: Fix frequency scaling on Gumstix Pepper ARM: dts: configure regulators for Gumstix Pepper ARM: dts: omap3: overo: Update LCD panel names ARM: dts: cros-ec-keyboard: Add support for some Japanese keys ARM: imx6: gpc: always enable PU domain if CONFIG_PM is not set ARM: dts: imx53-qsb: fix TVE entry ARM: dts: mx23: fix iio-hwmon support ARM: dts: imx27: Adjust the GPT compatible string ARM: socfpga: dts: Fix entries order ARM: socfpga: dts: Fix adxl34x formating and compatible string
2015-07-19MIPS: fpu.h: Allow 64-bit FPU on a 64-bit MIPS R6 CPUMarkos Chandras
Commit 6134d94923d0 ("MIPS: asm: fpu: Allow 64-bit FPU on MIPS32 R6") added support for 64-bit FPU on a 32-bit MIPS R6 processor but it missed the 64-bit CPU case leading to FPU failures when requesting FR=1 mode (which is always the case for MIPS R6 userland) when running a 32-bit kernel on a 64-bit CPU. We also fix the MIPS R2 case. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Fixes: 6134d94923d0 ("MIPS: asm: fpu: Allow 64-bit FPU on MIPS32 R6") Reviewed-by: Paul Burton <paul.burton@imgtec.com> Cc: <stable@vger.kernel.org> # 4.0+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10734/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-07-19parisc: mm: Fix a memory leak related to pmd not attached to the pgdChristophe Jaillet
Commit 0e0da48dee8d ("parisc: mm: don't count preallocated pmds") introduced a memory leak. After this commit, the 'return' statement in pmd_free is executed in all cases. Even for pmd that are not attached to the pgd. So 'free_pages' can never be called anymore, leading to a memory leak. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Helge Deller <deller@gmx.de>
2015-07-18Merge tag 'pxa-fixes-v4.2-rc2' of https://github.com/rjarzmik/linux into fixesDOlof Johansson
Merge "pxa fixes for v4.2" from Robert Jarzmik: ARM: pxa: fixes for v4.2-rc2 This single fix reenables ethernet cards for several pxa boards, broken by regulator addition to dm9000 driver. * tag 'pxa-fixes-v4.2-rc2' of https://github.com/rjarzmik/linux: ARM: pxa: fix dm9000 platform data regression
2015-07-18Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-armLinus Torvalds
Pull ARM fixes from Russell King: "A small set of ARM fixes for -rc3, most of them not far off one-liners, with the exception of fixing the V7 cache invalidation for incoming SMP processors which was causing problems for SoCFPGA devices" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: fix __virt_to_idmap build error on !MMU ARM: invalidate L1 before enabling coherency ARM: 8404/1: dma-mapping: fix off-by-one error in bitmap size check ARM: 8402/1: perf: Don't use of_node after putting it ARM: 8400/1: use virt_to_idmap to get phys_reset address
2015-07-18Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Two families of fixes: - Fix an FPU context related boot crash on newer x86 hardware with larger context sizes than what most people test. To fix this without ugly kludges or extensive reverts we had to touch core task allocator, to allow x86 to determine the task size dynamically, at boot time. I've tested it on a number of x86 platforms, and I cross-built it to a handful of architectures: (warns) (warns) testing x86-64: -git: pass ( 0), -tip: pass ( 0) testing x86-32: -git: pass ( 0), -tip: pass ( 0) testing arm: -git: pass ( 1359), -tip: pass ( 1359) testing cris: -git: pass ( 1031), -tip: pass ( 1031) testing m32r: -git: pass ( 1135), -tip: pass ( 1135) testing m68k: -git: pass ( 1471), -tip: pass ( 1471) testing mips: -git: pass ( 1162), -tip: pass ( 1162) testing mn10300: -git: pass ( 1058), -tip: pass ( 1058) testing parisc: -git: pass ( 1846), -tip: pass ( 1846) testing sparc: -git: pass ( 1185), -tip: pass ( 1185) ... so I hope the cross-arch impact 'none', as intended. (by Dave Hansen) - Fix various NMI handling related bugs unearthed by the big asm code rewrite and generally make the NMI code more robust and more maintainable while at it. These changes are a bit late in the cycle, I hope they are still acceptable. (by Andy Lutomirski)" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu, sched: Introduce CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT and use it on x86 x86/fpu, sched: Dynamically allocate 'struct fpu' x86/entry/64, x86/nmi/64: Add CONFIG_DEBUG_ENTRY NMI testing code x86/nmi/64: Make the "NMI executing" variable more consistent x86/nmi/64: Minor asm simplification x86/nmi/64: Use DF to avoid userspace RSP confusing nested NMI detection x86/nmi/64: Reorder nested NMI checks x86/nmi/64: Improve nested NMI comments x86/nmi/64: Switch stacks on userspace NMI entry x86/nmi/64: Remove asm code that saves CR2 x86/nmi: Enable nested do_nmi() handling for 64-bit kernels
2015-07-18Merge branch 'timers-urgent-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Ingo Molnar: "Fix for a misplaced export that can cause build failures in certain (rare) Kconfig situations" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick: Move the export of tick_broadcast_oneshot_control to the proper place
2015-07-18Merge branch 'sched-urgent-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "A oneliner rq throttling fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Test list head instead of list entry in throttle_cfs_rq()
2015-07-18Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Mostly tooling fixes, plus a static key fix fixing /sys/devices/cpu/rdpmc" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Really allow to specify custom CC, AR or LD perf auxtrace: Fix misplaced check for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT perf hists browser: Take the --comm, --dsos, etc filters into account perf symbols: Store if there is a filter in place x86, perf: Fix static_key bug in load_mm_cr4() tools: Copy lib/hweight.c from the kernel sources perf tools: Fix the detached tarball wrt rbtree copy perf thread_map: Fix the sizeof() calculation for map entries tools lib: Improve clean target perf stat: Fix shadow declaration of close perf tools: Fix lockup using 32-bit compat vdso
2015-07-18Merge branch 'irq-urgent-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Misc irq fixes: - two driver fixes - a Xen regression fix - a nested irq thread crash fix" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gicv3-its: Fix mapping of LPIs to collections genirq: Prevent resend to interrupts marked IRQ_NESTED_THREAD genirq: Revert sparse irq locking around __cpu_up() and move it to x86 for now gpio/davinci: Fix race in installing chained irq handler
2015-07-18Merge branch 'akpm' (patches from Andrew)Linus Torvalds
Merge fixes from Andrew Morton: "25 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (25 commits) lib/decompress: set the compressor name to NULL on error mm/cma_debug: correct size input to bitmap function mm/cma_debug: fix debugging alloc/free interface mm/page_owner: set correct gfp_mask on page_owner mm/page_owner: fix possible access violation fsnotify: fix oops in fsnotify_clear_marks_by_group_flags() /proc/$PID/cmdline: fixup empty ARGV case dma-debug: skip debug_dma_assert_idle() when disabled hexdump: fix for non-aligned buffers checkpatch: fix long line messages about patch context mm: clean up per architecture MM hook header files MAINTAINERS: uclinux-h8-devel is moderated for non-subscribers mailmap: update Sudeep Holla's email id Update Viresh Kumar's email address mm, meminit: suppress unused memory variable warning configfs: fix kernel infoleak through user-controlled format string include, lib: add __printf attributes to several function prototypes s390/hugetlb: add hugepages_supported define mm: hugetlb: allow hugepages_supported to be architecture specific revert "s390/mm: make hugepages_supported a boot time decision" ...
2015-07-17Merge branch 'for-linus-4.2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "These are all from Filipe, and cover a few problems we've had reported on the list recently (along with ones he found on his own)" * 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix file corruption after cloning inline extents Btrfs: fix order by which delayed references are run Btrfs: fix list transaction->pending_ordered corruption Btrfs: fix memory leak in the extent_same ioctl Btrfs: fix shrinking truncate when the no_holes feature is enabled
2015-07-17Merge tag 'rtc-v4.2-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull rtc fixes from Alexandre Belloni: "A few fixes for the RTC susbsystem for 4.2. The mt6397 driver was introduce in 4.2 so it is worth fixing before the final release. I though the compilation warning for armada38x was fixed by akpm in commit f98b733e93e0 ("rtc-armada38x.c: remove unused local `flags'") but he actually missed some occurrences of the variables. Since I received 4 patches for that, I think we can include it now. Summary: - fix mt6397 wakealarm creation - remove a compilation warning for armada38x that was forgotten" * tag 'rtc-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: armada38x: Remove unused variable from armada38x_rtc_set_time() rtc: mt6397: enable wakeup before registering rtc device
2015-07-17Merge tag 'dm-4.2-fixes-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - revert a request-based DM core change that caused IO latency to increase and adversely impact both throughput and system load - fix for a use after free bug in DM core's device cleanup - a couple DM btree removal fixes (used by dm-thinp) - a DM thinp fix for order-5 allocation failure - a DM thinp fix to not degrade to read-only metadata mode when in out-of-data-space mode for longer than the 'no_space_timeout' - fix a long-standing oversight in both dm-thinp and dm-cache by now exporting 'needs_check' in status if it was set in metadata - fix an embarrassing dm-cache busy-loop that caused worker threads to eat cpu even if no IO was actively being issued to the cache device * tag 'dm-4.2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache: avoid calls to prealloc_free_structs() if possible dm cache: avoid preallocation if no work in writeback_some_dirty_blocks() dm cache: do not wake_worker() in free_migration() dm cache: display 'needs_check' in status if it is set dm thin: display 'needs_check' in status if it is set dm thin: stay in out-of-data-space mode once no_space_timeout expires dm: fix use after free crash due to incorrect cleanup sequence Revert "dm: only run the queue on completion if congested or no requests pending" dm btree: silence lockdep lock inversion in dm_btree_del() dm thin: allocate the cell_sort_array dynamically dm btree remove: fix bug in redistribute3
2015-07-18x86/fpu, sched: Introduce CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT and use it ↵Ingo Molnar
on x86 Don't burden architectures without dynamic task_struct sizing with the overhead of dynamic sizing. Also optimize the x86 code a bit by caching task_struct_size. Acked-and-Tested-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave@sr71.net> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1437128892-9831-3-git-send-email-mingo@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-18x86/fpu, sched: Dynamically allocate 'struct fpu'Dave Hansen
The FPU rewrite removed the dynamic allocations of 'struct fpu'. But, this potentially wastes massive amounts of memory (2k per task on systems that do not have AVX-512 for instance). Instead of having a separate slab, this patch just appends the space that we need to the 'task_struct' which we dynamically allocate already. This saves from doing an extra slab allocation at fork(). The only real downside here is that we have to stick everything and the end of the task_struct. But, I think the BUILD_BUG_ON()s I stuck in there should keep that from being too fragile. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave@sr71.net> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1437128892-9831-2-git-send-email-mingo@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-17lib/decompress: set the compressor name to NULL on errorAneesh Kumar K.V
Without this we end up using the previous name of the compressor in the loop in unpack_rootfs. For example we get errors like "compression method gzip not configured" even when we have CONFIG_DECOMPRESS_GZIP enabled. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17mm/cma_debug: correct size input to bitmap functionJoonsoo Kim
In CMA, 1 bit in bitmap means 1 << order_per_bits pages so size of bitmap is cma->count >> order_per_bits rather than just cma->count. This patch fixes it. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Stefan Strogin <stefan.strogin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17mm/cma_debug: fix debugging alloc/free interfaceJoonsoo Kim
CMA has alloc/free interface for debugging. It is intended that alloc/free occurs in specific CMA region, but, currently, alloc/free interface is on root dir due to the bug so we can't select CMA region where alloc/free happens. This patch fixes this problem by making alloc/free interface per CMA region. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Stefan Strogin <stefan.strogin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17mm/page_owner: set correct gfp_mask on page_ownerJoonsoo Kim
Currently, we set wrong gfp_mask to page_owner info in case of isolated freepage by compaction and split page. It causes incorrect mixed pageblock report that we can get from '/proc/pagetypeinfo'. This metric is really useful to measure fragmentation effect so should be accurate. This patch fixes it by setting correct information. Without this patch, after kernel build workload is finished, number of mixed pageblock is 112 among roughly 210 movable pageblocks. But, with this fix, output shows that mixed pageblock is just 57. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17mm/page_owner: fix possible access violationJoonsoo Kim
When I tested my new patches, I found that page pointer which is used for setting page_owner information is changed. This is because page pointer is used to set new migratetype in loop. After this work, page pointer could be out of bound. If this wrong pointer is used for page_owner, access violation happens. Below is error message that I got. BUG: unable to handle kernel paging request at 0000000000b00018 IP: [<ffffffff81025f30>] save_stack_address+0x30/0x40 PGD 1af2d067 PUD 166e0067 PMD 0 Oops: 0002 [#1] SMP ...snip... Call Trace: print_context_stack+0xcf/0x100 dump_trace+0x15f/0x320 save_stack_trace+0x2f/0x50 __set_page_owner+0x46/0x70 __isolate_free_page+0x1f7/0x210 split_free_page+0x21/0xb0 isolate_freepages_block+0x1e2/0x410 compaction_alloc+0x22d/0x2d0 migrate_pages+0x289/0x8b0 compact_zone+0x409/0x880 compact_zone_order+0x6d/0x90 try_to_compact_pages+0x110/0x210 __alloc_pages_direct_compact+0x3d/0xe6 __alloc_pages_nodemask+0x6cd/0x9a0 alloc_pages_current+0x91/0x100 runtest_store+0x296/0xa50 simple_attr_write+0xbd/0xe0 __vfs_write+0x28/0xf0 vfs_write+0xa9/0x1b0 SyS_write+0x46/0xb0 system_call_fastpath+0x16/0x75 This patch fixes this error by moving up set_page_owner(). Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Vlastimil Babka <vbabka@suse.cz> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17fsnotify: fix oops in fsnotify_clear_marks_by_group_flags()Jan Kara
fsnotify_clear_marks_by_group_flags() can race with fsnotify_destroy_marks() so when fsnotify_destroy_mark_locked() drops mark_mutex, a mark from the list iterated by fsnotify_clear_marks_by_group_flags() can be freed and we dereference free memory in the loop there. Fix the problem by keeping mark_mutex held in fsnotify_destroy_mark_locked(). The reason why we drop that mutex is that we need to call a ->freeing_mark() callback which may acquire mark_mutex again. To avoid this and similar lock inversion issues, we move the call to ->freeing_mark() callback to the kthread destroying the mark. Signed-off-by: Jan Kara <jack@suse.cz> Reported-by: Ashish Sangwan <a.sangwan@samsung.com> Suggested-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17/proc/$PID/cmdline: fixup empty ARGV caseAlexey Dobriyan
/proc/*/cmdline code checks if it should look at ENVP area by checking last byte of ARGV area: rv = access_remote_vm(mm, arg_end - 1, &c, 1, 0); if (rv <= 0) goto out_free_page; If ARGV is somehow made empty (by doing execve(..., NULL, ...) or manually setting ->arg_start and ->arg_end to equal values), the decision will be based on byte which doesn't even belong to ARGV/ENVP. So, quickly check if ARGV area is empty and report 0 to match previous behaviour. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17dma-debug: skip debug_dma_assert_idle() when disabledHaggai Eran
If dma-debug is disabled due to a memory error, DMA unmaps do not affect the dma_active_cacheline radix tree anymore, and debug_dma_assert_idle() can print false warnings. Disable debug_dma_assert_idle() when dma_debug_disabled() is true. Signed-off-by: Haggai Eran <haggaie@mellanox.com> Fixes: 0abdd7a81b7e ("dma-debug: introduce debug_dma_assert_idle()") Cc: Dan Williams <dan.j.williams@intel.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: James Bottomley <JBottomley@Parallels.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Horia Geanta <horia.geanta@freescale.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17hexdump: fix for non-aligned buffersHoracio Mijail Anton Quiles
A hexdump with a buf not aligned to the groupsize causes non-naturally-aligned memory accesses. This was causing a kernel panic on the processor BlackFin BF527, when such an unaligned buffer was fed by the function ubifs_scanned_corruption in fs/ubifs/scan.c . To fix this, change accesses to the contents of the buffer so they go through get_unaligned(). This change should be harmless to unaligned- access-capable architectures, and any performance hit should be anyway dwarfed by the snprintf() processing time. Signed-off-by: Horacio Mijail Antón Quiles <hmijail@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: David Howells <dhowells@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Joe Perches <joe@perches.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17checkpatch: fix long line messages about patch contextJoe Perches
Changes in ("checkpatch: categorize some long line length checks") now erroneously reports long line defects in patch context. Fix it. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17mm: clean up per architecture MM hook header filesLaurent Dufour
Commit 2ae416b142b6 ("mm: new mm hook framework") introduced an empty header file (mm-arch-hooks.h) for every architecture, even those which doesn't need to define mm hooks. As suggested by Geert Uytterhoeven, this could be cleaned through the use of a generic header file included via each per architecture asm/include/Kbuild file. The PowerPC architecture is not impacted here since this architecture has to defined the arch_remap MM hook. Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Vineet Gupta <vgupta@synopsys.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17MAINTAINERS: uclinux-h8-devel is moderated for non-subscribersGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17mailmap: update Sudeep Holla's email idSudeep Holla
Since the get_maintainer script still reports my old email id based on few old commits, update mailmap to report new/updated address. It also helps to fix email address for 'git shortlog' Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>