no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | find_first_kernel_version_containing_a_certain_patch [05.04.2016 12:20] (current) – created Pascal Suter | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== find first kernel version containing a certain patch ====== | ||
+ | sometimes you have a problem with linux and you find out that eventually this problem was fixed by a patch to some file of the linux kernel. however, it can be tricky to figrue out which kernel version is the first to feature this bug fix so you know what you need to aim for when looking for updates or when compiling your own kernel (in that case you might patch the source yourself, but then again you could run into dependency issues if your kurrent kernel is way older than what the patch was made for). | ||
+ | |||
+ | so here is, how you can find the kernel version starting with some info that is likely to be found in the commit logs for that patch.. | ||
+ | |||
+ | as an example lets take [[http:// | ||
+ | |||
+ | ===== Step 1: clone the kernel source repo ===== | ||
+ | since this is an old issue (as most issues will be that you run into when using any distribution packaged kernel), so we can clone the stable kernel git repo from kernel.org: | ||
+ | git clone git:// | ||
+ | this will create a directory called linux-stable, | ||
+ | now change to that directory for the following steps: | ||
+ | ===== Step 2: find the commit id ===== | ||
+ | together with the latest kernel you also downloaded the entire git history in the above step. so we can now search through the logs to find the commit id for the patch we are looking for. lets search for GFP_NOFS at first: | ||
+ | git log --all --grep=' | ||
+ | now less is displayed containing all commits that had GFP_NOFS mentioned in their descriptions. using the ''/'' | ||
+ | ===== Step 3: finding the first kernel version containing the commit ===== | ||
+ | git describe --contains 09b93088d75009807b72293f26e2634430ce5ba9 | ||
+ | shows us that it is kernel version: | ||
+ | v3.16-rc1~59^2^9~3 | ||