{"shas":[["980ce406c42b7310f07d3a11247127e80af949bf","546b05909706652891a87f7bfe385ae147f61f91@kernel.org","stop_machine: reimplement using cpu_stop\n\nReimplement stop_machine using cpu_stop.  As cpu stoppers are\nguaranteed to be available for all online cpus,\nstop_machine_create/destroy() are no longer necessary and removed.\n\nWith resource management and synchronization handled by cpu_stop, the\nnew implementation is much simpler.  Asking the cpu_stop to execute\nthe stop_cpu() state machine on all online cpus with cpu hotplug\ndisabled is enough.\n\nstop_machine itself doesn't need to manage any global resources\nanymore, so all per-instance information is rolled into struct\nstop_machine_data and the mutex and all static data variables are\nremoved.\n\nThe previous implementation created and destroyed RT workqueues as\nnecessary which made stop_machine() calls highly expensive on very\nlarge machines.  According to Dimitri Sivanich, preventing the dynamic\ncreation/destruction makes booting faster more than twice on very\nlarge machines.  cpu_stop resources are preallocated for all online\ncpus and should have the same effect.\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\nAcked-by: Rusty Russell <rusty@rustcorp.com.au>\nAcked-by: Peter Zijlstra <peterz@infradead.org>\nCc: Oleg Nesterov <oleg@redhat.com>\nCc: Dimitri Sivanich <sivanich@sgi.com>","Tejun Heo"],["d275473e9e958f76a9788ce9d6c243af3f310449","645ca7d3a8d3d4f60557176cd361ea8351edc32b@chello.nl","sched: Fix pick_next_highest_task_rt() for cgroups\n\nSince pick_next_highest_task_rt() already iterates all the cgroups and\nis really only interested in tasks, skip over the !task entries.\n\nReported-by: Dhaval Giani <dhaval.giani@gmail.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nTested-by: Dhaval Giani <dhaval.giani@gmail.com>\nLKML-Reference: <new-submission>\nSigned-off-by: Ingo Molnar <mingo@elte.hu>","Peter Zijlstra"],["cc7a0a423807e49c5d218b9f0d26d54c5ebcc39a","2f629c4d93e35c3d371f0463b040c6ef04a5c1e5@csn.ul.ie","mm: compaction: memory compaction core\n\nThis patch is the core of a mechanism which compacts memory in a zone by\nrelocating movable pages towards the end of the zone.\n\nA single compaction run involves a migration scanner and a free scanner.\nBoth scanners operate on pageblock-sized areas in the zone.  The migration\nscanner starts at the bottom of the zone and searches for all movable\npages within each area, isolating them onto a private list called\nmigratelist.  The free scanner starts at the top of the zone and searches\nfor suitable areas and consumes the free pages within making them\navailable for the migration scanner.  The pages isolated for migration are\nthen migrated to the newly isolated free pages.\n\n[aarcange@redhat.com: Fix unsafe optimisation]\n[mel@csn.ul.ie: do not schedule work on other CPUs for compaction]\nSigned-off-by: Mel Gorman <mel@csn.ul.ie>\nAcked-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Minchan Kim <minchan.kim@gmail.com>\nCc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nCc: Christoph Lameter <cl@linux-foundation.org>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","Mel Gorman"],["7d71b14242da490e5be6ad60b9f62b35a1f7f9ae","2f629c4d93e35c3d371f0463b040c6ef04a5c1e5@csn.ul.ie","mm: compaction: add /proc trigger for memory compaction\n\nAdd a proc file /proc/sys/vm/compact_memory.  When an arbitrary value is\nwritten to the file, all zones are compacted.  The expected user of such a\ntrigger is a job scheduler that prepares the system before the target\napplication runs.\n\nSigned-off-by: Mel Gorman <mel@csn.ul.ie>\nAcked-by: Rik van Riel <riel@redhat.com>\nReviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nReviewed-by: Minchan Kim <minchan.kim@gmail.com>\nReviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nReviewed-by: Christoph Lameter <cl@linux-foundation.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","Mel Gorman"],["551ef343032ad14987cfaca517d081643667f81d","2f629c4d93e35c3d371f0463b040c6ef04a5c1e5@csn.ul.ie","mm: compaction: add /sys trigger for per-node memory compaction\n\nAdd a per-node sysfs file called compact.  When the file is written to,\neach zone in that node is compacted.  The intention that this would be\nused by something like a job scheduler in a batch system before a job\nstarts so that the job can allocate the maximum number of hugepages\nwithout significant start-up cost.\n\nSigned-off-by: Mel Gorman <mel@csn.ul.ie>\nAcked-by: Rik van Riel <riel@redhat.com>\nReviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nReviewed-by: Christoph Lameter <cl@linux-foundation.org>\nReviewed-by: Minchan Kim <minchan.kim@gmail.com>\nReviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","Mel Gorman"],["83fe9ee1d2447c7f682a9d3c796f71e553440d09","80c117f3333cce6d6e7aa29bbc6890c6f527e3fe@android.com","Implement read(2) in ashmem driver\n\nBug: 2595601\nChange-Id: I47c0016f594f9354fb8658ccb26e3d395bcb137b\nSigned-off-by: Bjorn Bringert <bringert@android.com>","Bjorn Bringert"],["e30e7f3ea6050dbf7e649bbbdaca4e286b8df458","203686835f49d1750fcbb70065cda5c503139a61@android.com","ashmem: Fix ASHMEM_SET_PROT_MASK.\n\nChange-Id: I1412cc9560de8c4feb1162fc30922f0e3362a476\nSigned-off-by: Arve Hjønnevåg <arve@android.com>","Arve Hjønnevåg"],["d0cdd69176e3652d3d9d3c4e8bcd5865bf6903dc","80c117f3333cce6d6e7aa29bbc6890c6f527e3fe@android.com","Support lseek(2) in ashmem driver\n\nSigned-off-by: Bjorn Bringert <bringert@android.com>\nChange-Id: I509d18b21832e229737ea7ebaa231fb107eb61d7","Bjorn Bringert"],["d20b2d1e1d771f7026b1cce16c48251abbfc6e36","4c9eb49378914b743bdd32292c04df29b820d73e@cn.fujitsu.com","rcu: Cleanup: balance rcu_irq_enter()/rcu_irq_exit() calls\n\nCurrently, rcu_irq_exit() is invoked only for CONFIG_NO_HZ,\nwhile rcu_irq_enter() is invoked unconditionally.  This patch\nmoves rcu_irq_exit() out from under CONFIG_NO_HZ so that the\ncalls are balanced.\n\nThis patch has no effect on the behavior of the kernel because\nboth rcu_irq_enter() and rcu_irq_exit() are empty for\n!CONFIG_NO_HZ, but the code is easier to understand if the calls\nare obviously balanced in all cases.\n\nSigned-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>\nSigned-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: dipankar@in.ibm.com\nCc: mathieu.desnoyers@polymtl.ca\nCc: josh@joshtriplett.org\nCc: dvhltc@us.ibm.com\nCc: niv@us.ibm.com\nCc: peterz@infradead.org\nCc: rostedt@goodmis.org\nCc: Valdis.Kletnieks@vt.edu\nCc: dhowells@redhat.com\nLKML-Reference: <12567428891605-git-send-email->\nSigned-off-by: Ingo Molnar <mingo@elte.hu>","Lai Jiangshan"],["9489c6fa8d975d814b2f6584ec4417a6cb835a5b","645ca7d3a8d3d4f60557176cd361ea8351edc32b@chello.nl","hrtimer, softirq: Fix hrtimer->softirq trampoline\n\nhrtimers callbacks are always done from hardirq context, either the\njiffy tick interrupt or the hrtimer device interrupt.\n\n[ there is currently one exception that can still call a hrtimer\n  callback from softirq, but even in that case this will still\n  work correctly. ]\n\nReported-by: Wei Yongjun <yjwei@cn.fujitsu.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Yury Polyanskiy <ypolyans@princeton.edu>\nTested-by: Wei Yongjun <yjwei@cn.fujitsu.com>\nAcked-by: David S. Miller <davem@davemloft.net>\nLKML-Reference: <1265120401.24455.306.camel@laptop>\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","Peter Zijlstra"],["c3e195f6012a13034c4b6a061dd2a86c6964bae0","9d183ff83abfec5c556edaf86a280a53916a11d8@redhat.com","ftrace: Only update the function code on write to filter files\n\ncommit 058e297d34a404caaa5ed277de15698d8dc43000 upstream.\n\nIf function tracing is enabled, a read of the filter files will\ncause the call to stop_machine to update the function trace sites.\nIt should only call stop_machine on write.\n\nSigned-off-by: Steven Rostedt <rostedt@goodmis.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Steven Rostedt"],["8d36dcb55a79e908d4ff0fa1e4afc7fd48efda9b","15ce75b290ebaf27c3f9fd73ab848685ed3d8261@arm.com","kmemleak: Do not return a pointer to an object that kmemleak did not get\n\ncommit 52c3ce4ec5601ee383a14f1485f6bac7b278896e upstream.\n\nThe kmemleak_seq_next() function tries to get an object (and increment\nits use count) before returning it. If it could not get the last object\nduring list traversal (because it may have been freed), the function\nshould return NULL rather than a pointer to such object that it did not\nget.\n\nSigned-off-by: Catalin Marinas <catalin.marinas@arm.com>\nReported-by: Phil Carmody <ext-phil.2.carmody@nokia.com>\nAcked-by: Phil Carmody <ext-phil.2.carmody@nokia.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Catalin Marinas"],["193c38c29b64941f54a9a14e1372ed11894d6561","0e767fafdf344389ad0c105cb1a36b8c3fdb7986@amd.com","CPU hotplug, re-create sysfs directory and symlinks\n\ncommit 27ecddc2a9f99ce4ac9a59a0acd77f7100b6d034 upstream.\n\nWhen we discover CPUs that are affected by each other's\nfrequency/voltage transitions, the first CPU gets a sysfs directory\ncreated, and rest of the siblings get symlinks. Currently, when we\nhotplug off only the first CPU, all of the symlinks and the sysfs\ndirectory gets removed. Even though rest of the siblings are still\nonline and functional, they are orphaned, and no longer governed by\ncpufreq.\n\nThis patch, given the above scenario, creates a sysfs directory for\nthe first sibling and symlinks for the rest of the siblings.\n\nPlease note the recursive call, it was rather too ugly to roll it\nout. And the removal of redundant NULL setting (it is already taken\ncare of near the top of the function).\n\nSigned-off-by: Jacob Shin <jacob.shin@amd.com>\nAcked-by: Mark Langsdorf <mark.langsdorf@amd.com>\nReviewed-by: Thomas Renninger <trenn@suse.de>\nSigned-off-by: Dave Jones <davej@redhat.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Jacob Shin"],["45d1aefde90845643fe312f7769568ae333bc69d","90bab6782deeb39b076031784d0cb57995acaa40@palm.com","Fix memory leak in cpufreq_stat\n\ncommit 98586ed8b8878e10691203687e89a42fa3355300 upstream.\n\nWhen a CPU is taken offline in an SMP system, cpufreq_remove_dev()\nnulls out the per-cpu policy before cpufreq_stats_free_table() can\nmake use of it.  cpufreq_stats_free_table() then skips the\ncall to sysfs_remove_group(), leaving about 100 bytes of sysfs-related\nmemory unclaimed each time a CPU-removal occurs. Break up\ncpu_stats_free_table into sysfs and table portions, and\ncall the sysfs portion early.\n\nSigned-off-by: Steven Finney <steven.finney@palm.com>\nSigned-off-by: Dave Jones <davej@redhat.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","steven finney"],["e798ec9aa3266a858320416f4816e0ea0bdaec26","8bd50e0fc26e21e23b28837d9acdf866b237c39d@bga.com","powerpc/kexec: Fix memory corruption from unallocated slaves\n\ncommit 3d2cea732d68aa270c360f55d8669820ebce188a upstream.\n\nCommit 1fc711f7ffb01089efc58042cfdbac8573d1b59a (powerpc/kexec: Fix race\nin kexec shutdown) moved the write to signal the cpu had exited the kernel\nfrom before the transition to real mode in kexec_smp_wait to kexec_wait.\n\nUnfornately it missed that kexec_wait is used both by cpus leaving the\nkernel and by secondary slave cpus that were not allocated a paca for\nwhat ever reason -- they could be beyond nr_cpus or not described in\nthe current device tree for whatever reason (for example, kexec-load\nwas not refreshed after a cpu hotplug operation).  Cpus coming through\nthat path they will write to paca[NR_CPUS] which is beyond the space\nallocated for the paca data and overwrite memory not allocated to pacas\nbut very likely still real mode accessable).\n\nMove the write back to kexec_smp_wait, which is used only by cpus that\nfound their paca, but after the transition to real mode.\n\nSigned-off-by: Milton Miller <miltonm@bga.com>\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Milton Miller"],["2373b90c91b382d2e3cb23f83812c3f157eba11b","51d9dbd4ea8b7943d3deb397de3f8cbc23693656@mgebm.net","powerpc/oprofile: Handle events that raise an exception without overflowing\n\ncommit ad5d5292f16c6c1d7d3e257c4c7407594286b97e upstream.\n\nCommit 0837e3242c73566fc1c0196b4ec61779c25ffc93 fixes a situation on POWER7\nwhere events can roll back if a specualtive event doesn't actually complete.\nThis can raise a performance monitor exception.  We need to catch this to ensure\nthat we reset the PMC.  In all cases the PMC will be less than 256 cycles from\noverflow.\n\nThis patch lifts Anton's fix for the problem in perf and applies it to oprofile\nas well.\n\nSigned-off-by: Eric B Munson <emunson@mgebm.net>\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Eric B Munson"],["713ce5470c5770bdf8ba6f104aa8c67134b81a04","546b05909706652891a87f7bfe385ae147f61f91@kernel.org","block: rescan partitions on invalidated devices on -ENOMEDIA too\n\ncommit 02e352287a40bd456eb78df705bf888bc3161d3f upstream.\n\n__blkdev_get() doesn't rescan partitions if disk->fops->open() fails,\nwhich leads to ghost partition devices lingering after medimum removal\nis known to both the kernel and userland.  The behavior also creates a\nsubtle inconsistency where O_NONBLOCK open, which doesn't fail even if\nthere's no medium, clears the ghots partitions, which is exploited to\nwork around the problem from userland.\n\nFix it by updating __blkdev_get() to issue partition rescan after\n-ENOMEDIA too.\n\nThis was reported in the following bz.\n\n https://bugzilla.kernel.org/show_bug.cgi?id=13029\n\nStable: 2.6.38\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\nReported-by: David Zeuthen <zeuthen@gmail.com>\nReported-by: Martin Pitt <martin.pitt@ubuntu.com>\nReported-by: Kay Sievers <kay.sievers@vrfy.org>\nTested-by: Kay Sievers <kay.sievers@vrfy.org>\nCc: Alan Cox <alan@lxorguk.ukuu.org.uk>\nSigned-off-by: Jens Axboe <jaxboe@fusionio.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Tejun Heo"],["5ddfad475f89dd9e2f39f26f7dc175eabb12eb73","407b36959ca09543ccda8f8e06721c791bc53435@suse.de","block: add proper state guards to __elv_next_request\n\ncommit 0a58e077eb600d1efd7e54ad9926a75a39d7f8ae upstream.\n\nblk_cleanup_queue() calls elevator_exit() and after this, we can't\ntouch the elevator without oopsing.  __elv_next_request() must check\nfor this state because in the refcounted queue model, we can still\ncall it after blk_cleanup_queue() has been called.\n\nThis was reported as causing an oops attributable to scsi.\n\nSigned-off-by: James Bottomley <James.Bottomley@suse.de>\nSigned-off-by: Jens Axboe <jaxboe@fusionio.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","James Bottomley"],["5edc2996fdb035eae508c7ab2af85f9fe4104347","9c69098d379350e157eff4ad93150662007b8fb2@embedded-sol.com","mtd: mtdconcat: fix NAND OOB write\n\ncommit 431e1ecabddcd7cbba237182ddf431771f98bb4c upstream.\n\nCurrently mtdconcat is broken for NAND. An attemtpt to create\nJFFS2 filesystem on concatenation of several NAND devices fails\nwith OOB write errors. This patch fixes that problem.\n\nSigned-off-by: Felix Radensky <felix@embedded-sol.com>\nSigned-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>\nSigned-off-by: David Woodhouse <David.Woodhouse@intel.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Felix Radensky"],["fb6f508a878bb533314f214db4a2c26b60203e47","2c6594f608aa3d41e98d48846a6328831f7084ad@redhat.com","x86, 64-bit: Fix copy_[to/from]_user() checks for the userspace address limit\n\ncommit 26afb7c661080ae3f1f13ddf7f0c58c4f931c22b upstream.\n\nAs reported in BZ #30352:\n\n  https://bugzilla.kernel.org/show_bug.cgi?id=30352\n\nthere's a kernel bug related to reading the last allowed page on x86_64.\n\nThe _copy_to_user() and _copy_from_user() functions use the following\ncheck for address limit:\n\n  if (buf + size >= limit)\n\tfail();\n\nwhile it should be more permissive:\n\n  if (buf + size > limit)\n\tfail();\n\nThat's because the size represents the number of bytes being\nread/write from/to buf address AND including the buf address.\nSo the copy function will actually never touch the limit\naddress even if \"buf + size == limit\".\n\nFollowing program fails to use the last page as buffer\ndue to the wrong limit check:\n\n #include <sys/mman.h>\n #include <sys/socket.h>\n #include <assert.h>\n\n #define PAGE_SIZE       (4096)\n #define LAST_PAGE       ((void*)(0x7fffffffe000))\n\n int main()\n {\n        int fds[2], err;\n        void * ptr = mmap(LAST_PAGE, PAGE_SIZE, PROT_READ | PROT_WRITE,\n                          MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0);\n        assert(ptr == LAST_PAGE);\n        err = socketpair(AF_LOCAL, SOCK_STREAM, 0, fds);\n        assert(err == 0);\n        err = send(fds[0], ptr, PAGE_SIZE, 0);\n        perror(\"send\");\n        assert(err == PAGE_SIZE);\n        err = recv(fds[1], ptr, PAGE_SIZE, MSG_WAITALL);\n        perror(\"recv\");\n        assert(err == PAGE_SIZE);\n        return 0;\n }\n\nThe other place checking the addr limit is the access_ok() function,\nwhich is working properly. There's just a misleading comment\nfor the __range_not_ok() macro - which this patch fixes as well.\n\nThe last page of the user-space address range is a guard page and\nBrian Gerst observed that the guard page itself due to an erratum on K8 cpus\n(#121 Sequential Execution Across Non-Canonical Boundary Causes Processor\nHang).\n\nHowever, the test code is using the last valid page before the guard page.\nThe bug is that the last byte before the guard page can't be read\nbecause of the off-by-one error. The guard page is left in place.\n\nThis bug would normally not show up because the last page is\npart of the process stack and never accessed via syscalls.\n\nSigned-off-by: Jiri Olsa <jolsa@redhat.com>\nAcked-by: Brian Gerst <brgerst@gmail.com>\nAcked-by: Linus Torvalds <torvalds@linux-foundation.org>\nLink: http://lkml.kernel.org/r/1305210630-7136-1-git-send-email-jolsa@redhat.com\nSigned-off-by: Ingo Molnar <mingo@elte.hu>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","Jiri Olsa"]],"ref":"refs/heads/gingerbread","size":106,"head":"2ed8eb669c56f8b9f25af7eba73f647adc89bf9f","push_id":35223310}