Emmanuel Nicolet
72ad08b84c
ps3disk: use the default segment boundary
[ Upstream commit 720bc316690bd27dea9d71510b50f0cd698ffc32 ]
Since commit dcebd755926b ("block: use bio_for_each_bvec() to compute
multi-page bvec count"), the kernel will bug_on on the PS3 because
bio_split() is called with sectors == 0:
kernel BUG at block/bio.c:1853!
Oops: Exception in kernel mode, sig: 5 [#1]
BE PAGE_SIZE=4K MMU=Hash PREEMPT SMP NR_CPUS=8 NUMA PS3
Modules linked in: firewire_sbp2 rtc_ps3(+) soundcore ps3_gelic(+) \
ps3rom(+) firewire_core ps3vram(+) usb_common crc_itu_t
CPU: 0 PID: 97 Comm: blkid Not tainted 5.3.0-rc4 #1
NIP: c00000000027d0d0 LR: c00000000027d0b0 CTR: 0000000000000000
REGS: c00000000135ae90 TRAP: 0700 Not tainted (5.3.0-rc4)
MSR: 8000000000028032 <SF,EE,IR,DR,RI> CR: 44008240 XER: 20000000
IRQMASK: 0
GPR00: c000000000289368 c00000000135b120 c00000000084a500 c000000004ff8300
GPR04: 0000000000000c00 c000000004c905e0 c000000004c905e0 000000000000ffff
GPR08: 0000000000000000 0000000000000001 0000000000000000 000000000000ffff
GPR12: 0000000000000000 c0000000008ef000 000000000000003e 0000000000080001
GPR16: 0000000000000100 000000000000ffff 0000000000000000 0000000000000004
GPR20: c00000000062fd7e 0000000000000001 000000000000ffff 0000000000000080
GPR24: c000000000781788 c00000000135b350 0000000000000080 c000000004c905e0
GPR28: c00000000135b348 c000000004ff8300 0000000000000000 c000000004c90000
NIP [c00000000027d0d0] .bio_split+0x28/0xac
LR [c00000000027d0b0] .bio_split+0x8/0xac
Call Trace:
[c00000000135b120] [c00000000027d130] .bio_split+0x88/0xac (unreliable)
[c00000000135b1b0] [c000000000289368] .__blk_queue_split+0x11c/0x53c
[c00000000135b2d0] [c00000000028f614] .blk_mq_make_request+0x80/0x7d4
[c00000000135b3d0] [c000000000283a8c] .generic_make_request+0x118/0x294
[c00000000135b4b0] [c000000000283d34] .submit_bio+0x12c/0x174
[c00000000135b580] [c000000000205a44] .mpage_bio_submit+0x3c/0x4c
[c00000000135b600] [c000000000206184] .mpage_readpages+0xa4/0x184
[c00000000135b750] [c0000000001ff8fc] .blkdev_readpages+0x24/0x38
[c00000000135b7c0] [c0000000001589f0] .read_pages+0x6c/0x1a8
[c00000000135b8b0] [c000000000158c74] .__do_page_cache_readahead+0x118/0x184
[c00000000135b9b0] [c0000000001591a8] .force_page_cache_readahead+0xe4/0xe8
[c00000000135ba50] [c00000000014fc24] .generic_file_read_iter+0x1d8/0x830
[c00000000135bb50] [c0000000001ffadc] .blkdev_read_iter+0x40/0x5c
[c00000000135bbc0] [c0000000001b9e00] .new_sync_read+0x144/0x1a0
[c00000000135bcd0] [c0000000001bc454] .vfs_read+0xa0/0x124
[c00000000135bd70] [c0000000001bc7a4] .ksys_read+0x70/0xd8
[c00000000135be20] [c00000000000a524] system_call+0x5c/0x70
Instruction dump:
7fe3fb78 482e30dc 7c0802a6 482e3085 7c9e2378 f821ff71 7ca42b78 7d3e00d0
7c7d1b78 79290fe0 7cc53378 69290001 <0b090000> 81230028 7bca0020 7929ba62
[ end trace 313fec760f30aa1f ]---
The problem originates from setting the segment boundary of the
request queue to -1UL. This makes get_max_segment_size() return zero
when offset is zero, whatever the max segment size. The test with
BLK_SEG_BOUNDARY_MASK fails and 'mask - (mask & offset) + 1' overflows
to zero in the return statement.
Not setting the segment boundary and using the default
value (BLK_SEG_BOUNDARY_MASK) fixes the problem.
Signed-off-by: Emmanuel Nicolet <emmanuel.nicolet@gmail.com>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/060a416c43138f45105c0540eff1a45539f7e2fc.1589049250.git.geoff@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
2020-06-30 15:38:21 -04:00 |
| .. |
|
aoe
|
aoe: fix crash in page count manipulation
|
2016-11-12 08:27:07 -07:00 |
|
drbd
|
signal: Allow cifs and drbd to receive their terminating signals
|
2020-01-29 10:24:30 +01:00 |
|
mtip32xx
|
Revert "mtip32xx: use runtime tag to initialize command header"
|
2018-04-08 12:13:01 +02:00 |
|
paride
|
cdrom: do not call check_disk_change() inside cdrom_open()
|
2018-05-30 07:50:47 +02:00 |
|
rsxx
|
rsxx: add missed destroy_workqueue calls in remove
|
2019-12-21 10:40:49 +01:00 |
|
xen-blkback
|
xen/blkback: Avoid unmapping unmapped grant pages
|
2020-01-12 11:24:19 +01:00 |
|
zram
|
zram: close udev startup race condition as default groups
|
2018-11-27 16:09:40 +01:00 |
|
amiflop.c
|
amiflop: clean up on errors during setup
|
2019-11-28 18:28:23 +01:00 |
|
ataflop.c
|
ataflop: fix error handling during setup
|
2018-11-13 11:16:49 -08:00 |
|
brd.c
|
brd: check and limit max_part par
|
2020-02-28 15:42:43 +01:00 |
|
cciss.c
|
block: convert to device_add_disk()
|
2016-06-27 12:26:08 -07:00 |
|
cciss.h
|
|
|
|
cciss_cmd.h
|
|
|
|
cciss_scsi.c
|
scsi: Do not set cmd_per_lun to 1 in the host template
|
2015-05-31 18:06:28 -07:00 |
|
cciss_scsi.h
|
|
|
|
cryptoloop.c
|
block: cryptoloop - Use new skcipher interface
|
2016-01-27 20:35:43 +08:00 |
|
DAC960.c
|
block: DAC960: print a hex number after a 0x prefix
|
2016-10-27 18:43:43 -07:00 |
|
DAC960.h
|
|
|
|
floppy.c
|
floppy: check FDC index for errors before assigning it
|
2020-02-28 15:42:44 +01:00 |
|
hd.c
|
|
|
|
Kconfig
|
cpqarray: remove it from the kernel
|
2016-03-14 09:06:01 -06:00 |
|
loop.c
|
loop: Add LOOP_SET_DIRECT_IO to compat ioctl
|
2019-10-29 09:15:09 +01:00 |
|
loop.h
|
Revert "block/loop: Use global lock for ioctl() operation."
|
2019-05-02 09:32:04 +02:00 |
|
Makefile
|
drivers:block: cpqarray clean up
|
2016-03-15 15:59:47 -07:00 |
|
mg_disk.c
|
mg_disk: fix error path in mg_probe()
|
2016-06-28 11:01:27 -06:00 |
|
nbd.c
|
nbd: Use set_blocksize() to set device blocksize
|
2019-01-23 08:10:57 +01:00 |
|
null_blk.c
|
Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block
|
2016-10-09 17:29:33 -07:00 |
|
osdblk.c
|
block, drivers: add REQ_OP_FLUSH operation
|
2016-06-07 13:41:38 -06:00 |
|
pktcdvd.c
|
pktcdvd: Fix pkt_setup_dev() error path
|
2018-02-17 13:21:19 +01:00 |
|
ps3disk.c
|
ps3disk: use the default segment boundary
|
2020-06-30 15:38:21 -04:00 |
|
ps3vram.c
|
block: convert to device_add_disk()
|
2016-06-27 12:26:08 -07:00 |
|
rbd.c
|
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
|
2019-01-16 22:12:32 +01:00 |
|
rbd_types.h
|
rbd: support for exclusive-lock feature
|
2016-08-24 23:49:16 +02:00 |
|
skd_main.c
|
skd: Submit requests to firmware before triggering the doorbell
|
2017-09-27 14:39:21 +02:00 |
|
skd_s1120.h
|
|
|
|
smart1,2.h
|
|
|
|
sunvdc.c
|
sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN
|
2019-02-12 19:44:53 +01:00 |
|
swim.c
|
swim: fix cleanup on setup error
|
2018-11-13 11:16:49 -08:00 |
|
swim3.c
|
block/swim3: Fix -EBUSY error when re-opening device after unmount
|
2019-02-12 19:44:58 +01:00 |
|
swim_asm.S
|
|
|
|
sx8.c
|
sx8: use real time for the command seconds
|
2015-12-23 08:42:59 -07:00 |
|
umem.c
|
block: rename bio bi_rw to bi_opf
|
2016-08-07 14:41:02 -06:00 |
|
umem.h
|
|
|
|
virtio_blk.c
|
virtio-blk: fix hw_queue stopped on arbitrary error
|
2020-03-20 09:07:43 +01:00 |
|
xen-blkfront.c
|
xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk
|
2020-01-23 08:19:42 +01:00 |
|
xsysace.c
|
xsysace: Fix error handling in ace_setup
|
2019-05-08 07:19:11 +02:00 |
|
z2ram.c
|
|
|