2018-01-15 12:54:01

by Paul Menzel

[permalink] [raw]
Subject: UBSAN: Undefined behaviour in drivers/nvme/host/pci.c:456:17: division by zero

Dear Linux folks,


There is a regression from Linux 4.15-rc7 to 4.15-rc8+ causing undefined
behavior sanitizer showing the error below. At least, I haven’t seen
this error before.

```
UBSAN: Undefined behaviour in drivers/nvme/host/pci.c:456:17
division by zero
CPU: 0 PID: 53 Comm: kworker/u8:1 Not tainted 4.15.0-rc8+ #17
Hardware name: Notebook N24_25BU/N24_25BU, BIOS
5.12 07/07/2017
Workqueue: nvme-wq nvme_reset_work
Call Trace:
dump_stack+0x70/0xae
ubsan_epilogue+0x9/0x40
__ubsan_handle_divrem_overflow+0x99/0xe0
? nvme_queue_rq+0xd1a/0x14f0
nvme_queue_rq+0xd1a/0x14f0
? ftrace_graph_caller+0x68/0x98
? trace_graph_entry+0xdc/0x2b0
? blk_mq_make_request+0xa70/0xa70
? blk_mq_sched_dispatch_requests+0x1f3/0x2e0
blk_mq_dispatch_rq_list+0xb5/0xd50
blk_mq_sched_dispatch_requests+0x1f3/0x2e0
__blk_mq_delay_run_hw_queue+0x8f/0xd0
blk_mq_run_hw_queue+0x2f/0xd0
blk_mq_sched_insert_request+0x167/0x320
blk_execute_rq+0x63/0xe0
__nvme_submit_sync_cmd+0xa6/0x130
nvme_set_features+0x67/0xd0
nvme_set_queue_count+0x53/0x100
nvme_reset_work+0x842/0x1ab0
? ftrace_graph_caller+0x68/0x98
? worker_thread+0x64/0x670
? prepare_ftrace_return+0xaa/0x170
process_one_work+0x277/0x800
worker_thread+0x64/0x670
? process_one_work+0x800/0x800
kthread+0x173/0x230
? kthread+0x5/0x230
? kthread_create_worker_on_cpu+0x70/0x70
ret_from_fork+0x32/0x40```


Kind regards,

Paul


Attachments:
=?utf-8?Q?20180115=E2=80=93linux=5F4=2E15-rc8+=E2=80=93messages=E2=80=93nvme=E2=80=93ubsan=2Etxt?= (226.87 kB)
smime.p7s (5.05 kB)
S/MIME Cryptographic Signature
Download all attachments