Chaitanya Kulkarni
6a904892d8
null_blk: return error for invalid zone size
[ Upstream commit e274832590211c4b1b1e807ca66fad8b5bb8b328 ]
In null_init_zone_dev() check if the zone size is larger than device
capacity, return error if needed.
This also fixes the following oops :-
null_blk: changed the number of conventional zones to 4294967295
BUG: kernel NULL pointer dereference, address: 0000000000000010
PGD 7d76c5067 P4D 7d76c5067 PUD 7d240c067 PMD 0
Oops: 0002 [#1] SMP NOPTI
CPU: 4 PID: 5508 Comm: nullbtests.sh Tainted: G OE 5.7.0-rc4lblk-fnext0
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e4
RIP: 0010:null_init_zoned_dev+0x17a/0x27f [null_blk]
RSP: 0018:ffffc90007007e00 EFLAGS: 00010246
RAX: 0000000000000020 RBX: ffff8887fb3f3c00 RCX: 0000000000000007
RDX: 0000000000000000 RSI: ffff8887ca09d688 RDI: ffff888810fea510
RBP: 0000000000000010 R08: ffff8887ca09d688 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8887c26e8000
R13: ffffffffa05e9390 R14: 0000000000000000 R15: 0000000000000001
FS: 00007fcb5256f740(0000) GS:ffff888810e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000010 CR3: 000000081e8fe000 CR4: 00000000003406e0
Call Trace:
null_add_dev+0x534/0x71b [null_blk]
nullb_device_power_store.cold.41+0x8/0x2e [null_blk]
configfs_write_file+0xe6/0x150
vfs_write+0xba/0x1e0
ksys_write+0x5f/0xe0
do_syscall_64+0x60/0x250
entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x7fcb51c71840
Signed-off-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
|
2020-06-07 13:18:51 +02:00 |
| .. |
|
aoe
|
block: aoe: Fix kernel crash due to atomic sleep when exiting
|
2019-08-08 07:29:02 -06:00 |
|
drbd
|
block: drbd: remove a stray unlock in __drbd_send_protocol()
|
2019-11-08 06:55:22 -07:00 |
|
mtip32xx
|
block: mtip32xx: Remove call to memset after dma_alloc_coherent
|
2019-06-29 09:42:50 -06:00 |
|
paride
|
paride/pcd: need to check if cd->disk is null in pcd_detect
|
2019-09-04 07:04:37 -06:00 |
|
rsxx
|
rsxx: add missed destroy_workqueue calls in remove
|
2019-11-14 13:59:49 -07:00 |
|
xen-blkback
|
xen/blkback: Avoid unmapping unmapped grant pages
|
2020-01-09 10:20:07 +01:00 |
|
zram
|
drivers/block/zram/zram_drv.c: fix error return codes not being returned in writeback_store
|
2020-02-24 08:36:31 +01:00 |
|
amiflop.c
|
treewide: Add SPDX license identifier for more missed files
|
2019-05-21 10:50:45 +02:00 |
|
ataflop.c
|
ataflop: Mark expected switch fall-through
|
2019-07-29 15:24:58 -06:00 |
|
brd.c
|
brd: check and limit max_part par
|
2020-02-24 08:37:02 +01:00 |
|
cryptoloop.c
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 30
|
2019-05-24 17:27:10 +02:00 |
|
floppy.c
|
floppy: check FDC index for errors before assigning it
|
2020-02-28 17:22:14 +01:00 |
|
Kconfig
|
docs: blockdev: add it to the admin-guide
|
2019-07-15 11:03:01 -03:00 |
|
loop.c
|
loop: Better discard support for block devices
|
2020-04-29 16:33:01 +02:00 |
|
loop.h
|
|
|
|
Makefile
|
|
|
|
nbd.c
|
nbd: add a flush_workqueue in nbd_start_device
|
2020-02-24 08:36:31 +01:00 |
|
null_blk.h
|
null_blk: format pr_* logs with pr_fmt
|
2019-09-16 08:38:29 -06:00 |
|
null_blk_main.c
|
null_blk: fix spurious IO errors after failed past-wp access
|
2020-04-17 10:50:00 +02:00 |
|
null_blk_zoned.c
|
null_blk: return error for invalid zone size
|
2020-06-07 13:18:51 +02:00 |
|
pktcdvd.c
|
pktcdvd: remove warning on attempting to register non-passthrough dev
|
2019-09-22 10:01:05 -06:00 |
|
ps3disk.c
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 164
|
2019-05-30 11:26:38 -07:00 |
|
ps3vram.c
|
block/ps3vram: Use %llu to format sector_t after LBDAF removal
|
2019-06-13 03:17:50 -06:00 |
|
rbd.c
|
rbd: call rbd_dev_unprobe() after unwatching and flushing notifies
|
2020-04-23 10:36:27 +02:00 |
|
rbd_types.h
|
rbd: support for object-map and fast-diff
|
2019-07-08 14:01:45 +02:00 |
|
skd_main.c
|
Linux 5.2-rc6
|
2019-07-01 08:16:08 -06:00 |
|
skd_s1120.h
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 497
|
2019-06-19 17:09:53 +02:00 |
|
sunvdc.c
|
treewide: Add SPDX license identifier for more missed files
|
2019-05-21 10:50:45 +02:00 |
|
swim.c
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
|
2019-05-30 11:26:32 -07:00 |
|
swim3.c
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
|
2019-05-30 11:26:32 -07:00 |
|
swim_asm.S
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
|
2019-05-30 11:26:32 -07:00 |
|
sx8.c
|
|
|
|
umem.c
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 349
|
2019-06-05 17:37:08 +02:00 |
|
umem.h
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 348
|
2019-06-05 17:37:08 +02:00 |
|
virtio_blk.c
|
virtio-blk: handle block_device_operations callbacks after hot unplug
|
2020-05-20 08:20:06 +02:00 |
|
xen-blkfront.c
|
xen/blkfront: fix memory allocation flags in blkfront_setup_indirect()
|
2020-04-17 10:50:22 +02:00 |
|
xsysace.c
|
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
|
2019-06-19 17:09:55 +02:00 |
|
z2ram.c
|
|
|