From 35f5db076217de9d1724a111fc9e71f601ec8e57 Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Wed, 5 Aug 2020 16:12:49 +0200 Subject: [PATCH] linux57-tkg: 5.7.13 --- linux57-tkg/PKGBUILD | 8 +- .../0012-misc-additions.patch | 86 ------------------- 2 files changed, 4 insertions(+), 90 deletions(-) diff --git a/linux57-tkg/PKGBUILD b/linux57-tkg/PKGBUILD index 8bd7831..8d53671 100644 --- a/linux57-tkg/PKGBUILD +++ b/linux57-tkg/PKGBUILD @@ -87,9 +87,9 @@ else fi pkgname=("${pkgbase}" "${pkgbase}-headers") _basekernel=5.7 -_sub=12 +_sub=13 pkgver="${_basekernel}"."${_sub}" -pkgrel=24 +pkgrel=25 pkgdesc='Linux-tkg' arch=('x86_64') # no i686 in here url="http://www.kernel.org/" @@ -127,7 +127,7 @@ source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.x 0012-misc-additions.patch ) sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0' - '1f688c6a931b23b826a199655c133bbf65ba4ae46e7b471bd7c8c0c6a396176a' + 'd32e7bb395a8658d3b286e3a3289384d1e076e43c984d15c4243483c8a18a339' '1f56a2466bd9b4477925682d8f944fabb38727140e246733214fe50aa326fc47' '6313ccad7f8e4d8ce09dd5bdb51b8dfa124d0034d7097ba47008380a14a84f09' '15ce09447b7e9b28425c1df5961c955378f2829e4115037337eef347b1db3d9d' @@ -151,7 +151,7 @@ sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0' 'b2a2ae866fc3f1093f67e69ba59738827e336b8f800fb0487599127f7f3ef881' '49262ce4a8089fa70275aad742fc914baa28d9c384f710c9a62f64796d13e104' '6821f92bd2bde3a3938d17b070d70f18a2f33cae81647567b5a4d94c9cd75f3d' - 'b9f724ada90bc7c87c77429278ddbe20cfcbd768bd3cb1e1c132a0f1eda3625f') + 'bdc60c83cd5fbf9912f9201d6e4fe3c84fe5f634e6823bd8e78264ad606b3a9e') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase diff --git a/linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch b/linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch index acad1a2..33f5502 100644 --- a/linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch +++ b/linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch @@ -53,89 +53,3 @@ index e9d39c48520a..3bceead8da40 100644 /* Note: the ioctl VT_GETSTATE does not work for consoles 16 and higher (since it returns a short) */ -diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -index 86ffa0c2880f..710edc70e37e 100644 ---- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -@@ -8717,20 +8717,38 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, - * the same resource. If we have a new DC context as part of - * the DM atomic state from validation we need to free it and - * retain the existing one instead. -+ * -+ * Furthermore, since the DM atomic state only contains the DC -+ * context and can safely be annulled, we can free the state -+ * and clear the associated private object now to free -+ * some memory and avoid a possible use-after-free later. - */ -- struct dm_atomic_state *new_dm_state, *old_dm_state; - -- new_dm_state = dm_atomic_get_new_state(state); -- old_dm_state = dm_atomic_get_old_state(state); -+ for (i = 0; i < state->num_private_objs; i++) { -+ struct drm_private_obj *obj = state->private_objs[i].ptr; - -- if (new_dm_state && old_dm_state) { -- if (new_dm_state->context) -- dc_release_state(new_dm_state->context); -+ if (obj->funcs == adev->dm.atomic_obj.funcs) { -+ int j = state->num_private_objs-1; - -- new_dm_state->context = old_dm_state->context; -+ dm_atomic_destroy_state(obj, -+ state->private_objs[i].state); -+ -+ /* If i is not at the end of the array then the -+ * last element needs to be moved to where i was -+ * before the array can safely be truncated. -+ */ -+ if (i != j) -+ state->private_objs[i] = -+ state->private_objs[j]; - -- if (old_dm_state->context) -- dc_retain_state(old_dm_state->context); -+ state->private_objs[j].ptr = NULL; -+ state->private_objs[j].state = NULL; -+ state->private_objs[j].old_state = NULL; -+ state->private_objs[j].new_state = NULL; -+ -+ state->num_private_objs = j; -+ break; -+ } - } - } - -diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c -index 02e6f8c4dde0..ebb8a28ff002 100644 ---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c -+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c -@@ -778,7 +778,8 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev, - tmp_str++; - while (isspace(*++tmp_str)); - -- while ((sub_str = strsep(&tmp_str, delimiter)) != NULL) { -+ while (tmp_str[0]) { -+ sub_str = strsep(&tmp_str, delimiter); - ret = kstrtol(sub_str, 0, ¶meter[parameter_size]); - if (ret) - return -EINVAL; -@@ -1038,7 +1039,8 @@ static ssize_t amdgpu_read_mask(const char *buf, size_t count, uint32_t *mask) - memcpy(buf_cpy, buf, bytes); - buf_cpy[bytes] = '\0'; - tmp = buf_cpy; -- while ((sub_str = strsep(&tmp, delimiter)) != NULL) { -+ while (tmp[0]) { -+ sub_str = strsep(&tmp, delimiter); - if (strlen(sub_str)) { - ret = kstrtol(sub_str, 0, &level); - if (ret) -@@ -1635,7 +1637,8 @@ static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev, - i++; - memcpy(buf_cpy, buf, count-i); - tmp_str = buf_cpy; -- while ((sub_str = strsep(&tmp_str, delimiter)) != NULL) { -+ while (tmp_str[0]) { -+ sub_str = strsep(&tmp_str, delimiter); - ret = kstrtol(sub_str, 0, ¶meter[parameter_size]); - if (ret) - return -EINVAL;