1*4882a593Smuzhiyun.. _stable_kernel_rules: 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunEverything you ever wanted to know about Linux -stable releases 4*4882a593Smuzhiyun=============================================================== 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunRules on what kind of patches are accepted, and which ones are not, into the 7*4882a593Smuzhiyun"-stable" tree: 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun - It must be obviously correct and tested. 10*4882a593Smuzhiyun - It cannot be bigger than 100 lines, with context. 11*4882a593Smuzhiyun - It must fix only one thing. 12*4882a593Smuzhiyun - It must fix a real bug that bothers people (not a, "This could be a 13*4882a593Smuzhiyun problem..." type thing). 14*4882a593Smuzhiyun - It must fix a problem that causes a build error (but not for things 15*4882a593Smuzhiyun marked CONFIG_BROKEN), an oops, a hang, data corruption, a real 16*4882a593Smuzhiyun security issue, or some "oh, that's not good" issue. In short, something 17*4882a593Smuzhiyun critical. 18*4882a593Smuzhiyun - Serious issues as reported by a user of a distribution kernel may also 19*4882a593Smuzhiyun be considered if they fix a notable performance or interactivity issue. 20*4882a593Smuzhiyun As these fixes are not as obvious and have a higher risk of a subtle 21*4882a593Smuzhiyun regression they should only be submitted by a distribution kernel 22*4882a593Smuzhiyun maintainer and include an addendum linking to a bugzilla entry if it 23*4882a593Smuzhiyun exists and additional information on the user-visible impact. 24*4882a593Smuzhiyun - New device IDs and quirks are also accepted. 25*4882a593Smuzhiyun - No "theoretical race condition" issues, unless an explanation of how the 26*4882a593Smuzhiyun race can be exploited is also provided. 27*4882a593Smuzhiyun - It cannot contain any "trivial" fixes in it (spelling changes, 28*4882a593Smuzhiyun whitespace cleanups, etc). 29*4882a593Smuzhiyun - It must follow the 30*4882a593Smuzhiyun :ref:`Documentation/process/submitting-patches.rst <submittingpatches>` 31*4882a593Smuzhiyun rules. 32*4882a593Smuzhiyun - It or an equivalent fix must already exist in Linus' tree (upstream). 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunProcedure for submitting patches to the -stable tree 36*4882a593Smuzhiyun---------------------------------------------------- 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun - Security patches should not be handled (solely) by the -stable review 39*4882a593Smuzhiyun process but should follow the procedures in 40*4882a593Smuzhiyun :ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`. 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunFor all other submissions, choose one of the following procedures 43*4882a593Smuzhiyun----------------------------------------------------------------- 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun.. _option_1: 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunOption 1 48*4882a593Smuzhiyun******** 49*4882a593Smuzhiyun 50*4882a593SmuzhiyunTo have the patch automatically included in the stable tree, add the tag 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun.. code-block:: none 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun Cc: stable@vger.kernel.org 55*4882a593Smuzhiyun 56*4882a593Smuzhiyunin the sign-off area. Once the patch is merged it will be applied to 57*4882a593Smuzhiyunthe stable tree without anything else needing to be done by the author 58*4882a593Smuzhiyunor subsystem maintainer. 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun.. _option_2: 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunOption 2 63*4882a593Smuzhiyun******** 64*4882a593Smuzhiyun 65*4882a593SmuzhiyunAfter the patch has been merged to Linus' tree, send an email to 66*4882a593Smuzhiyunstable@vger.kernel.org containing the subject of the patch, the commit ID, 67*4882a593Smuzhiyunwhy you think it should be applied, and what kernel version you wish it to 68*4882a593Smuzhiyunbe applied to. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun.. _option_3: 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunOption 3 73*4882a593Smuzhiyun******** 74*4882a593Smuzhiyun 75*4882a593SmuzhiyunSend the patch, after verifying that it follows the above rules, to 76*4882a593Smuzhiyunstable@vger.kernel.org. You must note the upstream commit ID in the 77*4882a593Smuzhiyunchangelog of your submission, as well as the kernel version you wish 78*4882a593Smuzhiyunit to be applied to. 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun:ref:`option_1` is **strongly** preferred, is the easiest and most common. 81*4882a593Smuzhiyun:ref:`option_2` and :ref:`option_3` are more useful if the patch isn't deemed 82*4882a593Smuzhiyunworthy at the time it is applied to a public git tree (for instance, because 83*4882a593Smuzhiyunit deserves more regression testing first). :ref:`option_3` is especially 84*4882a593Smuzhiyunuseful if the patch needs some special handling to apply to an older kernel 85*4882a593Smuzhiyun(e.g., if API's have changed in the meantime). 86*4882a593Smuzhiyun 87*4882a593SmuzhiyunNote that for :ref:`option_3`, if the patch deviates from the original 88*4882a593Smuzhiyunupstream patch (for example because it had to be backported) this must be very 89*4882a593Smuzhiyunclearly documented and justified in the patch description. 90*4882a593Smuzhiyun 91*4882a593SmuzhiyunThe upstream commit ID must be specified with a separate line above the commit 92*4882a593Smuzhiyuntext, like this: 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun.. code-block:: none 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun commit <sha1> upstream. 97*4882a593Smuzhiyun 98*4882a593SmuzhiyunAdditionally, some patches submitted via :ref:`option_1` may have additional 99*4882a593Smuzhiyunpatch prerequisites which can be cherry-picked. This can be specified in the 100*4882a593Smuzhiyunfollowing format in the sign-off area: 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun.. code-block:: none 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle 105*4882a593Smuzhiyun Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle 106*4882a593Smuzhiyun Cc: <stable@vger.kernel.org> # 3.3.x: fd21073: sched: Fix affinity logic 107*4882a593Smuzhiyun Cc: <stable@vger.kernel.org> # 3.3.x 108*4882a593Smuzhiyun Signed-off-by: Ingo Molnar <mingo@elte.hu> 109*4882a593Smuzhiyun 110*4882a593SmuzhiyunThe tag sequence has the meaning of: 111*4882a593Smuzhiyun 112*4882a593Smuzhiyun.. code-block:: none 113*4882a593Smuzhiyun 114*4882a593Smuzhiyun git cherry-pick a1f84a3 115*4882a593Smuzhiyun git cherry-pick 1b9508f 116*4882a593Smuzhiyun git cherry-pick fd21073 117*4882a593Smuzhiyun git cherry-pick <this commit> 118*4882a593Smuzhiyun 119*4882a593SmuzhiyunAlso, some patches may have kernel version prerequisites. This can be 120*4882a593Smuzhiyunspecified in the following format in the sign-off area: 121*4882a593Smuzhiyun 122*4882a593Smuzhiyun.. code-block:: none 123*4882a593Smuzhiyun 124*4882a593Smuzhiyun Cc: <stable@vger.kernel.org> # 3.3.x 125*4882a593Smuzhiyun 126*4882a593SmuzhiyunThe tag has the meaning of: 127*4882a593Smuzhiyun 128*4882a593Smuzhiyun.. code-block:: none 129*4882a593Smuzhiyun 130*4882a593Smuzhiyun git cherry-pick <this commit> 131*4882a593Smuzhiyun 132*4882a593SmuzhiyunFor each "-stable" tree starting with the specified version. 133*4882a593Smuzhiyun 134*4882a593SmuzhiyunFollowing the submission: 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun - The sender will receive an ACK when the patch has been accepted into the 137*4882a593Smuzhiyun queue, or a NAK if the patch is rejected. This response might take a few 138*4882a593Smuzhiyun days, according to the developer's schedules. 139*4882a593Smuzhiyun - If accepted, the patch will be added to the -stable queue, for review by 140*4882a593Smuzhiyun other developers and by the relevant subsystem maintainer. 141*4882a593Smuzhiyun 142*4882a593Smuzhiyun 143*4882a593SmuzhiyunReview cycle 144*4882a593Smuzhiyun------------ 145*4882a593Smuzhiyun 146*4882a593Smuzhiyun - When the -stable maintainers decide for a review cycle, the patches will be 147*4882a593Smuzhiyun sent to the review committee, and the maintainer of the affected area of 148*4882a593Smuzhiyun the patch (unless the submitter is the maintainer of the area) and CC: to 149*4882a593Smuzhiyun the linux-kernel mailing list. 150*4882a593Smuzhiyun - The review committee has 48 hours in which to ACK or NAK the patch. 151*4882a593Smuzhiyun - If the patch is rejected by a member of the committee, or linux-kernel 152*4882a593Smuzhiyun members object to the patch, bringing up issues that the maintainers and 153*4882a593Smuzhiyun members did not realize, the patch will be dropped from the queue. 154*4882a593Smuzhiyun - At the end of the review cycle, the ACKed patches will be added to the 155*4882a593Smuzhiyun latest -stable release, and a new -stable release will happen. 156*4882a593Smuzhiyun - Security patches will be accepted into the -stable tree directly from the 157*4882a593Smuzhiyun security kernel team, and not go through the normal review cycle. 158*4882a593Smuzhiyun Contact the kernel security team for more details on this procedure. 159*4882a593Smuzhiyun 160*4882a593SmuzhiyunTrees 161*4882a593Smuzhiyun----- 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun - The queues of patches, for both completed versions and in progress 164*4882a593Smuzhiyun versions can be found at: 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git 167*4882a593Smuzhiyun 168*4882a593Smuzhiyun - The finalized and tagged releases of all stable kernels can be found 169*4882a593Smuzhiyun in separate branches per version at: 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git 172*4882a593Smuzhiyun 173*4882a593Smuzhiyun - The release candidate of all stable kernel versions can be found at: 174*4882a593Smuzhiyun 175*4882a593Smuzhiyun https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/ 176*4882a593Smuzhiyun 177*4882a593Smuzhiyun .. warning:: 178*4882a593Smuzhiyun The -stable-rc tree is a snapshot in time of the stable-queue tree and 179*4882a593Smuzhiyun will change frequently, hence will be rebased often. It should only be 180*4882a593Smuzhiyun used for testing purposes (e.g. to be consumed by CI systems). 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun 183*4882a593SmuzhiyunReview committee 184*4882a593Smuzhiyun---------------- 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun - This is made up of a number of kernel developers who have volunteered for 187*4882a593Smuzhiyun this task, and a few that haven't. 188