linux/drivers
Ruslan Bilovol 5abbf39685 UPSTREAM: usb: gadget: f_uac2: validate input parameters
Currently user can configure UAC2 function with
parameters that violate UAC2 spec or are not supported
by UAC2 gadget implementation.

This can lead to incorrect behavior if such gadget
is connected to the host - like enumeration failure
or other issues depending on host's UAC2 driver
implementation, bringing user to a long hours
of debugging the issue.

Instead of silently accept these parameters, throw
an error if they are not valid.

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Link: https://lore.kernel.org/r/1614599375-8803-4-git-send-email-ruslan.bilovol@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 187332233
(cherry picked from commit 3713d5ceb0)
Change-Id: Icc684c620e039f7dbb3591e5669506f6f69574d6
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2021-05-12 17:00:55 +00:00
..
accessibility speakup: fix uninitialized flush_lock 2020-12-30 11:53:44 +01:00
acpi Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00
amba Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
android ANDROID: thermal: Add vendor thermal_pm_notify_suspend function 2021-05-11 15:15:04 +00:00
ata ata: ahci_brcm: Add back regulators management 2021-03-04 11:37:45 +01:00
atm atm: idt77252: fix null-ptr-dereference 2021-03-30 14:31:50 +02:00
auxdisplay auxdisplay: ht16k33: Fix refresh rate handling 2021-03-04 11:38:00 +01:00
base ANDROID: topology: Add flag to indicate topology has been updated 2021-05-11 22:55:07 +00:00
bcma
block Merge 5.10.31 into android12-5.10 2021-04-16 16:01:44 +02:00
bluetooth Merge 5.10.23 into android12-5.10 2021-03-11 19:36:03 +01:00
bus bus: ti-sysc: Fix warning on unbind if reset is not deasserted 2021-04-10 13:36:07 +02:00
cdrom
char Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00
clk Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00
clocksource ANDROID: GKI: enable CONFIG_MTK_TIMER 2021-05-05 12:14:32 +00:00
connector
counter counter: stm32-timer-cnt: fix ceiling miss-alignment with reload register 2021-03-25 09:04:16 +01:00
cpufreq Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
cpuidle ANDROID: cpuidle: Move vendor hook to enter proper state 2021-03-25 19:14:33 +00:00
crypto crypto: sun4i-ss - initialize need_fallback 2021-03-04 11:38:32 +01:00
dax device-dax: Fix default return code of range_parse() 2021-03-04 11:38:15 +01:00
dca
devfreq
dio
dma Merge 5.10.33 into android12-5.10 2021-04-29 13:57:47 +02:00
dma-buf ANDROID: dma-buf: Make DMA-BUF sysfs stats kobjects not send uevents 2021-04-29 22:11:05 +00:00
edac EDAC/amd64: Do not load on family 0x15, model 0x13 2021-03-07 12:34:08 +01:00
eisa
extcon extcon: Fix error handling in extcon_dev_register 2021-04-07 15:00:11 +02:00
firewire firewire: nosy: Fix a use-after-free bug in nosy_ioctl() 2021-04-07 15:00:11 +02:00
firmware Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
fpga fpga: Specify HAS_IOMEM dependency for FPGA_DFL 2020-12-01 18:46:24 +01:00
fsi fsi: Aspeed: Add mutex to protect HW access 2020-12-30 11:53:46 +01:00
gnss
gpio Merge 5.10.33 into android12-5.10 2021-04-29 13:57:47 +02:00
gpu This is the 5.10.32 stable release 2021-04-22 11:12:08 +02:00
greybus
hid Merge 5.10.33 into android12-5.10 2021-04-29 13:57:47 +02:00
hsi HSI: Fix PM usage counter unbalance in ssi_hw_init 2021-03-04 11:37:52 +01:00
hv Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind() 2021-03-04 11:37:46 +01:00
hwmon FROMLIST: hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interface 2021-03-02 17:34:33 -08:00
hwspinlock
hwtracing ANDROID: arm64: coresight: Fix a sparse warning 2021-04-09 18:38:38 +00:00
i2c ANDROID: i2c: Add vendor hook to allow assign dev_name to I2C devices 2021-05-07 07:13:22 -07:00
i3c i3c master: fix missing destroy_workqueue() on error in i3c_master_register 2021-01-06 14:56:53 +01:00
ide ide/falconide: Fix module unload 2021-03-04 11:38:21 +01:00
idle intel_idle: Build fix 2020-12-03 10:00:23 +01:00
iio iio: hid-sensor-temperature: Fix issues of timestamp channel 2021-03-25 09:04:16 +01:00
infiniband RDMA/addr: Be strict with gid size 2021-04-14 08:42:12 +02:00
input This is the 5.10.32 stable release 2021-04-22 11:12:08 +02:00
interconnect interconnect: core: fix error return code of icc_link_destroy() 2021-04-16 11:43:19 +02:00
iommu ANDROID: Fix compilation warning in __iommu_map_pages() 2021-04-13 11:27:32 +00:00
ipack
irqchip Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
isdn mISDN: fix crash in fritzpci 2021-04-10 13:36:08 +02:00
leds leds: trigger: fix potential deadlock with libata 2021-02-03 23:28:41 +01:00
lightnvm lightnvm: fix memory leak when submit fails 2021-01-27 11:55:22 +01:00
macintosh macintosh/adb-iop: Use big-endian autopoll mask 2021-03-04 11:37:42 +01:00
mailbox mailbox: sprd: correct definition of SPRD_OUTBOX_FIFO_FULL 2021-03-04 11:38:15 +01:00
mcb
md dm verity fec: fix misaligned RS roots IO 2021-04-21 13:00:54 +02:00
media FROMGIT: media: v4l: Add new Colorimetry Class 2021-04-15 15:34:36 -07:00
memory UPSTREAM: memory: mtk-smi: Allow building as module 2021-03-24 12:45:16 -07:00
memstick memstick: r592: Fix error return in r592_probe() 2020-12-30 11:53:34 +01:00
message
mfd mfd: gateworks-gsc: Fix interrupt type 2021-03-04 11:38:40 +01:00
misc Merge 5.10.34 into android12-5.10 2021-05-03 10:27:39 +02:00
mmc FROMGIT: mmc: sdhci: Check for reset prior to DMA address unmap 2021-04-30 21:19:40 +00:00
most
mtd mtd: rawnand: mtk: Fix WAITRDY break condition and timeout 2021-04-21 13:00:50 +02:00
mux
net Merge 5.10.35 into android12-5.10 2021-05-08 12:45:00 +02:00
nfc nfc: s3fwrn5: Release the nfc firmware 2020-12-30 11:53:53 +01:00
ntb
nubus
nvdimm libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC 2021-04-21 13:00:55 +02:00
nvme Revert "nvme-pci: set min_align_mask" 2021-05-08 13:21:45 +02:00
nvmem nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer 2021-03-04 11:38:39 +01:00
of Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00
opp Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
oprofile
parisc
parport
pci ANDROID: PCI: dwc: Export symbols for ep driver 2021-04-16 08:47:09 +00:00
pcmcia
perf perf/arm-cmn: Move IRQs when migrating context 2021-03-04 11:37:44 +01:00
phy phy: lantiq: rcu-usb2: wait after clock enable 2021-03-04 11:38:24 +01:00
pinctrl Merge 5.10.33 into android12-5.10 2021-04-29 13:57:47 +02:00
platform Merge 5.10.35 into android12-5.10 2021-05-08 12:45:00 +02:00
pnp
power Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
powercap UPSTREAM: powercap/drivers/dtpm: Add the experimental label to the option description 2021-03-22 15:24:47 +00:00
pps
ps3 powerpc/ps3: use dma_mapping_error() 2020-12-30 11:53:53 +01:00
ptp ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation 2021-04-10 13:36:09 +02:00
pwm Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
rapidio
ras RAS/CEC: Correct ce_add_elem()'s returned values 2021-04-14 08:42:12 +02:00
regulator Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00
remoteproc BACKPORT: FROMGIT: remoteproc: add is_iomem to da_to_va 2021-05-07 07:12:41 -07:00
reset FROMLIST: reset: reset-scmi: port driver to the new scmi_reset_proto_ops interface 2021-03-02 17:34:33 -08:00
rpmsg
rtc Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
s390 Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
sbus
scsi This is the 5.10.32 stable release 2021-04-22 11:12:08 +02:00
sfi
sh
siox
slimbus slimbus: qcom: fix potential NULL dereference in qcom_slim_prg_slew() 2020-12-30 11:53:47 +01:00
soc Merge 5.10.33 into android12-5.10 2021-04-29 13:57:47 +02:00
soundwire soundwire: intel: fix possible crash when no device is detected 2021-03-04 11:38:22 +01:00
spi Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
spmi spmi: spmi-pmic-arb: Fix hw_irq overflow 2021-03-04 11:38:40 +01:00
ssb
staging ANDROID: kernel: clear debug_kinfo precisely 2021-04-21 23:23:56 +00:00
target scsi: target: iscsi: Fix zero tag inside a trace event 2021-04-14 08:42:03 +02:00
tc
tee optee: simplify i2c access 2021-03-04 11:37:28 +01:00
thermal ANDROID: thermal: Add vendor thermal_pm_notify_suspend function 2021-05-11 15:15:04 +00:00
thunderbolt thunderbolt: Fix off by one in tb_port_find_retimer() 2021-04-14 08:42:03 +02:00
tty Merge 5.10.28 into android12-5.10 2021-04-09 09:29:17 +02:00
uio uio: Fix use-after-free in uio_unregister_device() 2020-11-09 18:54:30 +01:00
usb UPSTREAM: usb: gadget: f_uac2: validate input parameters 2021-05-12 17:00:55 +00:00
vdpa vdpa/mlx5: Set err = -ENOMEM in case dma_map_sg_attrs fails 2021-04-28 13:39:59 +02:00
vfio Merge 5.10.35 into android12-5.10 2021-05-08 12:45:00 +02:00
vhost vhost-vdpa: protect concurrent access to vhost device iotlb 2021-04-28 13:39:59 +02:00
video Merge 5.10.28 into android12-5.10 2021-04-09 09:29:17 +02:00
virt virt: vbox: Do not use wait_event_interruptible when called from kernel context 2021-03-04 11:37:18 +01:00
virtio FROMGIT: mm, page_poison: remove CONFIG_PAGE_POISONING_NO_SANITY 2021-03-24 15:09:17 -07:00
visorbus
vlynq
vme
w1 w1: w1_therm: Fix conversion result for negative temperatures 2021-03-04 11:37:18 +01:00
watchdog Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
xen xen/events: fix setting irq affinity 2021-04-16 11:43:22 +02:00
zorro
Kconfig
Makefile vdpa: mlx5: fix vdpa/vhost dependencies 2020-12-02 04:09:56 -05:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:11:30 +00:00