android_kernel_xiaomi_sm8450/drivers
Dave Airlie c6e6640784 nouveau/vmm: don't set addr on the fail path to avoid warning
commit cacea81390fd8c8c85404e5eb2adeb83d87a912e upstream.

nvif_vmm_put gets called if addr is set, but if the allocation
fails we don't need to call put, otherwise we get a warning like

[523232.435671] ------------[ cut here ]------------
[523232.435674] WARNING: CPU: 8 PID: 1505697 at drivers/gpu/drm/nouveau/nvif/vmm.c:68 nvif_vmm_put+0x72/0x80 [nouveau]
[523232.435795] Modules linked in: uinput rfcomm snd_seq_dummy snd_hrtimer nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables nfnetlink qrtr bnep sunrpc binfmt_misc intel_rapl_msr intel_rapl_common intel_uncore_frequency intel_uncore_frequency_common isst_if_common iwlmvm nfit libnvdimm vfat fat x86_pkg_temp_thermal intel_powerclamp mac80211 snd_soc_avs snd_soc_hda_codec coretemp snd_hda_ext_core snd_soc_core snd_hda_codec_realtek kvm_intel snd_hda_codec_hdmi snd_compress snd_hda_codec_generic ac97_bus snd_pcm_dmaengine snd_hda_intel libarc4 snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm iwlwifi snd_hda_core btusb snd_hwdep btrtl snd_seq btintel irqbypass btbcm rapl snd_seq_device eeepc_wmi btmtk intel_cstate iTCO_wdt cfg80211 snd_pcm asus_wmi bluetooth intel_pmc_bxt iTCO_vendor_support snd_timer ledtrig_audio pktcdvd snd mei_me
[523232.435828]  sparse_keymap intel_uncore i2c_i801 platform_profile wmi_bmof mei pcspkr ioatdma soundcore i2c_smbus rfkill idma64 dca joydev acpi_tad loop zram nouveau drm_ttm_helper ttm video drm_exec drm_gpuvm gpu_sched crct10dif_pclmul i2c_algo_bit nvme crc32_pclmul crc32c_intel drm_display_helper polyval_clmulni nvme_core polyval_generic e1000e mxm_wmi cec ghash_clmulni_intel r8169 sha512_ssse3 nvme_common wmi pinctrl_sunrisepoint uas usb_storage ip6_tables ip_tables fuse
[523232.435849] CPU: 8 PID: 1505697 Comm: gnome-shell Tainted: G        W          6.6.0-rc7-nvk-uapi+ #12
[523232.435851] Hardware name: System manufacturer System Product Name/ROG STRIX X299-E GAMING II, BIOS 1301 09/24/2021
[523232.435852] RIP: 0010:nvif_vmm_put+0x72/0x80 [nouveau]
[523232.435934] Code: 00 00 48 89 e2 be 02 00 00 00 48 c7 04 24 00 00 00 00 48 89 44 24 08 e8 fc bf ff ff 85
c0 75 0a 48 c7 43 08 00 00 00 00 eb b3 <0f> 0b eb f2 e8 f5 c9 b2 e6 0f 1f 44 00 00 90 90 90 90 90 90 90 90
[523232.435936] RSP: 0018:ffffc900077ffbd8 EFLAGS: 00010282
[523232.435937] RAX: 00000000fffffffe RBX: ffffc900077ffc00 RCX: 0000000000000010
[523232.435938] RDX: 0000000000000010 RSI: ffffc900077ffb38 RDI: ffffc900077ffbd8
[523232.435940] RBP: ffff888e1c4f2140 R08: 0000000000000000 R09: 0000000000000000
[523232.435940] R10: 0000000000000000 R11: 0000000000000000 R12: ffff888503811800
[523232.435941] R13: ffffc900077ffca0 R14: ffff888e1c4f2140 R15: ffff88810317e1e0
[523232.435942] FS:  00007f933a769640(0000) GS:ffff88905fa00000(0000) knlGS:0000000000000000
[523232.435943] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[523232.435944] CR2: 00007f930bef7000 CR3: 00000005d0322001 CR4: 00000000003706e0
[523232.435945] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[523232.435946] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[523232.435964] Call Trace:
[523232.435965]  <TASK>
[523232.435966]  ? nvif_vmm_put+0x72/0x80 [nouveau]
[523232.436051]  ? __warn+0x81/0x130
[523232.436055]  ? nvif_vmm_put+0x72/0x80 [nouveau]
[523232.436138]  ? report_bug+0x171/0x1a0
[523232.436142]  ? handle_bug+0x3c/0x80
[523232.436144]  ? exc_invalid_op+0x17/0x70
[523232.436145]  ? asm_exc_invalid_op+0x1a/0x20
[523232.436149]  ? nvif_vmm_put+0x72/0x80 [nouveau]
[523232.436230]  ? nvif_vmm_put+0x64/0x80 [nouveau]
[523232.436342]  nouveau_vma_del+0x80/0xd0 [nouveau]
[523232.436506]  nouveau_vma_new+0x1a0/0x210 [nouveau]
[523232.436671]  nouveau_gem_object_open+0x1d0/0x1f0 [nouveau]
[523232.436835]  drm_gem_handle_create_tail+0xd1/0x180
[523232.436840]  drm_prime_fd_to_handle_ioctl+0x12e/0x200
[523232.436844]  ? __pfx_drm_prime_fd_to_handle_ioctl+0x10/0x10
[523232.436847]  drm_ioctl_kernel+0xd3/0x180
[523232.436849]  drm_ioctl+0x26d/0x4b0
[523232.436851]  ? __pfx_drm_prime_fd_to_handle_ioctl+0x10/0x10
[523232.436855]  nouveau_drm_ioctl+0x5a/0xb0 [nouveau]
[523232.437032]  __x64_sys_ioctl+0x94/0xd0
[523232.437036]  do_syscall_64+0x5d/0x90
[523232.437040]  ? syscall_exit_to_user_mode+0x2b/0x40
[523232.437044]  ? do_syscall_64+0x6c/0x90
[523232.437046]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8

