Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux
Sagar Kamble 278f87e0ce gpu: nvgpu: unregister reboot notifier for pci driver
Below oops is encountered as reboot notifier was not unregistered on
nvgpu unload. On registering new reboot notifier on reload of the
nvgpu module, kernel is not able to access prior freed notifier
buffer. Reboot notifier unregistration was not present in
nvgpu_pci_remove. Add it.

 Unable to handle kernel paging request at virtual address
 Internal error: Oops: 96000004 [#1] PREEMPT SMP^M
 CPU: 0 PID: 997 Comm: modprobe Tainted: G   W   5.10.152-tegra #2^M
 pstate: a2400009 (NzCv daif +PAN -UAO +TCO BTYPE=--)^M
 pc : blocking_notifier_chain_register+0x50/0xf0^M
 lr : blocking_notifier_chain_register+0x3c/0xf0^M
  blocking_notifier_chain_register+0x50/0xf0^M
  register_reboot_notifier+0x2c/0x40^M
  nvgpu_pci_shutdown+0xaac/0x1b00 [nvgpu]^M
  pci_device_probe+0xf8/0x1f0^M
  really_probe+0x104/0x510^M
  driver_probe_device+0x108/0x190^M
  device_driver_attach+0x80/0x90^M
  __driver_attach+0xfc/0x1e0^M
  bus_for_each_dev+0x84/0x100^M
  driver_attach+0x34/0x50^M
  bus_add_driver+0x15c/0x260^M
  driver_register+0x68/0x130^M
  __pci_register_driver+0x78/0x90^M
  nvgpu_pci_init+0x3c/0x74 [nvgpu]^M
  init_module+0x18/0xe9c [nvgpu]^M
  do_one_initcall+0x50/0x310^M
  do_init_module+0x50/0x200^M
  load_module+0x22dc/0x2800^M

Bug 3495440

Change-Id: I4367352c57d4858ee0b8dda7d1181c9d01632791
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2907442
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-22 02:03:41 -07:00
..
2020-12-15 14:13:28 -06:00
2019-02-01 09:45:57 -08:00
2023-03-14 04:50:18 -07:00
2021-08-11 01:55:08 -07:00
2023-05-12 20:58:19 -07:00
2022-06-06 05:55:26 -07:00
2023-01-20 03:35:49 -08:00
2023-04-10 20:45:50 -07:00
2022-09-27 23:25:55 -07:00
2023-04-21 11:32:05 -07:00