GitHub PushEvent at 2014-05-24 19:47:23
Repository: grakernel-msm8930
Actor: Grarak
Payload: {"shas":[["eb00a3ab00ce4d6fdac059d1851bc78a8d93ad1a","d6e1285e1c84d3d5885c2124fdacc780e9fc0a94@tycho.nsa.gov","SELinux: Fix kernel BUG on empty security contexts.\n\nSetting an empty security context (length=0) on a file will\nlead to incorrectly dereferencing the type and other fields\nof the security context structure, yielding a kernel BUG.\nAs a zero-length security context is never valid, just reject\nall such security contexts whether coming from userspace\nvia setxattr or coming from the filesystem upon a getxattr\nrequest by SELinux.\n\nSetting a security context value (empty or otherwise) unknown to\nSELinux in the first place is only possible for a root process\n(CAP_MAC_ADMIN), and, if running SELinux in enforcing mode, only\nif the corresponding SELinux mac_admin permission is also granted\nto the domain by policy.  In Fedora policies, this is only allowed for\nspecific domains such as livecd for setting down security contexts\nthat are not defined in the build host policy.\n\n[On Android, this can only be set by root/CAP_MAC_ADMIN processes,\nand if running SELinux in enforcing mode, only if mac_admin permission\nis granted in policy.  In Android 4.4, this would only be allowed for\nroot/CAP_MAC_ADMIN processes that are also in unconfined domains. In current\nAOSP master, mac_admin is not allowed for any domains except the recovery\nconsole which has a legitimate need for it.  The other potential vector\nis mounting a maliciously crafted filesystem for which SELinux fetches\nxattrs (e.g. an ext4 filesystem on a SDcard).  However, the end result is\nonly a local denial-of-service (DOS) due to kernel BUG.  This fix is\nqueued for 3.14.]\n\nReproducer:\nsu\nsetenforce 0\ntouch foo\nsetfattr -n security.selinux foo\n\nCaveat:\nRelabeling or removing foo after doing the above may not be possible\nwithout booting with SELinux disabled.  Any subsequent access to foo\nafter doing the above will also trigger the BUG.\n\nBUG output from Matthew Thode:\n[  473.893141] ------------[ cut here ]------------\n[  473.962110] kernel BUG at security/selinux/ss/services.c:654!\n[  473.995314] invalid opcode: 0000 [#6] SMP\n[  474.027196] Modules linked in:\n[  474.058118] CPU: 0 PID: 8138 Comm: ls Tainted: G      D   I\n3.13.0-grsec #1\n[  474.116637] Hardware name: Supermicro X8ST3/X8ST3, BIOS 2.0\n07/29/10\n[  474.149768] task: ffff8805f50cd010 ti: ffff8805f50cd488 task.ti:\nffff8805f50cd488\n[  474.183707] RIP: 0010:[<ffffffff814681c7>]  [<ffffffff814681c7>]\ncontext_struct_compute_av+0xce/0x308\n[  474.219954] RSP: 0018:ffff8805c0ac3c38  EFLAGS: 00010246\n[  474.252253] RAX: 0000000000000000 RBX: ffff8805c0ac3d94 RCX:\n0000000000000100\n[  474.287018] RDX: ffff8805e8aac000 RSI: 00000000ffffffff RDI:\nffff8805e8aaa000\n[  474.321199] RBP: ffff8805c0ac3cb8 R08: 0000000000000010 R09:\n0000000000000006\n[  474.357446] R10: 0000000000000000 R11: ffff8805c567a000 R12:\n0000000000000006\n[  474.419191] R13: ffff8805c2b74e88 R14: 00000000000001da R15:\n0000000000000000\n[  474.453816] FS:  00007f2e75220800(0000) GS:ffff88061fc00000(0000)\nknlGS:0000000000000000\n[  474.489254] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[  474.522215] CR2: 00007f2e74716090 CR3: 00000005c085e000 CR4:\n00000000000207f0\n[  474.556058] Stack:\n[  474.584325]  ffff8805c0ac3c98 ffffffff811b549b ffff8805c0ac3c98\nffff8805f1190a40\n[  474.618913]  ffff8805a6202f08 ffff8805c2b74e88 00068800d0464990\nffff8805e8aac860\n[  474.653955]  ffff8805c0ac3cb8 000700068113833a ffff880606c75060\nffff8805c0ac3d94\n[  474.690461] Call Trace:\n[  474.723779]  [<ffffffff811b549b>] ? lookup_fast+0x1cd/0x22a\n[  474.778049]  [<ffffffff81468824>] security_compute_av+0xf4/0x20b\n[  474.811398]  [<ffffffff8196f419>] avc_compute_av+0x2a/0x179\n[  474.843813]  [<ffffffff8145727b>] avc_has_perm+0x45/0xf4\n[  474.875694]  [<ffffffff81457d0e>] inode_has_perm+0x2a/0x31\n[  474.907370]  [<ffffffff81457e76>] selinux_inode_getattr+0x3c/0x3e\n[  474.938726]  [<ffffffff81455cf6>] security_inode_getattr+0x1b/0x22\n[  474.970036]  [<ffffffff811b057d>] vfs_getattr+0x19/0x2d\n[  475.000618]  [<ffffffff811b05e5>] vfs_fstatat+0x54/0x91\n[  475.030402]  [<ffffffff811b063b>] vfs_lstat+0x19/0x1b\n[  475.061097]  [<ffffffff811b077e>] SyS_newlstat+0x15/0x30\n[  475.094595]  [<ffffffff8113c5c1>] ? __audit_syscall_entry+0xa1/0xc3\n[  475.148405]  [<ffffffff8197791e>] system_call_fastpath+0x16/0x1b\n[  475.179201] Code: 00 48 85 c0 48 89 45 b8 75 02 0f 0b 48 8b 45 a0 48\n8b 3d 45 d0 b6 00 8b 40 08 89 c6 ff ce e8 d1 b0 06 00 48 85 c0 49 89 c7\n75 02 <0f> 0b 48 8b 45 b8 4c 8b 28 eb 1e 49 8d 7d 08 be 80 01 00 00 e8\n[  475.255884] RIP  [<ffffffff814681c7>]\ncontext_struct_compute_av+0xce/0x308\n[  475.296120]  RSP <ffff8805c0ac3c38>\n[  475.328734] ---[ end trace f076482e9d754adc ]---\n\n[sds:  commit message edited to note Android implications and\nto generate a unique Change-Id for gerrit]\n\nChange-Id: I4d5389f0cfa72b5f59dada45081fa47e03805413\nReported-by:  Matthew Thode <mthode@mthode.org>\nSigned-off-by: Stephen Smalley <sds@tycho.nsa.gov>\nCc: stable@vger.kernel.org\nSigned-off-by: Paul Moore <pmoore@redhat.com>","Stephen Smalley",true],["f2248afd49109b49e43f2769687b42b37649fd66","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","smp: Add generic smpboot facility\n\nStart a new file, which will hold SMP and CPU hotplug related generic\ninfrastructure.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Matt Turner <mattst88@gmail.com>\nCc: Russell King <linux@arm.linux.org.uk>\nCc: Mike Frysinger <vapier@gentoo.org>\nCc: Jesper Nilsson <jesper.nilsson@axis.com>\nCc: Richard Kuo <rkuo@codeaurora.org>\nCc: Tony Luck <tony.luck@intel.com>\nCc: Hirokazu Takata <takata@linux-m32r.org>\nCc: Ralf Baechle <ralf@linux-mips.org>\nCc: David Howells <dhowells@redhat.com>\nCc: James E.J. Bottomley <jejb@parisc-linux.org>\nCc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCc: Martin Schwidefsky <schwidefsky@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Chris Metcalf <cmetcalf@tilera.com>\nCc: Richard Weinberger <richard@nod.at>\nCc: x86@kernel.org\nLink: http://lkml.kernel.org/r/20120420124557.035417523@linutronix.de\n\nChange-Id: Ia1ad435435aa12c47ac0d381ae031ebf6edcff1f","Thomas Gleixner",true],["99ecb301189348b731d1bb7e3f4fe5f1c34c1d9a","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","smp: Provide generic idle thread allocation\n\nAll SMP architectures have magic to fork the idle task and to store it\nfor reusage when cpu hotplug is enabled. Provide a generic\ninfrastructure for it.\n\nCreate/reinit the idle thread for the cpu which is brought up in the\ngeneric code and hand the thread pointer to the architecture code via\n__cpu_up().\n\nNote, that fork_idle() is called via a workqueue, because this\nguarantees that the idle thread does not get a reference to a user\nspace VM. This can happen when the boot process did not bring up all\npossible cpus and a later cpu_up() is initiated via the sysfs\ninterface. In that case fork_idle() would be called in the context of\nthe user space task and take a reference on the user space VM.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Matt Turner <mattst88@gmail.com>\nCc: Russell King <linux@arm.linux.org.uk>\nCc: Mike Frysinger <vapier@gentoo.org>\nCc: Jesper Nilsson <jesper.nilsson@axis.com>\nCc: Richard Kuo <rkuo@codeaurora.org>\nCc: Tony Luck <tony.luck@intel.com>\nCc: Hirokazu Takata <takata@linux-m32r.org>\nCc: Ralf Baechle <ralf@linux-mips.org>\nCc: David Howells <dhowells@redhat.com>\nCc: James E.J. Bottomley <jejb@parisc-linux.org>\nCc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCc: Martin Schwidefsky <schwidefsky@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Chris Metcalf <cmetcalf@tilera.com>\nCc: Richard Weinberger <richard@nod.at>\nCc: x86@kernel.org\nAcked-by: Venkatesh Pallipadi <venki@google.com>\nLink: http://lkml.kernel.org/r/20120420124557.102478630@linutronix.de\n\nChange-Id: Ie2d32789f3a69ee15f38ba704aaa84d6be85bcd4","Thomas Gleixner",true],["5c4de06e91bbe535f8304928547f24fd44ec90e1","a42fd12510d3895be740fb89f87586733ee62f57@intel.com","smp, idle: Allocate idle thread for each possible cpu during boot\n\npercpu areas are already allocated during boot for each possible cpu.\npercpu idle threads can be considered as an extension of the percpu areas,\nand allocate them for each possible cpu during boot.\n\nThis will eliminate the need for workqueue based idle thread allocation.\nIn future we can move the idle thread area into the percpu area too.\n\n[ tglx: Moved the loop into smpboot.c and added an error check when\n  the init code failed to allocate an idle thread for a cpu which\n  should be onlined ]\n\nSigned-off-by: Suresh Siddha <suresh.b.siddha@intel.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Tejun Heo <tj@kernel.org>\nCc: David Rientjes <rientjes@google.com>\nCc: venki@google.com\nLink: http://lkml.kernel.org/r/1334966930.28674.245.camel@sbsiddha-desk.sc.intel.com\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: I36828165fc08b7c0a8a0fe6a2aa24d358e623dd2","Suresh Siddha",true],["4dd9896f5decf2c1b37d5c198298f437a00fe0c4","5b23f8226e886b22344fc642373ea657dd596b63@linux.vnet.ibm.com","smpboot, idle: Optimize calls to smp_processor_id() in idle_threads_init()\n\nWhile trying to initialize idle threads for all cpus, idle_threads_init()\ncalls smp_processor_id() in a loop, which is unnecessary. The intent\nis to initialize idle threads for all non-boot cpus. So just use a variable\nto note the boot cpu and use it in the loop.\n\nSigned-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: suresh.b.siddha@intel.com\nCc: venki@google.com\nCc: nikunj@linux.vnet.ibm.com\nLink: http://lkml.kernel.org/r/20120524151055.2549.64309.stgit@srivatsabhat.in.ibm.com\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: Ib65df4c31e93e1622c26f2c2a4946ffd28c1839d","Srivatsa S. Bhat",true],["86ad02c170cd322da772846e9b053abb97455acf","5b23f8226e886b22344fc642373ea657dd596b63@linux.vnet.ibm.com","smpboot, idle: Fix comment mismatch over idle_threads_init()\n\nThe comment over idle_threads_init() really talks about the functionality\nof idle_init(). Move that comment to idle_init(), and add a suitable\ncomment over idle_threads_init().\n\nSigned-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: suresh.b.siddha@intel.com\nCc: venki@google.com\nCc: nikunj@linux.vnet.ibm.com\nLink: http://lkml.kernel.org/r/20120524151100.2549.66501.stgit@srivatsabhat.in.ibm.com\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: Ib0cd6d6e19e0c64868a42a77101b080a5f3b04f8","Srivatsa S. Bhat",true],["5e7795879ab6ab1f4a05395cfee2083a38c91d56","546b05909706652891a87f7bfe385ae147f61f91@kernel.org","kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation\n\nMake the following two non-functional changes.\n\n* Separate out insert_kthread_work() from queue_kthread_work().\n\n* Relocate struct kthread_flush_work and kthread_flush_work_fn()\n  definitions above flush_kthread_work().\n\nv2: Added lockdep_assert_held() in insert_kthread_work() as suggested\n    by Andy Walls.\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\nAcked-by: Andy Walls <awalls@md.metrocast.net>\n\nChange-Id: Ie1eef2c000c328ec16f32db011377415237da93d","Tejun Heo",true],["bb4c0b400069e82d1f5be5473aa7de2f643e4059","546b05909706652891a87f7bfe385ae147f61f91@kernel.org","kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed\n\nkthread_worker provides minimalistic workqueue-like interface for\nusers which need a dedicated worker thread (e.g. for realtime\npriority).  It has basic queue, flush_work, flush_worker operations\nwhich mostly match the workqueue counterparts; however, due to the way\nflush_work() is implemented, it has a noticeable difference of not\nallowing work items to be freed while being executed.\n\nWhile the current users of kthread_worker are okay with the current\nbehavior, the restriction does impede some valid use cases.  Also,\nremoving this difference isn't difficult and actually makes the code\neasier to understand.\n\nThis patch reimplements flush_kthread_work() such that it uses a\nflush_work item instead of queue/done sequence numbers.\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\n\nChange-Id: I06e2ab5ef8ea3caa8e40257da0a636ab9eb5ae55","Tejun Heo",true],["b1e664e8b36e4ed4eb20713e7c046ac5585e362c","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","kthread: Implement park/unpark facility\n\nTo avoid the full teardown/setup of per cpu kthreads in the case of\ncpu hot(un)plug, provide a facility which allows to put the kthread\ninto a park position and unpark it when the cpu comes online again.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nReviewed-by: Namhyung Kim <namhyung@kernel.org>\nCc: Peter Zijlstra <peterz@infradead.org>\nReviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nReviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/20120716103948.236618824@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: I05d28788540b666349bafecf6cb3fdc873b6cdde","Thomas Gleixner",true],["968c6ccbab3329c4fd496b1ce8207aaab5a943ca","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","smpboot: Provide infrastructure for percpu hotplug threads\n\nProvide a generic interface for setting up and tearing down percpu\nthreads.\n\nOn registration the threads for already online cpus are created and\nstarted. On deregistration (modules) the threads are stoppped.\n\nDuring hotplug operations the threads are created, started, parked and\nunparked. The datastructure for registration provides a pointer to\npercpu storage space and optional setup, cleanup, park, unpark\nfunctions. These functions are called when the thread state changes.\n\nEach implementation has to provide a function which is queried and\nreturns whether the thread should run and the thread function itself.\n\nThe core code handles all state transitions and avoids duplicated code\nin the call sites.\n\n[ paulmck: Preemption leak fix ]\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nReviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nReviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/20120716103948.352501068@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: Ib2ac667cd13cf26a042d65c1b3f20fe7e4b02423","Thomas Gleixner",true],["125a8809183dc4ebd717805a467914e3eed0612c","95dea50491c620faede961f7e6190a98a6df4edf@linaro.org","hotplug: Fix UP bug in smpboot hotplug code\n\nBecause kernel subsystems need their per-CPU kthreads on UP systems as\nwell as on SMP systems, the smpboot hotplug kthread functions must be\nprovided in UP builds as well as in SMP builds.  This commit therefore\nadds smpboot.c to UP builds and excludes irrelevant code via #ifdef.\n\nSigned-off-by: Paul E. McKenney <paul.mckenney@linaro.org>\nSigned-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: I7b570d6c241c513227c3fdc1d843bf369bed036c","Paul E. McKenney",true],["71a290e844cc7df831678980f5deb0ea13518de6","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","smpboot: Allow selfparking per cpu threads\n\nThe stop machine threads are still killed when a cpu goes offline. The\nreason is that the thread is used to bring the cpu down, so it can't\nbe parked along with the other per cpu threads.\n\nAllow a per cpu thread to be excluded from automatic parking, so it\ncan park itself once it's done\n\nAdd a create callback function as well.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Arjan van de Veen <arjan@infradead.org>\nCc: Paul Turner <pjt@google.com>\nCc: Richard Weinberger <rw@linutronix.de>\nCc: Magnus Damm <magnus.damm@gmail.com>\nLink: http://lkml.kernel.org/r/20130131120741.553993267@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: I864f39336a2cb648c518526459929c081f831216","Thomas Gleixner",true],["22d0fe25a43e570c67e3c9c09936bbbe7a835467","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","kthread: Prevent unpark race which puts threads on the wrong cpu\n\nThe smpboot threads rely on the park/unpark mechanism which binds per\ncpu threads on a particular core. Though the functionality is racy:\n\nCPU0\t       \t \tCPU1  \t     \t    CPU2\nunpark(T)\t\t\t\t    wake_up_process(T)\n  clear(SHOULD_PARK)\tT runs\n\t\t\tleave parkme() due to !SHOULD_PARK\n  bind_to(CPU2)\t\tBUG_ON(wrong CPU)\n\nWe cannot let the tasks move themself to the target CPU as one of\nthose tasks is actually the migration thread itself, which requires\nthat it starts running on the target cpu right away.\n\nThe solution to this problem is to prevent wakeups in park mode which\nare not from unpark(). That way we can guarantee that the association\nof the task to the target cpu is working correctly.\n\nAdd a new task state (TASK_PARKED) which prevents other wakeups and\nuse this state explicitly for the unpark wakeup.\n\nPeter noticed: Also, since the task state is visible to userspace and\nall the parked tasks are still in the PID space, its a good hint in ps\nand friends that these tasks aren't really there for the moment.\n\nThe migration thread has another related issue.\n\nCPU0\t      \t     \t CPU1\nBring up CPU2\ncreate_thread(T)\npark(T)\n wait_for_completion()\n\t\t\t parkme()\n\t\t\t complete()\nsched_set_stop_task()\n\t\t\t schedule(TASK_PARKED)\n\nThe sched_set_stop_task() call is issued while the task is on the\nrunqueue of CPU1 and that confuses the hell out of the stop_task class\non that cpu. So we need the same synchronizaion before\nsched_set_stop_task().\n\nReported-by: Dave Jones <davej@redhat.com>\nReported-and-tested-by: Dave Hansen <dave@sr71.net>\nReported-and-tested-by: Borislav Petkov <bp@alien8.de>\nAcked-by: Peter Ziljstra <peterz@infradead.org>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: dhillf@gmail.com\nCc: Ingo Molnar <mingo@kernel.org>\nCc: stable@vger.kernel.org\nLink: http://lkml.kernel.org/r/alpine.LFD.2.02.1304091635430.21884@ionos\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: If1e9993951c4ad1f6f35ad0698f6ccd05a67e81f","Thomas Gleixner",true],["1217e972b9220a032210c8eae93e465b2671086d","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","stop_machine: Store task reference in a separate per cpu variable\n\nTo allow the stopper thread being managed by the smpboot thread\ninfrastructure separate out the task storage from the stopper data\nstructure.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Arjan van de Veen <arjan@infradead.org>\nCc: Paul Turner <pjt@google.com>\nCc: Richard Weinberger <rw@linutronix.de>\nCc: Magnus Damm <magnus.damm@gmail.com>\nLink: http://lkml.kernel.org/r/20130131120741.626690384@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: Ibfe2389e42fcf2e236940bbc223a36da571ed6e9","Thomas Gleixner",true],["c5c51be262bac2da72c40630bbc0a36144f6e3d9","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","stop_machine: Use smpboot threads\n\nUse the smpboot thread infrastructure. Mark the stopper thread\nselfparking and park it after it has finished the take_cpu_down()\nwork.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Arjan van de Veen <arjan@infradead.org>\nCc: Paul Turner <pjt@google.com>\nCc: Richard Weinberger <rw@linutronix.de>\nCc: Magnus Damm <magnus.damm@gmail.com>\nLink: http://lkml.kernel.org/r/20130131120741.686315164@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: I30771810f2cbb2a64ca090864156edc79d338dfd","Thomas Gleixner",true],["18126e3ff299b2e2bea95454f503f4b852521a36","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","stop_machine: Mark per cpu stopper enabled early\n\ncommit 14e568e78 (stop_machine: Use smpboot threads) introduced the\nfollowing regression:\n\nBefore this commit the stopper enabled bit was set in the online\nnotifier.\n\nCPU0\t\t\t\tCPU1\ncpu_up\n\t\t\t\tcpu online\nhotplug_notifier(ONLINE)\n  stopper(CPU1)->enabled = true;\n...\nstop_machine()\n\nThe conversion to smpboot threads moved the enablement to the wakeup\npath of the parked thread. The majority of users seem to have the\nfollowing working order:\n\nCPU0\t\t\t\tCPU1\ncpu_up\n\t\t\t\tcpu online\nunpark_threads()\n  wakeup(stopper[CPU1])\n....\n\t\t\t\tstopper thread runs\n\t\t\t\t  stopper(CPU1)->enabled = true;\nstop_machine()\n\nBut Konrad and Sander have observed:\n\nCPU0\t\t\t\tCPU1\ncpu_up\n\t\t\t\tcpu online\nunpark_threads()\n  wakeup(stopper[CPU1])\n....\nstop_machine()\n\t\t\t\tstopper thread runs\n\t\t\t\t  stopper(CPU1)->enabled = true;\n\nNow the stop machinery kicks CPU0 into the stop loop, where it gets\nstuck forever because the queue code saw stopper(CPU1)->enabled ==\nfalse, so CPU0 waits for CPU1 to enter stomp_machine, but the CPU1\nstopper work got discarded due to enabled == false.\n\nAdd a pre_unpark function to the smpboot thread descriptor and call it\nbefore waking the thread.\n\nThis fixes the problem at hand, but the stop_machine code should be\nmore robust. The stopper->enabled flag smells fishy at best.\n\nThanks to Konrad for going through a loop of debug patches and\nproviding the information to decode this issue.\n\nReported-and-tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>\nReported-and-tested-by: Sander Eikelenboom <linux@eikelenboom.it>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nLink: http://lkml.kernel.org/r/alpine.LFD.2.02.1302261843240.22263@ionos\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nChange-Id: Iaff8824879eb21552fc9e46e259b604dfce113bc","Thomas Gleixner",true],["a3ad7cc6a2669350cb03f31d73ae50d5ecaba4f4","45d857216ef082c1ddfd5d3991b4f3d23f51761f@arcor.de","cpufreq: cpu-boost: Use hotplug thread infrastructure\n\nBefore this patch, thread migration ran in uninterruptible threads.\nUse the relatively new hotplug thread infrastructure with parked\nthreads to reduce cpu load (x4).\n\nChange-Id: I4fa1f3a6d6b2b68ecb6e751678584f24abd85992","myfluxi",true],["bb704ff706469e97cd9552eec9ed5e6448939df5","45d857216ef082c1ddfd5d3991b4f3d23f51761f@arcor.de","cpufreq: ondemand: Use hotplug thread infrastructure\n\nThe dbs_sync threads caused considerable load, even when ondemand\nwasn't even active. Use the hotplug thread infrastructure to park\nthe threads.\n\nChange-Id: I8e2c780e3f00b73edc0337e01c226386146e0fd4","myfluxi",true],["2469058f26409be308e5d236a92ad088d6aedbf4","45d857216ef082c1ddfd5d3991b4f3d23f51761f@arcor.de","cpufreq: ondemand: Remove unused waitqueue\n\nChange-Id: Iee8bb3b319be81fd232e3acf392c9548fec71320","myfluxi",true],["4419d6ad9abe749f03b45d5221e50debe84d27d4","ce25c3cee4cc6c4c8acfc1680b3ed89cf644dba3@codeaurora.org","cpufreq: cpu-boost: Fix queue_delayed_work_on() race with hotplug\n\nCalling queue_delayed_work_on() on a CPU that's in the process of getting\nhotplugged out can result in that CPU infinitely looping in\nmsm_pm_wait_cpu_shutdown(). If queue_delayed_work_on() is called after the\nCPU is hotplugged out, it could wake up the CPU without going through the\nhotplug path and cause instability. To avoid this, make sure the CPU is and\nstays online while queuing a work on it.\n\nSigned-off-by: Saravana Kannan <skannan@codeaurora.org>\n\nConflicts:\n\tdrivers/cpufreq/cpu-boost.c\n\nChange-Id: I35bc30380f253bce39db22ad59af9258803e9735","Saravana Kannan",true]],"size":22,"ref":"refs/heads/grakernel","head":"2d0653190c4fa37c84613283ff81d78bcc3d1722"}