lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 14 Apr 2019 23:37:28 +0000
From:   Brian Yip <itsbriany@...il.com>
To:     christian.koenig@....com
Cc:     ray.huang@....com, Jerry.Zhang@....com, airlied@...ux.ie,
        daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, Brian Yip <itsbriany@...il.com>
Subject: [PATCH 2/3] drm/ttm: Fix ttm_mem_glob.kobj state on cleanup

Cleanup ttm_mem_glob.kobj when its reference count hits 0
so that it can be re-initialized by future ttm_mem_global_init calls
without dumping a stack trace.

Signed-off-by: Brian Yip <itsbriany@...il.com>
---
 drivers/gpu/drm/ttm/ttm_memory.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
index 55ccb9800893..63d82a81912e 100644
--- a/drivers/gpu/drm/ttm/ttm_memory.c
+++ b/drivers/gpu/drm/ttm/ttm_memory.c
@@ -479,8 +479,10 @@ void ttm_mem_global_release(struct ttm_mem_global *glob)
 	kobject_del(&glob->kobj);
 	kobject_put(&glob->kobj);
 
-	if (!kref_read(&glob->kobj.kref))
+	if (!kref_read(&glob->kobj.kref)) {
+		glob->kobj.state_initialized = 0;
 		glob->num_zones = 0;
+	}
 }
 
 static void ttm_check_swapping(struct ttm_mem_global *glob)
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