UBSAN: Undefined behaviour in lib/percpu_counter.c:92:14

2018-07-06 Thread Meelis Roos
This is on a AMD Athlon64 X2 compiling kernel with make -2:

[91550.438790] 

[91550.438832] UBSAN: Undefined behaviour in lib/percpu_counter.c:92:14
[91550.438862] signed integer overflow:
[91550.43] 91550438785688 + 9223336756968817285 cannot be represented in 
type 'long long int'
[91550.438923] CPU: 0 PID: 8875 Comm: cc1 Not tainted 
4.18.0-rc3-00113-gfc36def997cf #11
[91550.438924] Hardware name: HP-Pavilion RT589AA-ABU t3709.uk/Nance, BIOS 5.02 
11/26/2006
[91550.438924] Call Trace:
[91550.438929]  
[91550.438937]  dump_stack+0x5a/0x9b
[91550.438941]  ubsan_epilogue+0x9/0x40
[91550.438944]  handle_overflow+0xf2/0x100
[91550.438946]  percpu_counter_add_batch+0xfb/0x120
[91550.438949]  cfq_completed_request+0x320/0xb00
[91550.438953]  __blk_put_request+0x15d/0x390
[91550.438957]  scsi_end_request+0x154/0x370
[91550.438960]  scsi_io_completion+0x603/0x9e0
[91550.438963]  blk_done_softirq+0xe6/0x1c0
[91550.438967]  __do_softirq+0x118/0x414
[91550.438970]  irq_exit+0xa2/0xd0
[91550.438972]  do_IRQ+0xac/0x160
[91550.438974]  common_interrupt+0xf/0xf
[91550.438976]  
[91550.438978] RIP: 0033:0x7f54e89631b7
[91550.438979] Code: 83 f9 02 48 0f 47 cf 83 c1 7c e9 a9 fa ff ff 4c 8b 41 08 
4c 89 c2 48 83 e2 f8 48 39 d3 0f 87 fb 00 00 00 48 8d 3c 11 48 8b 07 <48> 39 d0 
0f 85 35 01 00 00 48 8b 51 10 48 8b 71 18 48 39 4a 18 0f 
[91550.439006] RSP: 002b:7ffc7398a470 EFLAGS: 0287 ORIG_RAX: 
ffde
[91550.439007] RAX: 02a0 RBX: 0060 RCX: 03311380
[91550.439009] RDX: 02a0 RSI: 7f54e8c96f30 RDI: 03311620
[91550.439010] RBP: 0004 R08: 02a1 R09: 7f54e8c96cb0
[91550.439011] R10:  R11: 0001 R12: 
[91550.439012] R13: 7f54e8c96c40 R14: 02e3b010 R15: 7f54e8c96ca0
[91550.439013] 



-- 
Meelis Roos (mr...@linux.ee)


UBSAN: Undefined behaviour in lib/percpu_counter.c:92:14

2018-07-06 Thread Meelis Roos
This is on a AMD Athlon64 X2 compiling kernel with make -2:

[91550.438790] 

[91550.438832] UBSAN: Undefined behaviour in lib/percpu_counter.c:92:14
[91550.438862] signed integer overflow:
[91550.43] 91550438785688 + 9223336756968817285 cannot be represented in 
type 'long long int'
[91550.438923] CPU: 0 PID: 8875 Comm: cc1 Not tainted 
4.18.0-rc3-00113-gfc36def997cf #11
[91550.438924] Hardware name: HP-Pavilion RT589AA-ABU t3709.uk/Nance, BIOS 5.02 
11/26/2006
[91550.438924] Call Trace:
[91550.438929]  
[91550.438937]  dump_stack+0x5a/0x9b
[91550.438941]  ubsan_epilogue+0x9/0x40
[91550.438944]  handle_overflow+0xf2/0x100
[91550.438946]  percpu_counter_add_batch+0xfb/0x120
[91550.438949]  cfq_completed_request+0x320/0xb00
[91550.438953]  __blk_put_request+0x15d/0x390
[91550.438957]  scsi_end_request+0x154/0x370
[91550.438960]  scsi_io_completion+0x603/0x9e0
[91550.438963]  blk_done_softirq+0xe6/0x1c0
[91550.438967]  __do_softirq+0x118/0x414
[91550.438970]  irq_exit+0xa2/0xd0
[91550.438972]  do_IRQ+0xac/0x160
[91550.438974]  common_interrupt+0xf/0xf
[91550.438976]  
[91550.438978] RIP: 0033:0x7f54e89631b7
[91550.438979] Code: 83 f9 02 48 0f 47 cf 83 c1 7c e9 a9 fa ff ff 4c 8b 41 08 
4c 89 c2 48 83 e2 f8 48 39 d3 0f 87 fb 00 00 00 48 8d 3c 11 48 8b 07 <48> 39 d0 
0f 85 35 01 00 00 48 8b 51 10 48 8b 71 18 48 39 4a 18 0f 
[91550.439006] RSP: 002b:7ffc7398a470 EFLAGS: 0287 ORIG_RAX: 
ffde
[91550.439007] RAX: 02a0 RBX: 0060 RCX: 03311380
[91550.439009] RDX: 02a0 RSI: 7f54e8c96f30 RDI: 03311620
[91550.439010] RBP: 0004 R08: 02a1 R09: 7f54e8c96cb0
[91550.439011] R10:  R11: 0001 R12: 
[91550.439012] R13: 7f54e8c96c40 R14: 02e3b010 R15: 7f54e8c96ca0
[91550.439013] 



-- 
Meelis Roos (mr...@linux.ee)