Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Benes <mbenes@suse.cz>2017-12-05 16:42:04 +0100
committerMiroslav Benes <mbenes@suse.cz>2017-12-05 16:42:04 +0100
commit5988feb7832d8c820988628ba943044ad389a917 (patch)
tree24c467934bfc95ed5a1dc7b101718c7a09da0811
parent11e32205fda3d642aa655bc47583aa72b15b9946 (diff)
uname_patch: fix UNAME26 for 4.0
Backport upstream commit 39afb5ee4640 ("kernel/sys.c: fix UNAME26 for 4.0"). Signed-off-by: Miroslav Benes <mbenes@suse.cz>
-rw-r--r--uname_patch/kgr_patch_uname.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/uname_patch/kgr_patch_uname.c b/uname_patch/kgr_patch_uname.c
index 443b13d..3a53f83 100644
--- a/uname_patch/kgr_patch_uname.c
+++ b/uname_patch/kgr_patch_uname.c
@@ -45,6 +45,7 @@
/*
* Work around broken programs that cannot handle "Linux 3.0".
* Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40
+ * And we map 4.x to 2.6.60+x, so 4.0 would be 2.6.60.
*/
static int override_release(char __user *release, size_t len)
{
@@ -64,7 +65,7 @@ static int override_release(char __user *release, size_t len)
break;
rest++;
}
- v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40;
+ v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60;
copy = clamp_t(size_t, len, 1, sizeof(buf));
copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
ret = copy_to_user(release, buf, copy + 1);