0001 .. _stable_kernel_rules:
0002
0003 Everything you ever wanted to know about Linux -stable releases
0004 ===============================================================
0005
0006 Rules on what kind of patches are accepted, and which ones are not, into the
0007 "-stable" tree:
0008
0009 - It must be obviously correct and tested.
0010 - It cannot be bigger than 100 lines, with context.
0011 - It must fix only one thing.
0012 - It must fix a real bug that bothers people (not a, "This could be a
0013 problem..." type thing).
0014 - It must fix a problem that causes a build error (but not for things
0015 marked CONFIG_BROKEN), an oops, a hang, data corruption, a real
0016 security issue, or some "oh, that's not good" issue. In short, something
0017 critical.
0018 - Serious issues as reported by a user of a distribution kernel may also
0019 be considered if they fix a notable performance or interactivity issue.
0020 As these fixes are not as obvious and have a higher risk of a subtle
0021 regression they should only be submitted by a distribution kernel
0022 maintainer and include an addendum linking to a bugzilla entry if it
0023 exists and additional information on the user-visible impact.
0024 - New device IDs and quirks are also accepted.
0025 - No "theoretical race condition" issues, unless an explanation of how the
0026 race can be exploited is also provided.
0027 - It cannot contain any "trivial" fixes in it (spelling changes,
0028 whitespace cleanups, etc).
0029 - It must follow the
0030 :ref:`Documentation/process/submitting-patches.rst <submittingpatches>`
0031 rules.
0032 - It or an equivalent fix must already exist in Linus' tree (upstream).
0033
0034
0035 Procedure for submitting patches to the -stable tree
0036 ----------------------------------------------------
0037
0038 .. note::
0039
0040 Security patches should not be handled (solely) by the -stable review
0041 process but should follow the procedures in
0042 :ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`.
0043
0044 For all other submissions, choose one of the following procedures
0045 -----------------------------------------------------------------
0046
0047 .. _option_1:
0048
0049 Option 1
0050 ********
0051
0052 To have the patch automatically included in the stable tree, add the tag
0053
0054 .. code-block:: none
0055
0056 Cc: stable@vger.kernel.org
0057
0058 in the sign-off area. Once the patch is merged it will be applied to
0059 the stable tree without anything else needing to be done by the author
0060 or subsystem maintainer.
0061
0062 .. _option_2:
0063
0064 Option 2
0065 ********
0066
0067 After the patch has been merged to Linus' tree, send an email to
0068 stable@vger.kernel.org containing the subject of the patch, the commit ID,
0069 why you think it should be applied, and what kernel version you wish it to
0070 be applied to.
0071
0072 .. _option_3:
0073
0074 Option 3
0075 ********
0076
0077 Send the patch, after verifying that it follows the above rules, to
0078 stable@vger.kernel.org. You must note the upstream commit ID in the
0079 changelog of your submission, as well as the kernel version you wish
0080 it to be applied to.
0081
0082 :ref:`option_1` is **strongly** preferred, is the easiest and most common.
0083 :ref:`option_2` and :ref:`option_3` are more useful if the patch isn't deemed
0084 worthy at the time it is applied to a public git tree (for instance, because
0085 it deserves more regression testing first). :ref:`option_3` is especially
0086 useful if the original upstream patch needs to be backported (for example
0087 the backport needs some special handling due to e.g. API changes).
0088
0089 Note that for :ref:`option_3`, if the patch deviates from the original
0090 upstream patch (for example because it had to be backported) this must be very
0091 clearly documented and justified in the patch description.
0092
0093 The upstream commit ID must be specified with a separate line above the commit
0094 text, like this:
0095
0096 .. code-block:: none
0097
0098 commit <sha1> upstream.
0099
0100 Additionally, some patches submitted via :ref:`option_1` may have additional
0101 patch prerequisites which can be cherry-picked. This can be specified in the
0102 following format in the sign-off area:
0103
0104 .. code-block:: none
0105
0106 Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle
0107 Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle
0108 Cc: <stable@vger.kernel.org> # 3.3.x: fd21073: sched: Fix affinity logic
0109 Cc: <stable@vger.kernel.org> # 3.3.x
0110 Signed-off-by: Ingo Molnar <mingo@elte.hu>
0111
0112 The tag sequence has the meaning of:
0113
0114 .. code-block:: none
0115
0116 git cherry-pick a1f84a3
0117 git cherry-pick 1b9508f
0118 git cherry-pick fd21073
0119 git cherry-pick <this commit>
0120
0121 Also, some patches may have kernel version prerequisites. This can be
0122 specified in the following format in the sign-off area:
0123
0124 .. code-block:: none
0125
0126 Cc: <stable@vger.kernel.org> # 3.3.x
0127
0128 The tag has the meaning of:
0129
0130 .. code-block:: none
0131
0132 git cherry-pick <this commit>
0133
0134 For each "-stable" tree starting with the specified version.
0135
0136 Following the submission:
0137
0138 - The sender will receive an ACK when the patch has been accepted into the
0139 queue, or a NAK if the patch is rejected. This response might take a few
0140 days, according to the developer's schedules.
0141 - If accepted, the patch will be added to the -stable queue, for review by
0142 other developers and by the relevant subsystem maintainer.
0143
0144
0145 Review cycle
0146 ------------
0147
0148 - When the -stable maintainers decide for a review cycle, the patches will be
0149 sent to the review committee, and the maintainer of the affected area of
0150 the patch (unless the submitter is the maintainer of the area) and CC: to
0151 the linux-kernel mailing list.
0152 - The review committee has 48 hours in which to ACK or NAK the patch.
0153 - If the patch is rejected by a member of the committee, or linux-kernel
0154 members object to the patch, bringing up issues that the maintainers and
0155 members did not realize, the patch will be dropped from the queue.
0156 - The ACKed patches will be posted again as part of release candidate (-rc)
0157 to be tested by developers and testers.
0158 - Usually only one -rc release is made, however if there are any outstanding
0159 issues, some patches may be modified or dropped or additional patches may
0160 be queued. Additional -rc releases are then released and tested until no
0161 issues are found.
0162 - Responding to the -rc releases can be done on the mailing list by sending
0163 a "Tested-by:" email with any testing information desired. The "Tested-by:"
0164 tags will be collected and added to the release commit.
0165 - At the end of the review cycle, the new -stable release will be released
0166 containing all the queued and tested patches.
0167 - Security patches will be accepted into the -stable tree directly from the
0168 security kernel team, and not go through the normal review cycle.
0169 Contact the kernel security team for more details on this procedure.
0170
0171 Trees
0172 -----
0173
0174 - The queues of patches, for both completed versions and in progress
0175 versions can be found at:
0176
0177 https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
0178
0179 - The finalized and tagged releases of all stable kernels can be found
0180 in separate branches per version at:
0181
0182 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
0183
0184 - The release candidate of all stable kernel versions can be found at:
0185
0186 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/
0187
0188 .. warning::
0189 The -stable-rc tree is a snapshot in time of the stable-queue tree and
0190 will change frequently, hence will be rebased often. It should only be
0191 used for testing purposes (e.g. to be consumed by CI systems).
0192
0193
0194 Review committee
0195 ----------------
0196
0197 - This is made up of a number of kernel developers who have volunteered for
0198 this task, and a few that haven't.