bisecting fixing commit since bf8d1cd4386535004c4afe7f03d37f9864c9940e building syzkaller on af6b8ef8f18c45343685f0ee7af9dd3a4b2b5d95 testing commit bf8d1cd4386535004c4afe7f03d37f9864c9940e with gcc (GCC) 8.1.0 kernel signature: fedd0fc64e19c13a516b063dc37b194d945cc9ca9267ab0a8d85592c19b4c1af all runs: crashed: INFO: task hung in __generic_file_fsync testing current HEAD 94f2630b18975bb56eee5d1a36371db967643479 testing commit 94f2630b18975bb56eee5d1a36371db967643479 with gcc (GCC) 8.1.0 kernel signature: 6e67064e2c548ee921a7480e5d2ccc8c94f0d0e5fbc7227875421a671b9ffd98 all runs: OK # git bisect start 94f2630b18975bb56eee5d1a36371db967643479 bf8d1cd4386535004c4afe7f03d37f9864c9940e Bisecting: 4799 revisions left to test after this (roughly 12 steps) [fb95aae6e67c4e319a24b3eea32032d4246a5335] Merge tag 'sound-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound testing commit fb95aae6e67c4e319a24b3eea32032d4246a5335 with gcc (GCC) 8.1.0 kernel signature: 7c6370779b5e43b70e6c563ba0c6ff4472ea17e4b63f31eb29ba33c020050281 all runs: OK # git bisect bad fb95aae6e67c4e319a24b3eea32032d4246a5335 Bisecting: 2466 revisions left to test after this (roughly 11 steps) [c4c57b974d27f53744b1bc5669e002f080cec839] Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next testing commit c4c57b974d27f53744b1bc5669e002f080cec839 with gcc (GCC) 8.1.0 kernel signature: 39a3c3c6ce8a000b8f51bc9181c84d9b23ccac60648702e0be067ee23d4e15b0 all runs: OK # git bisect bad c4c57b974d27f53744b1bc5669e002f080cec839 Bisecting: 1236 revisions left to test after this (roughly 10 steps) [ee7a711f32a786819f2240290b88c8f5fc0cca96] devlink: add parameter documentation for the mlx4 driver testing commit ee7a711f32a786819f2240290b88c8f5fc0cca96 with gcc (GCC) 8.1.0 kernel signature: dd764a01c026dcdeb3bceb270aa16d07f32b63fd354dc352e4d1b8b5ae0db69f all runs: OK # git bisect bad ee7a711f32a786819f2240290b88c8f5fc0cca96 Bisecting: 610 revisions left to test after this (roughly 9 steps) [ba4028105e98aa79de616cff4aa80d329c0cebbf] Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next testing commit ba4028105e98aa79de616cff4aa80d329c0cebbf with gcc (GCC) 8.1.0 kernel signature: c90ee5764722b4432677fa752ab4e1477fb77d41739cf7a03b25cf144ab64bf4 all runs: crashed: INFO: task hung in __generic_file_fsync # git bisect good ba4028105e98aa79de616cff4aa80d329c0cebbf Bisecting: 305 revisions left to test after this (roughly 8 steps) [8ee4c907725cb09e1872dd4203e0a4266dd7e637] sfc: move MCDI transmit queue management code testing commit 8ee4c907725cb09e1872dd4203e0a4266dd7e637 with gcc (GCC) 8.1.0 kernel signature: 0a00394c8b9ee9a383a488460c9e6d4467bb2f864d0bdbb5803bddc017dd86cb all runs: crashed: INFO: task hung in __generic_file_fsync # git bisect good 8ee4c907725cb09e1872dd4203e0a4266dd7e637 Bisecting: 154 revisions left to test after this (roughly 7 steps) [b07f636fca1c8fbba124b0082487c0b3890a0e0c] Merge tag 'tpmdd-next-20200108' of git://git.infradead.org/users/jjs/linux-tpmdd testing commit b07f636fca1c8fbba124b0082487c0b3890a0e0c with gcc (GCC) 8.1.0 kernel signature: 1ed86d19365f03c017795ba64a4a9eae960343561c7334f88a9ec9842270babc all runs: OK # git bisect bad b07f636fca1c8fbba124b0082487c0b3890a0e0c Bisecting: 75 revisions left to test after this (roughly 6 steps) [e0153fc2c7606f101392b682e720a7a456d6c766] mm: move_pages: return valid node id in status if the page is already on the target node testing commit e0153fc2c7606f101392b682e720a7a456d6c766 with gcc (GCC) 8.1.0 kernel signature: 8c2bd16c9156834bb7de2fb8874772071ced6e888ffc39b99dc8babcb669b75f all runs: OK # git bisect bad e0153fc2c7606f101392b682e720a7a456d6c766 Bisecting: 33 revisions left to test after this (roughly 5 steps) [e35d0165908ad2d2bdb76773ef77b551763eedbd] Merge tag 'sound-5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound testing commit e35d0165908ad2d2bdb76773ef77b551763eedbd with gcc (GCC) 8.1.0 kernel signature: 950e731a2805be43af853a3ada596142206b9c55dcdeccec47c1b28677146b01 all runs: crashed: INFO: task hung in __generic_file_fsync # git bisect good e35d0165908ad2d2bdb76773ef77b551763eedbd Bisecting: 16 revisions left to test after this (roughly 4 steps) [3a562aee727a7bfbb3a37b1aa934118397dad701] Merge tag 'for-5.5-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux testing commit 3a562aee727a7bfbb3a37b1aa934118397dad701 with gcc (GCC) 8.1.0 kernel signature: a4b37c65f159a656a645682eb6baec6b7894bf7816729660324365c72d25934b all runs: OK # git bisect bad 3a562aee727a7bfbb3a37b1aa934118397dad701 Bisecting: 7 revisions left to test after this (roughly 3 steps) [bed723519a72c0f68fbfaf68ed5bf55d04e46566] Merge tag 'kbuild-fixes-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild testing commit bed723519a72c0f68fbfaf68ed5bf55d04e46566 with gcc (GCC) 8.1.0 kernel signature: 0d6946ed61bf30ae145a79e6ca4725df5f3fb86ecb501461d67b9f18edc8c903 all runs: crashed: INFO: task hung in __generic_file_fsync # git bisect good bed723519a72c0f68fbfaf68ed5bf55d04e46566 Bisecting: 3 revisions left to test after this (roughly 2 steps) [b6b4aafc99d7c8dbf7d9429bf054b591daab1ad0] Merge tag 'block-5.5-20200103' of git://git.kernel.dk/linux-block testing commit b6b4aafc99d7c8dbf7d9429bf054b591daab1ad0 with gcc (GCC) 8.1.0 kernel signature: 8639a91180f120a7e6c979706fea78080da684a16a1500ac982d7e401d8ad0ae all runs: OK # git bisect bad b6b4aafc99d7c8dbf7d9429bf054b591daab1ad0 Bisecting: 1 revision left to test after this (roughly 1 step) [429120f3df2dba2bf3a4a19f4212a53ecefc7102] block: fix splitting segments on boundary masks testing commit 429120f3df2dba2bf3a4a19f4212a53ecefc7102 with gcc (GCC) 8.1.0 kernel signature: 966b2ebb803b5b76aaa8a421f88a0c9c4c0933d98c94ecaefef784e0c5e970bd all runs: OK # git bisect bad 429120f3df2dba2bf3a4a19f4212a53ecefc7102 Bisecting: 0 revisions left to test after this (roughly 0 steps) [85a8ce62c2eabe28b9d76ca4eecf37922402df93] block: add bio_truncate to fix guard_bio_eod testing commit 85a8ce62c2eabe28b9d76ca4eecf37922402df93 with gcc (GCC) 8.1.0 kernel signature: 98bd4b37e042b92d69aaf9eebfa6a41ce3244d9381d838f1c637776f0c868fca all runs: OK # git bisect bad 85a8ce62c2eabe28b9d76ca4eecf37922402df93 85a8ce62c2eabe28b9d76ca4eecf37922402df93 is the first bad commit commit 85a8ce62c2eabe28b9d76ca4eecf37922402df93 Author: Ming Lei Date: Sat Dec 28 07:05:48 2019 +0800 block: add bio_truncate to fix guard_bio_eod Some filesystem, such as vfat, may send bio which crosses device boundary, and the worse thing is that the IO request starting within device boundaries can contain more than one segment past EOD. Commit dce30ca9e3b6 ("fs: fix guard_bio_eod to check for real EOD errors") tries to fix this issue by returning -EIO for this situation. However, this way lets fs user code lose chance to handle -EIO, then sync_inodes_sb() may hang for ever. Also the current truncating on last segment is dangerous by updating the last bvec, given bvec table becomes not immutable any more, and fs bio users may not retrieve the truncated pages via bio_for_each_segment_all() in its .end_io callback. Fixes this issue by supporting multi-segment truncating. And the approach is simpler: - just update bio size since block layer can make correct bvec with the updated bio size. Then bvec table becomes really immutable. - zero all truncated segments for read bio Cc: Carlos Maiolino Cc: linux-fsdevel@vger.kernel.org Fixed-by: dce30ca9e3b6 ("fs: fix guard_bio_eod to check for real EOD errors") Reported-by: syzbot+2b9e54155c8c25d8d165@syzkaller.appspotmail.com Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/bio.c | 39 +++++++++++++++++++++++++++++++++++++++ fs/buffer.c | 25 +------------------------ include/linux/bio.h | 1 + 3 files changed, 41 insertions(+), 24 deletions(-) parent commit b2c0fcd28772f99236d261509bcd242135677965 wasn't tested testing commit b2c0fcd28772f99236d261509bcd242135677965 with gcc (GCC) 8.1.0 kernel signature: 167bab86dcf95a6696533072985edbfcbfb9e8770f7a0ee45003a994285d2a94 culprit signature: 98bd4b37e042b92d69aaf9eebfa6a41ce3244d9381d838f1c637776f0c868fca parent signature: 167bab86dcf95a6696533072985edbfcbfb9e8770f7a0ee45003a994285d2a94 revisions tested: 15, total time: 4h6m20.306993615s (build: 1h40m21.462003586s, test: 2h24m44.719918315s) first good commit: 85a8ce62c2eabe28b9d76ca4eecf37922402df93 block: add bio_truncate to fix guard_bio_eod cc: ["axboe@kernel.dk" "linux-block@vger.kernel.org" "linux-fsdevel@vger.kernel.org" "linux-kernel@vger.kernel.org" "ming.lei@redhat.com" "osandov@fb.com" "viro@zeniv.linux.org.uk"]