Bug 112161 - UBSAN: Undefined behaviour in fs/ext4/mballoc.c:1274:11
Summary: UBSAN: Undefined behaviour in fs/ext4/mballoc.c:1274:11
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-08 15:10 UTC by onorua
Modified: 2016-05-06 01:19 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.5.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
journal-b1 output (116.57 KB, application/octet-stream)
2016-02-08 15:10 UTC, onorua
Details

Description onorua 2016-02-08 15:10:51 UTC
Created attachment 203141 [details]
journal-b1 output

After the upgrade to new kernel I've got following stack trace:
Feb 08 22:58:57 x kernel: ================================================================================
Feb 08 22:58:57 x kernel: UBSAN: Undefined behaviour in fs/ext4/mballoc.c:1274:11
Feb 08 22:58:57 x kernel: shift exponent -1 is negative
Feb 08 22:58:57 x kernel: CPU: 2 PID: 1550 Comm: alsactl Tainted: G           O    4.5.0-rc3 #98
Feb 08 22:58:57 x kernel: Hardware name: LENOVO 20BSCTO1WW/20BSCTO1WW, BIOS N14ET32W (1.10 ) 08/13/2015
Feb 08 22:58:57 x kernel:  0000000000000000 000000004a465bb8 ffff8802211a7908 ffffffff81832ca4
Feb 08 22:58:57 x kernel:  ffffffffffffffff 000000004a465bb8 ffff8802211a7930 0000000000000001
Feb 08 22:58:57 x kernel:  ffff8802211a7920 ffffffff818a6360 ffffffff82dbd13e ffff8802211a79c0
Feb 08 22:58:57 x kernel: Call Trace:
Feb 08 22:58:57 x kernel:  [<ffffffff81832ca4>] dump_stack+0xaf/0x10c
Feb 08 22:58:57 x kernel:  [<ffffffff818a6360>] ubsan_epilogue+0x14/0x56
Feb 08 22:58:57 x kernel:  [<ffffffff818a6e04>] __ubsan_handle_shift_out_of_bounds+0x190/0x1c9
Feb 08 22:58:57 x kernel:  [<ffffffff8234999a>] ? _raw_spin_unlock+0x6e/0xac
Feb 08 22:58:57 x kernel:  [<ffffffff815ccb4e>] ? ext4_mb_init_cache+0x12fd/0x1355
Feb 08 22:58:57 x kernel:  [<ffffffff815c85ea>] mb_find_order_for_block+0x1a6/0x1ed
Feb 08 22:58:57 x kernel:  [<ffffffff815c85ea>] ? mb_find_order_for_block+0x1a6/0x1ed
Feb 08 22:58:57 x kernel:  [<ffffffff815c9702>] mb_find_extent+0x213/0x63f
Feb 08 22:58:57 x kernel:  [<ffffffff815d1f17>] ext4_mb_complex_scan_group+0x148/0x7f2
Feb 08 22:58:57 x kernel:  [<ffffffff81129fbb>] ? get_parent_ip+0x14/0x6d
Feb 08 22:58:57 x kernel:  [<ffffffff815d2d8c>] ext4_mb_regular_allocator+0x7cb/0x9d2
Feb 08 22:58:57 x kernel:  [<ffffffff815dcd55>] ext4_mb_new_blocks+0x750/0x104e
Feb 08 22:58:57 x kernel:  [<ffffffff815b1778>] ? ext4_find_extent+0x6b6/0x6e6
Feb 08 22:58:57 x kernel:  [<ffffffff815bb9d4>] ext4_ext_map_blocks+0x17a2/0x217c
Feb 08 22:58:57 x kernel:  [<ffffffff815419ba>] ext4_map_blocks+0x5c1/0x95b
Feb 08 22:58:57 x kernel:  [<ffffffff81541dcc>] ext4_getblk+0x78/0x32a
Feb 08 22:58:57 x kernel:  [<ffffffff815420a7>] ext4_bread+0x29/0x144
Feb 08 22:58:57 x kernel:  [<ffffffff81559dc2>] ext4_append+0x196/0x2d7
Feb 08 22:58:57 x kernel:  [<ffffffff815656ca>] ext4_mkdir+0x56d/0x998
Feb 08 22:58:57 x kernel:  [<ffffffff813fe640>] vfs_mkdir+0x23b/0x355
Feb 08 22:58:57 x kernel:  [<ffffffff814094ea>] SyS_mkdirat+0x163/0x1d9
Feb 08 22:58:57 x kernel:  [<ffffffff81409580>] SyS_mkdir+0x20/0x29
Feb 08 22:58:57 x kernel:  [<ffffffff82349e57>] entry_SYSCALL_64_fastpath+0x12/0x66
Feb 08 22:58:57 x kernel: ================================================================================

Please let me know if you need any further information
Comment 1 Navin 2016-03-30 09:14:10 UTC
Patch for bug 114701 also fixes 112161 .Details posted there.
Comment 2 Theodore Tso 2016-05-06 01:19:33 UTC
I will be applying these patches:

        http://patchwork.ozlabs.org/patch/599805/
        http://patchwork.ozlabs.org/patch/599804/

Note You need to log in before you can comment on or make changes to this bug.