2022-09-22 07:47:18

by Pengfei Xu

[permalink] [raw]
Subject: [BUG report] There was BUG when executed gpio kselftest

Hi gpio and LKML developers,

Greeting!

Platform: TGL-U platform
Kernel: 6.0-rc6 mainline

When executed gpio kselftest:
tools/testing/selftests/gpio/gpio-mockup.sh

# ./gpio/gpio-mockup.sh
test failed: can't remove existing gpio-mockup module
GPIO gpio-mockup test FAIL
# lsmod | grep gpio
gpio_mockup 16384 -1

At the step "modprobe -r -q gpio_mockup", there was BUG info in dmesg:

[ 43.928611] gpiochip_find_base: found new base at 632
...
[ 44.021733] gpio gpiochip1: registered chardev handle for 1 lines
[ 44.036775] BUG: kernel NULL pointer dereference, address: 00000000000000a0
[ 44.036816] #PF: supervisor write access in kernel mode
[ 44.036833] #PF: error_code(0x0002) - not-present page
...
[ 44.037213] Call Trace:
[ 44.037223] <TASK>
[ 44.037235] simple_recursive_removal+0x9d/0x2a0
[ 44.037255] ? debugfs_lookup_and_remove+0x40/0x40
[ 44.037276] ? preempt_count_add+0x7c/0xc0

Dmesg is in attached.

Thanks!


Attachments:
(No filename) (997.00 B)
20220922_tglu_unload_gpio_mockup_bug.txt (132.75 kB)
Download all attachments