spujar 737cefc6e0 tegra-alt: adsp: release socket in device remove
Following error is seen during multiple unload/load of driver,
 Error creating socket
 tegra210-adsp: probe of tegra210-adsp failed with error -1
This is resulting in kernel panic and device reboot.

Following is the crash,
===============================================================================
Unable to handle kernel NULL pointer dereference at virtual address 00000010
Mem abort info:
 ESR = 0x96000005
 Exception class = DABT (current EL), IL = 32 bits
 SET = 0, FnV = 0
 EA = 0, S1PTW = 0
Data abort info:
 ISV = 0, ISS = 0x00000005
 CM = 0, WnR = 0
user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc3e5a09000
[0000000000000010] *pgd=0000000000000000, *pud=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
PC is at soc_probe_component+0x90/0x350
LR is at soc_probe_component+0x34/0x350
pc : [<ffffff8008d59fb0>] lr : [<ffffff8008d59f54>] pstate: 40400045
sp : ffffffc38bbab8c0
x29: ffffffc38bbab8c0 x28: 0000000000000000
x27: 0000000000000000 x26: ffffff80018f19b8
x25: ffffffc3e5acf800 x24: ffffffc3e8b44e00
x23: 00000000000000f8 x22: 0000000000000001
x21: ffffff80018f19b8 x20: ffffff800a067000
x19: ffffffc35b93aa50 x18: 000000003e48590c
x17: 00000022d6c5fcd0 x16: ffffff8008153de0
x15: 0000000300000000 x14: 0000000000000000
x13: 0000000000000003 x12: 0000000000000026
x11: 0000000000000005 x10: 0101010101010101
x9 : 0000000000000000 x8 : 7f7f7f7f7f7f7f7f
x7 : 2f30316071666473 x6 : 070b035f125d521d
x5 : 1d525d125f030b07 x4 : 0000000000000000
x3 : 6dcc85ae6dec65a0 x2 : 000000000000008c
x1 : ffffff80094aa810 x0 : 0000000000000000
Process insmod (pid: 5755, stack limit = 0xffffffc38bba8028)
Call trace:
[<ffffff8008d59fb0>] soc_probe_component+0x90/0x350
[<ffffff8008d5afc8>] snd_soc_instantiate_card+0x4d8/0xb58
[<ffffff8008d5b7a4>] snd_soc_register_card+0x15c/0x200
[<ffffff80018ed630>] tegra_machine_driver_probe+0x3d0/0x5a0
[<ffffff80087c3da0>] platform_drv_probe+0x60/0xc8
[<ffffff80087c1278>] driver_probe_device+0xd0/0x410
[<ffffff80087c16dc>] __driver_attach+0x124/0x128
[<ffffff80087beba8>] bus_for_each_dev+0x88/0xe8
[<ffffff80087c0a68>] driver_attach+0x30/0x40
[<ffffff80087c0438>] bus_add_driver+0x1f8/0x2b0
[<ffffff80087c2648>] driver_register+0x68/0x100
[<ffffff80087c3ce4>] __platform_driver_register+0x5c/0x68
[<ffffff8001276018>] tegra_asoc_machine_driver_init+0x18/0x30
[<ffffff80080832ac>] do_one_initcall+0x5c/0x170
[<ffffff80081ba740>] do_init_module+0x68/0x1b8
[<ffffff80081538dc>] load_module+0x1004/0x1320
[<ffffff8008153ef0>] SyS_finit_module+0x110/0x128
[<ffffff8008083040>] el0_svc_naked+0x34/0x38
---[ end trace 39fa2dd2a3c341ef ]---
===============================================================================

Fix info,
This patch releases the socket in device removal and adsp probe succeeds
Thus avoid above crash during sound card registration.

Bug 200453666

Change-Id: Idb113b9aca71f830cd33cd8f9c3d742ad86280bb
Signed-off-by: spujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1847927
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
2022-09-10 23:43:40 -07:00
2022-09-07 12:27:01 -07:00
Description
No description provided
34 MiB