How to Write and Submit a Linux Kernel Patch

Greg Kroah-Hartman has a very good tutorial about writing and submitting a patch to the Linux kernel. The video is over 1 year old but this is still relevant.

The materials for this tutorial are available via git:

git clone git://

Alternatively, you can also download a copy of the presentation slides.

The actual presentation is divided into 6 parts:

  • git basics (git branch, git clone…)
  • Kernel coding style (Details can be found in Documentation/CodingStyle)
  • Fixing a file (with scripts/ scripts)
  • Generating a patch (with git -diff)
  • Email the patch (with scripts/ and git send-email)
  • Q&A

If you want to skip the git basics and kernel coding style parts (although I don’t recommend it), fast forward to 13:33.

All patches by in the linux kernel are checked by at least 2 persons. Before submitting a patch, you’ll have to make sure of the following (Checklist):

  • Kernel builds with patch applied
  • Correct “From:” address
  • Concise “Subject:”
  • Explain the patch
  • Signed-of- by
Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
Khadas VIM4 SBC