Reported-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240117213852.295565-1-airlied@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 08:41:54 +01:00
..
accessibility
acpi acpi: property: Let args be NULL in __acpi_node_get_property_reference 2024-01-25 14:37:54 -08:00
amba amba: bus: fix refcount leak 2023-09-19 12:20:19 +02:00
android binder: fix race between mmput() and do_exit() 2024-01-25 14:37:51 -08:00
ata ata: pata_isapnp: Add missing error check for devm_ioport_map() 2023-12-08 08:46:08 +01:00
atm atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 15:44:28 +01:00
auxdisplay
base software node: Let args be NULL in software_node_get_reference_args 2024-01-25 14:37:54 -08:00
bcma
block rbd: take header_rwsem in rbd_dev_refresh() only when updating 2023-10-10 21:53:36 +02:00
bluetooth Bluetooth: btmtkuart: fix recv_buf() return value 2024-01-25 14:37:46 -08:00
bus bus: mhi: host: Drop chan lock before queuing buffers 2024-02-23 08:41:53 +01:00
cdrom
char hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-02-23 08:41:52 +01:00
clk clk: fixed-rate: add devm_clk_hw_register_fixed_rate 2024-01-25 14:37:49 -08:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 16:54:49 +00:00
connector
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2023-10-25 11:54:16 +02:00
cpufreq cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() 2024-01-25 14:37:40 -08:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-19 12:20:15 +02:00
crypto virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 2024-01-25 14:37:50 -08:00
dax dax: Introduce alloc_dev_dax_id() 2023-07-27 08:44:00 +02:00
dca
devfreq PM / devfreq: rockchip-dfi: Make pmu regmap mandatory 2023-11-20 11:06:45 +01:00
dio
dma dmaengine: fix NULL pointer in channel unregistration function 2024-02-23 08:41:52 +01:00
dma-buf dma-buf/sw_sync: Avoid recursive lock during fence signal 2023-08-30 16:23:19 +02:00
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-01-25 14:37:39 -08:00
eisa
extcon extcon: Fix kernel doc of property capability fields to avoid warnings 2023-07-27 08:44:04 +02:00
firewire firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards 2024-01-15 18:48:06 +01:00
firmware firmware: meson_sm: populate platform devices from sm device tree data 2024-01-25 14:37:44 -08:00
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-17 11:47:55 +02:00
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:20:18 +02:00
gnss
gpio gpiolib: sysfs: Fix error handling on failed export 2023-12-13 18:27:04 +01:00
gpu nouveau/vmm: don't set addr on the fail path to avoid warning 2024-02-23 08:41:54 +01:00
greybus
hid HID: wacom: Correct behavior when processing some confidence == false touches 2024-01-25 14:37:53 -08:00
hsi
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:28:07 +02:00
hwmon hwmon: (acpi_power_meter) Fix 4.29 MW bug 2023-12-13 18:27:01 +01:00
hwspinlock
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-01-25 14:37:39 -08:00
i2c i2c: s3c24xx: fix transferring more than one message in polling mode 2024-01-25 14:37:57 -08:00
i3c i3c: master: cdns: Fix reading status register 2023-11-28 16:54:58 +00:00
ide
idle
iio iio:adc:ad7091r: Move exports into IIO_AD7091R namespace. 2024-02-23 08:41:52 +01:00
infiniband IB/iser: Prevent invalidating wrong MR 2024-01-25 14:37:50 -08:00
input Input: atkbd - use ab83 as id when skipping the getid command 2024-01-25 14:37:50 -08:00
interconnect interconnect: Treat xlate() returning NULL node as an error 2024-01-05 15:12:26 +01:00
iommu iommu/arm-smmu-qcom: Add missing GMU entry to match table 2024-01-25 14:37:52 -08:00
ipack
irqchip irqchip/stm32-exti: add missing DT IRQ flag translation 2023-11-08 17:30:48 +01:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:21:01 +02:00
leds leds: aw2013: Select missing dependency REGMAP_I2C 2024-01-25 14:37:53 -08:00
lightnvm
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-17 11:48:00 +02:00
mailbox mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0 2023-07-27 08:44:08 +02:00
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 16:54:58 +00:00
md dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata() 2024-01-05 15:12:31 +01:00
media media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds3103_probe() 2024-01-25 14:37:48 -08:00
memory memory: brcmstb_dpfe: fix testing array offset after use 2023-07-27 08:43:48 +02:00
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-07-27 08:43:40 +02:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-30 12:57:49 +01:00
mfd mfd: syscon: Fix null pointer dereference in of_syscon_register() 2024-01-25 14:37:53 -08:00
misc misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write 2023-12-13 18:27:03 +01:00
mmc mmc: mmc_spi: remove custom DMA mapped buffers 2024-02-23 08:41:54 +01:00
most
mtd mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 14:37:41 -08:00
mux
net mlxsw: spectrum_acl_tcam: Fix stack corruption 2024-01-25 14:37:56 -08:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 10:28:14 +02:00
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-19 12:20:22 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-27 08:43:31 +02:00
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:06:50 +01:00
nvme nvmet-tcp: Fix the H2C expected PDU len calculation 2024-01-25 14:37:55 -08:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2023-11-08 17:30:44 +01:00
of of: unittest: Fix of_count_phandle_with_args() expected value message 2024-01-25 14:37:50 -08:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-19 12:20:07 +02:00
oprofile
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-10 21:53:32 +02:00
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-25 14:37:39 -08:00
pci PCI: mediatek: Clear interrupt status before dispatching handler 2024-02-23 08:41:51 +01:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:06:54 +01:00
perf perf/arm-cmn: Fix the unhandled overflow status of counter 4 to 7 2023-10-25 11:54:13 +02:00
phy phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins 2023-10-25 11:54:26 +02:00
pinctrl pinctrl: lochnagar: Don't build on MIPS 2024-01-25 14:37:35 -08:00
platform platform/x86: intel_telemetry: Fix kernel doc descriptions 2023-12-20 15:44:33 +01:00
pnp
power power: supply: cw2015: correct time_to_empty units in sysfs 2024-01-25 14:37:53 -08:00
powercap powercap: RAPL: Fix CONFIG_IOSF_MBI dependency 2023-07-27 08:43:34 +02:00
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 16:54:54 +00:00
pwm pwm: jz4740: Don't use dev_err_probe() in .request() 2024-01-25 14:37:52 -08:00
rapidio
ras
regulator regulator/core: Revert "fix kobject release warning and memory leak in regulator_register()" 2023-10-25 11:54:23 +02:00
remoteproc remoteproc: stm32_rproc: Add mutex protection for workqueue 2023-05-30 12:57:48 +01:00
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-01-25 14:37:37 -08:00
rpmsg rpmsg: virtio: Free driver_override when rpmsg_remove() 2024-02-23 08:41:53 +01:00
rtc rtc: Adjust failure return code for cmos_set_alarm() 2024-02-23 08:41:54 +01:00
s390 s390/scm: fix virtual vs physical address confusion 2024-01-25 14:37:38 -08:00
sbus
scsi scsi: hisi_sas: Replace with standard error code return value 2024-01-25 14:37:44 -08:00
sfi
sh
siox
slimbus
soc soc: qcom: llcc: Handle a second device without data corruption 2023-11-20 11:06:49 +01:00
soundwire soundwire: stream: fix NULL pointer dereference for multi_link 2023-12-20 15:44:36 +01:00
spi spi: sh-msiof: Enforce fixed DTDL for R-Car H3 2024-01-25 14:37:41 -08:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-17 11:47:59 +02:00
ssb
staging media: rkisp1: Disable runtime PM in probe error path 2024-01-25 14:37:48 -08:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 21:53:38 +02:00
tc
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:27:00 +01:00
thermal thermal: core: prevent potential string overflow 2023-11-20 11:06:45 +01:00
thunderbolt thunderbolt: Workaround an IOMMU fault on certain systems with Intel Maple Ridge 2023-10-25 11:54:20 +02:00
tty serial: sc16is7xx: add check for unsupported SPI modes during probe 2024-02-23 08:41:51 +01:00
uio uio: Fix use-after-free in uio_open 2024-01-25 14:37:38 -08:00
usb usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled 2024-02-23 08:41:51 +01:00
vdpa vdpa/mlx5: Don't clear mr struct on destroy MR 2023-03-11 16:39:45 +01:00
vfio vfio/type1: fix cap_migration information leak 2023-09-19 12:20:14 +02:00
vhost vhost: support PACKED when setting-getting vring_base 2023-06-14 11:09:57 +02:00
video fbdev: flush deferred work in fb_deferred_io_fsync() 2024-01-25 14:37:52 -08:00
virt
virtio virtio-mmio: fix memory leak of vm_dev 2023-11-08 17:30:40 +01:00
visorbus
vlynq
vme
w1 w1: fix loop in w1_fini() 2023-07-27 08:44:02 +02:00
watchdog watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused 2024-01-25 14:37:49 -08:00
xen swiotlb-xen: provide the "max_mapping_size" method 2023-12-08 08:46:10 +01:00
zorro
Kconfig
Makefile