Revert "use clamp_t in UNAME26 fix"

This reverts commit 9ffe27c55e.

Preperatory to re-application with the correct upstream SHA1.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
This commit is contained in:
Tim Gardner
2014-06-26 12:51:16 -06:00
parent 3a7831bc4e
commit 1c5194459b

View File

@@ -1200,7 +1200,7 @@ static int override_release(char __user *release, size_t len)
rest++; rest++;
} }
v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40; v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40;
copy = clamp_t(size_t, len, 1, sizeof(buf)); copy = min(sizeof(buf), max_t(size_t, 1, len));
copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
ret = copy_to_user(release, buf, copy + 1); ret = copy_to_user(release, buf, copy + 1);
} }