Nvmap_handle_get_cacheability fails with static_key_slow_dec

TX2i running R32.3.1

The failure occurs randomly during system boot., perhaps every 5th time.

Custom carrier, kernel, initrd and rootfs; combined with secure boot.
The problem is thus unique to my particular circumstances.

I was looking for pointers as to what this actually means and possible solutions.

Thanks

14.458484] jump label: negative count!
[   14.458509] ------------[ cut here ]------------
[   14.463177] WARNING: CPU: 1 PID: 2775 at kernel/jump_label.c:151 __static_key_slow_dec+0xa8/0xb0
[   14.471961] Modules linked in: xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack iptable_filter bluedroid_pm fbtft_device(C) fb_ssd1351(C) fbtft(C) ip_tables x_tables spidev nvgpu

[   14.472047] CPU: 1 PID: 2775 Comm: gst-plugin-scan Tainted: G         C      4.9.140 #1
[   14.472051] Hardware name: storm (DT)
[   14.472057] task: ffffffc1a39e8e00 task.stack: ffffffc1a7b68000
[   14.472062] PC is at __static_key_slow_dec+0xa8/0xb0
[   14.472067] LR is at __static_key_slow_dec+0xa8/0xb0
[   14.472071] pc : [<ffffff80081c0930>] lr : [<ffffff80081c0930>] pstate: 40400145
[   14.472074] sp : ffffffc1a7b6bb60
[   14.472079] x29: ffffffc1a7b6bb60 x28: 0000000000000000 
[   14.472088] x27: ffffffc1ab658a00 x26: 0000000000000000 
[   14.472096] x25: 0000000000000002 x24: ffffff800946b000 
[   14.472103] x23: ffffffc1ab658a94 x22: 0000000000000000 
[   14.472111] x21: 0000000000000000 x20: ffffff8009d7f000 
[   14.472118] x19: ffffff800a071160 x18: 0000007f92b58308 
[   14.472126] x17: 0000000000000000 x16: 0000000000000000 
[   14.472133] x15: 0000007f92b57f80 x14: 0250902502508c24 
[   14.472140] x13: 0000000000000000 x12: 0000000000000006 
[   14.472147] x11: 0000000000000002 x10: 0000000000000390 
[   14.472155] x9 : 0000000000000001 x8 : ffffffc1b673d66b 
[   14.472162] x7 : 0000000000000000 x6 : ffffffc1b6787bf0 
[   14.472169] x5 : ffffffc1b6787bf0 x4 : 0000000000000000 
[   14.472177] x3 : ffffffc1b678d7f8 x2 : ffffffc1b6787bf0 
[   14.472184] x1 : ffffffc1a39e8e00 x0 : 000000000000001b 

[   14.472195] ---[ end trace 6c8a4814545f2e41 ]---
[   14.476814] Call trace:
[   14.476836] [<ffffff80081c0930>] __static_key_slow_dec+0xa8/0xb0
[   14.476843] [<ffffff80081c096c>] static_key_slow_dec+0x34/0x78
[   14.476852] [<ffffff80085394f4>] nvmap_handle_get_cacheability+0x4c/0xc8
[   14.476861] [<ffffff8008529140>] __nvmap_do_cache_maint+0x160/0x880
[   14.476868] [<ffffff800853455c>] nvmap_ioctl_rw_handle+0x4c4/0x938
[   14.476873] [<ffffff800852e3dc>] nvmap_ioctl+0x43c/0x538
[   14.476881] [<ffffff8008273188>] do_vfs_ioctl+0xb0/0x8d8
[   14.476887] [<ffffff8008273a3c>] SyS_ioctl+0x8c/0xa8
[   14.476895] [<ffffff800808391c>] __sys_trace_return+0x0/0x4

https://www.kernel.org/doc/Documentation/static-keys.txt indicates this an optimization can be be disabled.

CONFIG_JUMP_LABEL=y

This applies to both my custom kernel and the sample provided by NVidia in tegra_defconfig

Hi,
It looks like there is invalid memory access. Please share the steps so that we can replicate the issue and do further investigation. Seems like you run a gst-launch-1.0 command and hits the error.

I believe you are correct.

I had fixated on the negative jump label and assumed the gst-plugin-scan was just noise.

Predefining the gst registry so plugin scan does not run appears to resolve the problem.

One of the major differences between this version and previous versions was the loss of ability to force on the adu_mclk via the sysfs.
This version starts a gstreamer pipeline very early to turn on aud_mclk, which would be the trigger for plugin scan.

The occurrence of the kernel error is greatly reduced but not to zero.
Still gathering additional data.