linux-mainline/drivers
Ming Lei e24721e441 ublk: fix 'warn: variable dereferenced before check 'req'' from Smatch
The added check of 'req_op(req) == REQ_OP_ZONE_APPEND' should have been
done after the request is confirmed as valid.

Actually here, the request should always been true, so add one
WARN_ON_ONCE(!req), meantime move the zone_append check after
checking the request.

Cc: Andreas Hindborg <a.hindborg@samsung.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 29802d7ca3 ("ublk: enable zoned storage support")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230811135216.420404-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-08-11 08:13:23 -06:00
..
accel
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block ublk: fix 'warn: variable dereferenced before check 'req'' from Smatch 2023-08-11 08:13:23 -06:00
bluetooth
bus
cdrom
cdx
char
clk
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu
greybus
hid
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md bio-integrity: update the payload size in bio_integrity_add_page() 2023-08-09 16:05:35 -06:00
media
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net
nfc
ntb
nubus
nvdimm
nvme bio-integrity: update the payload size in bio_integrity_add_page() 2023-08-09 16:05:35 -06:00
nvmem
of
opp
parisc
parport
pci
pcmcia
peci
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi block: Improve performance for BLK_MQ_F_BLOCKING drivers 2023-07-24 20:13:12 -06:00
sh
siox
slimbus
soc
soundwire
spi spi: Fixes for v6.5 2023-07-15 08:51:02 -07:00
spmi
ssb
staging
target bio-integrity: update the payload size in bio_integrity_add_page() 2023-08-09 16:05:35 -06:00
tc
tee
thermal
thunderbolt
tty
ufs
uio
usb
vdpa
vfio
vhost
video
virt
virtio
vlynq
w1
watchdog
xen
zorro
Kconfig
Makefile