All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 110225] Kernel panic while “  modprobe amdkfd ;  modprobe -r amdkfd "  ; 4.14.35 kernel .
Date: Mon, 25 Mar 2019 18:38:36 +0000	[thread overview]
Message-ID: <bug-110225-502-gawTeVaMMU@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-110225-502@http.bugs.freedesktop.org/>


[-- Attachment #1.1: Type: text/plain, Size: 1917 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=110225

--- Comment #1 from John.p.donnelly@oracle.com ---

This was been fixed in 4.20.x  upstream:


commit c393e9b2d51540b74e18e555df14706098dbf2cc
Author: Randy Dunlap <rdunlap@infradead.org>
Date:   Mon Nov 13 18:08:48 2017 +0200

   drm/amdkfd: fix amdkfd use-after-free GP fault

   Fix GP fault caused by dev_info() reference to a struct device*
   after the device has been freed (use after free).
   kfd_chardev_exit() frees the device so 'kfd_device' should not
   be used after calling kfd_chardev_exit().

   Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
   Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
index 6c5a9ca..f744cae 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
@@ -24,6 +24,7 @@
#include <linux/sched.h>
#include <linux/moduleparam.h>
#include <linux/device.h>
+#include <linux/printk.h>
#include "kfd_priv.h"

#define KFD_DRIVER_AUTHOR      "AMD Inc. and others"
@@ -132,7 +133,7 @@ static void __exit kfd_module_exit(void)
       kfd_process_destroy_wq();
       kfd_topology_shutdown();
       kfd_chardev_exit();
-       dev_info(kfd_device, "Removed module\n");
+       pr_info("amdkfd: Removed module\n");
}




[root@jpd-vmbase02 ~]# modprobe  amdkfd
[  132.453287] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[  132.454004] AMD IOMMUv2 functionality not available on this system
[  132.507733] CRAT table not found
[  132.508139] Finished initializing topology ret=0
[  132.508802] kfd kfd: Initialized module
[root@jpd-vmbase02 ~]# modprobe  -r amdkfd
[  137.447829] amdkfd: Removed module
[root@jpd-vmbase02 ~]#
[root@jpd-vmbase02 ~]#

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3100 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-03-25 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 17:06 [Bug 110225] Kernel panic while “ modprobe amdkfd ; modprobe -r amdkfd " ; 4.14.35 kernel bugzilla-daemon
2019-03-25 18:38 ` bugzilla-daemon [this message]
2019-03-25 18:41 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-110225-502-gawTeVaMMU@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.