linux-stable/drivers
Tony Lindgren 47e239117b iommu/omap: Fix regression in probe for NULL pointer dereference
[ Upstream commit 71ff461c3f ]

Commit 3f6634d997 ("iommu: Use right way to retrieve iommu_ops") started
triggering a NULL pointer dereference for some omap variants:

__iommu_probe_device from probe_iommu_group+0x2c/0x38
probe_iommu_group from bus_for_each_dev+0x74/0xbc
bus_for_each_dev from bus_iommu_probe+0x34/0x2e8
bus_iommu_probe from bus_set_iommu+0x80/0xc8
bus_set_iommu from omap_iommu_init+0x88/0xcc
omap_iommu_init from do_one_initcall+0x44/0x24

This is caused by omap iommu probe returning 0 instead of ERR_PTR(-ENODEV)
as noted by Jason Gunthorpe <jgg@ziepe.ca>.

Looks like the regression already happened with an earlier commit
6785eb9105 ("iommu/omap: Convert to probe/release_device() call-backs")
that changed the function return type and missed converting one place.

Cc: Drew Fustini <dfustini@baylibre.com>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Suman Anna <s-anna@ti.com>
Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
Fixes: 6785eb9105 ("iommu/omap: Convert to probe/release_device() call-backs")
Fixes: 3f6634d997 ("iommu: Use right way to retrieve iommu_ops")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Drew Fustini <dfustini@baylibre.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20220331062301.24269-1-tony@atomide.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 20:59:20 +02:00
..
accessibility speakup-dectlk: Restore pitch setting 2022-02-16 12:56:37 +01:00
acpi ACPI: CPPC: Avoid out of bounds access when parsing _CPC data 2022-04-08 14:24:12 +02:00
amba
android
ata ata: pata_hpt37x: fix PCI clock detection 2022-03-08 19:12:33 +01:00
atm atm: eni: Add check for dma_map_single 2022-03-23 09:16:41 +01:00
auxdisplay auxdisplay: lcd2s: Use proper API to free the instance of charlcd object 2022-03-08 19:12:47 +01:00
base rtc: Check return value from mc146818_get_time() 2022-04-13 20:59:14 +02:00
bcma
block drbd: Fix five use after free bugs in get_initial_state 2022-04-13 20:59:19 +02:00
bluetooth Bluetooth: btmtksdio: Fix kernel oops in btmtksdio_interrupt 2022-04-08 14:23:41 +02:00
bus mips: cdmm: Fix refcount leak in mips_cdmm_phys_base 2022-04-08 14:23:39 +02:00
cdrom
char virtio_console: eliminate anonymous module_init & module_exit 2022-04-13 20:59:13 +02:00
clk clk: Enforce that disjoints limits are invalid 2022-04-13 20:59:12 +02:00
clocksource clocksource: acpi_pm: fix return value of __setup handler 2022-04-08 14:23:09 +02:00
comedi
connector
counter
cpufreq cpufreq: CPPC: Fix performance/frequency conversion 2022-04-13 20:59:11 +02:00
cpuidle
crypto crypto: hisilicon/sec - not need to enable sm4 extra mode at HW V3 2022-04-08 14:23:55 +02:00
cxl cxl/regs: Fix size of CXL Capability Header Register 2022-04-08 14:23:30 +02:00
dax dax: make sure inodes are flushed before destroy cache 2022-04-08 14:23:31 +02:00
dca
devfreq
dio
dma dmaengine: hisi_dma: fix MSI allocate fail when reload hisi_dma 2022-04-08 14:23:47 +02:00
dma-buf udmabuf: validate ubuf->pagecount 2022-04-08 14:23:24 +02:00
edac EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-23 12:03:20 +01:00
eisa
extcon
firewire
firmware firmware: google: Properly state IOMEM dependency 2022-04-08 14:23:50 +02:00
fpga
fsi fsi: Aspeed: Fix a potential double free 2022-04-08 14:23:44 +02:00
gnss
gpio Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)" 2022-04-08 14:22:47 +02:00
gpu drm/imx: dw_hdmi-imx: Fix bailout in error cases of probe 2022-04-13 20:59:16 +02:00
greybus greybus: svc: fix an error handling bug in gb_svc_hello() 2022-04-08 14:22:50 +02:00
hid HID: i2c-hid: fix GET/SET_REPORT for unnumbered reports 2022-04-08 14:23:31 +02:00
hsi
hv Drivers: hv: vmbus: Fix potential crash on module unload 2022-04-13 20:59:14 +02:00
hwmon hwmon: (pmbus) Add Vin unit off handling 2022-04-08 14:23:09 +02:00
hwspinlock
hwtracing coresight: syscfg: Fix memleak on registration failure in cscfg_create_device 2022-04-08 14:22:50 +02:00
i2c i2c: mux: demux-pinctrl: do not deactivate a master that is not active 2022-04-08 14:23:42 +02:00
i3c i3c: master: dw: check return of dw_i3c_master_get_free_pos() 2022-03-08 19:12:37 +01:00
idle
iio iio: adc: Add check for devm_request_threaded_irq 2022-04-08 14:23:46 +02:00
infiniband IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition 2022-04-13 20:59:18 +02:00
input Revert "Input: clear BTN_RIGHT/MIDDLE on buttonpads" 2022-04-08 14:22:55 +02:00
interconnect
iommu iommu/omap: Fix regression in probe for NULL pointer dereference 2022-04-13 20:59:20 +02:00
ipack
irqchip irqchip/nvic: Release nvic_base upon failure 2022-04-08 14:23:56 +02:00
isdn isdn: hfcpci: check the return value of dma_set_mask() in setup_hw() 2022-03-16 14:23:36 +01:00
leds
macintosh
mailbox mailbox: imx: fix wakeup failure from freeze mode 2022-04-08 14:24:10 +02:00
mcb
md dm: requeue IO if mapping table not yet available 2022-04-13 20:59:06 +02:00
media media: ov6650: Fix crop rectangle affected by set format 2022-04-08 14:24:15 +02:00
memory memory: emif: check the pointer temp in get_device_details() 2022-04-08 14:23:20 +02:00
memstick
message
mfd mfd: asic3: Add missing iounmap() on error asic3_mfd_probe 2022-04-08 14:23:43 +02:00
misc habanalabs: fix possible memory leak in MMU DR fini 2022-04-13 20:59:12 +02:00
mmc mmc: rtsx: Fix build errors/warnings for unused variable 2022-04-08 14:24:17 +02:00
most
mtd ubi: fastmap: Return error code if memory allocation fails in add_aeb() 2022-04-08 14:24:15 +02:00
mux
net qede: confirm skb is allocated before using 2022-04-13 20:59:19 +02:00
nfc nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION 2022-03-28 09:58:42 +02:00
ntb ntb: intel: fix port config status offset for SPR 2022-03-08 19:12:44 +01:00
nubus
nvdimm nvdimm/region: Fix default alignment for small regions 2022-04-08 14:23:48 +02:00
nvme nvme: fix the read-only state for zoned namespaces with unsupposed features 2022-04-08 14:24:09 +02:00
nvmem nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property 2022-03-02 11:48:06 +01:00
of of: net: move of_net under net/ 2022-03-08 19:12:41 +01:00
opp opp: Expose of-node's name in debugfs 2022-04-13 20:59:11 +02:00
parisc parisc: Fix CPU affinity for Lasi, WAX and Dino chips 2022-04-13 20:59:14 +02:00
parport
pci PCI: endpoint: Fix misused goto label 2022-04-13 20:59:08 +02:00
pcmcia
perf
phy phy: amlogic: meson8b-usb2: fix shared reset control use 2022-04-13 20:59:11 +02:00
pinctrl pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE() 2022-04-08 14:24:11 +02:00
platform platform/chrome: cros_ec_typec: Check for EC device 2022-04-08 14:24:12 +02:00
pnp
power power: supply: axp288-charger: Set Vhold to 4.4V 2022-04-13 20:59:05 +02:00
powercap
pps pps: clients: gpio: Propagate return value from pps_gpio_probe 2022-04-08 14:23:44 +02:00
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-13 20:59:01 +02:00
pwm pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add() 2022-04-08 14:23:44 +02:00
rapidio
ras
regulator regulator: atc260x: Fix missing active_discharge_on setting 2022-04-13 20:59:17 +02:00
remoteproc remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region 2022-04-08 14:23:47 +02:00
reset
rpmsg
rtc rtc: mc146818-lib: fix RTC presence check 2022-04-13 20:59:14 +02:00
s390 block: drop unused includes in <linux/genhd.h> 2022-03-16 14:23:46 +01:00
sbus
scsi scsi: ufs: ufshpb: Fix a NULL check on list iterator 2022-04-13 20:59:19 +02:00
sh
siox
slimbus
soc soc: mediatek: pm-domains: Add wakeup capacity support in power domain 2022-04-08 14:23:18 +02:00
soundwire ASoC: Intel: sof_sdw: fix quirks for 2022 HP Spectre x360 13" 2022-04-08 14:24:02 +02:00
spi spi: bcm-qspi: fix MSPI only access with bcm_qspi_exec_mem_op() 2022-04-13 20:59:19 +02:00
spmi
ssb
staging staging: wfx: fix an error handling in wfx_init_common() 2022-04-13 20:59:11 +02:00
target scsi: target: iscsi: Make sure the np under each tpg is unique 2022-02-16 12:56:12 +01:00
tc
tee optee: use driver internal tee_context for some rpc 2022-03-02 11:47:51 +01:00
thermal thermal: int340x: Check for NULL after calling kmemdup() 2022-04-08 14:23:05 +02:00
thunderbolt
tty serial: samsung_tty: do not unlock port->lock for uart_write_wakeup() 2022-04-13 20:59:13 +02:00
uio
usb usb: dwc3: omap: fix "unbalanced disables for smps10_out1" on omap5evm 2022-04-13 20:59:09 +02:00
vdpa vdpa: mlx5: prevent cvq work from hogging CPU 2022-04-13 20:59:15 +02:00
vfio vfio/pci: Stub vfio_pci_vga_rw when !CONFIG_VFIO_PCI_VGA 2022-04-13 20:59:06 +02:00
vhost tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 20:59:07 +02:00
video video: fbdev: sm712fb: Fix crash in smtcfb_write() 2022-04-08 14:24:02 +02:00
virt virt: acrn: fix a memory leak in acrn_dev_ioctl() 2022-04-08 14:23:50 +02:00
virtio virtio: acknowledge all features before access 2022-03-16 14:23:43 +01:00
visorbus
vlynq
vme
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-13 20:59:11 +02:00
watchdog watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function 2022-04-08 14:24:11 +02:00
xen swiotlb: Support aligned swiotlb buffers 2022-04-08 14:24:17 +02:00
zorro
Kconfig
Makefile