tpci from kernel_misc in ubuntu_ltp failed on B with NULL pointer dereference

Bug #1868707 reported by Po-Hsu Lin on 2020-03-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Undecided
Unassigned
linux (Ubuntu)
Undecided
Unassigned

Bug Description

Issue found on Bionic 4.15.0-92 but it can be reproduce with Bionic 4.15.0-91, so it looks like a test case issue to me.

Test output with 4.15.0-91 during the last SRU cycle:
 startup='Tue Mar 3 20:06:07 2020'
 test_pci 1 TCONF : tst_module.c:70: Failed to find module 'ltp_tpci.ko'
 test_pci 2 TCONF : tst_module.c:70: Remaining cases not appropriate for configuration
 tag=tpci stime=1583265967 dur=0 exit=exited stat=32 core=no cu=0 cs=0

And it looks like the test case has been updated with:
https://github.com/linux-test-project/ltp/commit/3dd286bdbee3345de57d9d87fcbed92c5f612515

And the test output now becomes:
 startup='Wed Mar 18 02:17:52 2020'
 tag=tpci stime=1584497872 dur=0 exit=signaled stat=9 core=no cu=0 cs=2

If you run this test manually:
$ sudo ./tpci
Killed
$ uname -a
Linux larry 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

And kernel trace can be found in dmesg:
 BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
 IP: sys_bus_slot+0x62/0x110 [ltp_tpci]
 PGD 0 P4D 0
 Oops: 0000 [#1] SMP PTI
 Modules linked in: ltp_tpci(OE) kvm_intel kvm irqbypass input_leds joydev serio_raw qemu_fw_cfg mac_hid sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear cirrus ttm drm_kms_helper syscopyarea sysfillrect sysimgblt psmouse fb_sys_fops virtio_blk floppy drm i2c_piix4 virtio_net pata_acpi
 CPU: 1 PID: 1286 Comm: tpci Tainted: G OE 4.15.0-91-generic #92-Ubuntu
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
 RIP: 0010:sys_bus_slot+0x62/0x110 [ltp_tpci]
 RSP: 0018:ffffa05b80ce3e08 EFLAGS: 00010246
 RAX: 0000000000000000 RBX: ffff92487a709a30 RCX: 0000000000000000
 RDX: ffffa05b80ce3dd0 RSI: ffffffffc0732044 RDI: 0000000000000000
 RBP: ffffa05b80ce3e38 R08: 00000000000000ff R09: ffff92487a709a30
 R10: 0000000000000008 R11: f000000000000000 R12: 0000000000000000
 R13: 0000000000000001 R14: 0000000000000000 R15: fffffffffffffff2
 FS: 00007fc90e732580(0000) GS:ffff92487fd00000(0000) knlGS:0000000000000000
 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000000000000010 CR3: 0000000076b7c000 CR4: 00000000000006e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 Call Trace:
  dev_attr_store+0x1b/0x30
  sysfs_kf_write+0x3c/0x50
  kernfs_fop_write+0x125/0x1a0
  __vfs_write+0x1b/0x40
  vfs_write+0xb1/0x1a0
  SyS_write+0x5c/0xe0
  do_syscall_64+0x73/0x130
  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
 RIP: 0033:0x7fc90e234154
 RSP: 002b:00007ffe847233f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc90e234154
 RDX: 0000000000000001 RSI: 00007ffe84723422 RDI: 0000000000000003
 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
 R13: 00007ffe8472341c R14: 00007ffe84723422 R15: 00007fc90e732500
 Code: 27 e1 8b 4d d4 48 8b 3d ad 27 00 00 0f b6 c5 48 85 ff 44 0f b6 e1 41 89 c6 74 10 e8 99 56 dd e0 48 c7 05 8e 27 00 00 00 00 00 00 <48> 8b 04 25 10 00 00 00 44 89 e2 44 89 f6 48 8b 80 d0 00 00 00
 RIP: sys_bus_slot+0x62/0x110 [ltp_tpci] RSP: ffffa05b80ce3e08
 CR2: 0000000000000010
 ---[ end trace b359970625da17ad ]---

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-91-generic 4.15.0-91.92
ProcVersionSignature: User Name 4.15.0-91.92-generic 4.15.18
Uname: Linux 4.15.0-91-generic x86_64
NonfreeKernelModules: ltp_tpci
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Mar 24 11:02 seq
 crw-rw---- 1 root audio 116, 33 Mar 24 11:02 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.12
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
Date: Tue Mar 24 11:04:01 2020
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
PciMultimedia:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB: 0 cirrusdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-91-generic root=UUID=29438a95-0e7a-484b-a1fb-527f0e3d2e06 ro console=tty1 console=ttyS0
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-91-generic N/A
 linux-backports-modules-4.15.0-91-generic N/A
 linux-firmware 1.173.16
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.10.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-bionic
dmi.modalias: dmi:bvnSeaBIOS:bvr1.10.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-bionic:cvnQEMU:ct1:cvrpc-i440fx-bionic:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-bionic
dmi.sys.vendor: QEMU

Po-Hsu Lin (cypressyew) wrote :
tags: added: 4.15
tags: added: ubuntu-ltp
tags: added: sru-20200316
summary: - tpci from kernel_misc in ubuntu_ltp failed on B
+ tpci from kernel_misc in ubuntu_ltp failed on B with NULL pointer
+ dereference

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Po-Hsu Lin (cypressyew) wrote :

With patch landed upstream, it's not failing with this issue anymore.
https://github.com/linux-test-project/ltp/commit/733e64419de0e60197e9393126fcbbf7b74dc72a

Changed in ubuntu-kernel-tests:
status: New → Fix Released
Changed in linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers