linux_dsm_epyc7002/drivers
Linus Torvalds ef67e445e9 tty: fix up iterate_tty_read() EOVERFLOW handling
commit e71a8d5cf4b4f274740e31b601216071e2a11afa upstream.

When I converted the tty_ldisc_ops 'read()' function to take a kernel
pointer, I was a bit too aggressive about the ldisc returning EOVERFLOW.

Yes, we want to have EOVERFLOW override any partially read data (because
the whole point is that the buffer was too small for the whole packet,
and we don't want to see partial packets), but it shouldn't override a
previous EFAULT.

And in fact, it really is just EOVERFLOW that is special and should
throw away any partially read data, not "any error".  Admittedly
EOVERFLOW is currently the only one that can happen for a continuation
read - and if the first read iteration returns an error we won't have this issue.

So this is more of a technicality, but let's just make the intent very
explicit, and re-organize the error handling a bit so that this is all
clearer.

Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/CAHk-=wh+-rGsa=xruEWdg_fJViFG8rN9bpLrfLz=_yBYh2tBhA@mail.gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-07 12:34:16 +01:00
..
accessibility
acpi ACPI: configfs: add missing check after configfs_register_default_group() 2021-03-04 11:38:22 +01:00
amba amba: Fix resource leak for drivers without .remove 2021-03-04 11:38:02 +01:00
android
ata ata: ahci_brcm: Add back regulators management 2021-03-04 11:37:45 +01:00
atm
auxdisplay auxdisplay: ht16k33: Fix refresh rate handling 2021-03-04 11:38:00 +01:00
base regmap: sdw: use _no_pm functions in regmap_read/write 2021-03-04 11:38:15 +01:00
bcma
block zsmalloc: account the number of compacted pages correctly 2021-03-07 12:34:15 +01:00
bluetooth Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl 2021-03-07 12:34:09 +01:00
bus
cdrom
char KEYS: trusted: Reserve TPM for seal and unseal operations 2021-03-04 11:38:29 +01:00
clk clk: aspeed: Fix APLL calculate formula from ast2600-A2 2021-03-04 11:38:06 +01:00
clocksource clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined 2021-03-04 11:37:57 +01:00
connector
counter counter:ti-eqep: remove floor 2021-01-27 11:55:12 +01:00
cpufreq cpufreq: intel_pstate: Get per-CPU max freq via MSR_HWP_CAPABILITIES if available 2021-03-04 11:38:42 +01:00
cpuidle
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 dmaengine: idxd: set DMA channel to be private 2021-03-04 11:37:57 +01:00
dma-buf dmabuf: fix use-after-free of dmabuf's file->f_inode 2021-01-12 20:18:24 +01:00
edac EDAC/amd64: Do not load on family 0x15, model 0x13 2021-03-07 12:34:08 +01:00
eisa
extcon
firewire
firmware firmware: arm_scmi: Fix call site of scmi_notification_exit 2021-03-04 11:37:23 +01:00
fpga
fsi
gnss
gpio gpio: pcf857x: Fix missing first interrupt 2021-03-04 11:38:40 +01:00
gpu drm/amd/amdgpu: add error handling to amdgpu_virt_read_pf2vf_data 2021-03-07 12:34:12 +01:00
greybus
hid HID: wacom: Ignore attempts to overwrite the touch_max value from HID 2021-03-04 11:38:23 +01: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 hwmon: (dell-smm) Add XPS 15 L502X to fan control blacklist 2021-02-26 10:13:00 +01:00
hwspinlock
hwtracing coresight: etm4x: Handle accesses to TRCSTALLCTLR 2021-03-04 11:38:37 +01:00
i2c i2c: exynos5: Preserve high speed master code 2021-03-04 11:38:20 +01:00
i3c
ide ide/falconide: Fix module unload 2021-03-04 11:38:21 +01:00
idle
iio iio: adc: ti_am335x_adc: remove omitted iio_kfifo_free() 2021-01-27 11:55:12 +01:00
infiniband RDMA/rtrs-srv: Do not signal REG_MR 2021-03-07 12:34:06 +01:00
input Input: elan_i2c - add new trackpoint report type 0x5F 2021-03-07 12:34:04 +01:00
interconnect interconnect: imx8mq: Use icc_sync_state 2021-01-27 11:55:29 +01:00
iommu iommu/arm-smmu-qcom: Fix mask extraction for bootloader programmed SMRs 2021-03-04 11:38:35 +01:00
ipack
irqchip irqchip/loongson-pch-msi: Use bitmap_zalloc() to allocate bitmap 2021-03-04 11:38:42 +01:00
isdn misdn: dsp: select CONFIG_BITREVERSE 2021-01-19 18:27:26 +01: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 era: only resize metadata in preresume 2021-03-04 11:38:46 +01:00
media media: uvcvideo: Allow entities with no pads 2021-03-07 12:34:12 +01:00
memory memory: ti-aemif: Drop child node when jumping out loop 2021-03-04 11:37:25 +01:00
memstick
message
mfd mfd: gateworks-gsc: Fix interrupt type 2021-03-04 11:38:40 +01:00
misc mei: me: add adler lake point LP DID 2021-03-04 11:38:40 +01:00
mmc mmc: sdhci-pci-o2micro: Bug fix for SDR104 HW tuning failure 2021-03-04 11:38:39 +01:00
most
mtd mtd: spi-nor: hisi-sfc: Put child node np on error path 2021-03-04 11:38:37 +01:00
mux
net xen-netback: respect gnttab_map_refs()'s return value 2021-03-07 12:34:15 +01:00
nfc
ntb
nubus
nvdimm libnvdimm/dimm: Avoid race between probe and available_slots_show() 2021-02-10 09:29:17 +01:00
nvme nvme-tcp: add clean action for failed reconnection 2021-03-07 12:34:12 +01:00
nvmem nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer 2021-03-04 11:38:39 +01:00
of of/fdt: Make sure no-map does not remove already reserved regions 2021-03-04 11:37:56 +01:00
opp opp: Correct debug message in _opp_add_static_v2() 2021-03-04 11:37:27 +01:00
oprofile
parisc
parport
pci PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse 2021-03-07 12:34:11 +01: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 pinctrl: qcom: Don't clear pending interrupts when enabling 2021-01-27 11:55:27 +01:00
platform platform/chrome: cros_ec_proto: Add LID and BATTERY to default mask 2021-03-04 11:37:58 +01:00
pnp
power power: supply: smb347-charger: Fix interrupt usage if interrupt is unavailable 2021-03-04 11:37:59 +01:00
powercap
pps
ps3
ptp phy: dp83640: select CONFIG_CRC32 2021-01-17 14:17:02 +01:00
pwm pwm: iqs620a: Fix overflow and optimize calculations 2021-03-04 11:38:17 +01:00
rapidio
ras
regulator regulator: bd718x7, bd71828, Fix dvs voltage levels 2021-03-04 11:38:07 +01:00
remoteproc remoteproc/mediatek: Fix kernel test robot warning 2021-03-07 12:34:15 +01:00
reset
rpmsg
rtc rtc: zynqmp: depend on HAS_IOMEM 2021-03-04 11:38:03 +01:00
s390 virtio/s390: implement virtio-ccw revision 2 correctly 2021-03-04 11:38:42 +01:00
sbus
scsi scsi: iscsi: Verify lengths on passthrough PDUs 2021-03-07 12:34:14 +01:00
sfi
sh
siox
slimbus
soc soc: samsung: exynos-asv: handle reading revision register error 2021-03-04 11:38:32 +01:00
soundwire soundwire: intel: fix possible crash when no device is detected 2021-03-04 11:38:22 +01:00
spi spi: spi-synquacer: fix set_cs handling 2021-03-04 11:38:43 +01:00
spmi spmi: spmi-pmic-arb: Fix hw_irq overflow 2021-03-04 11:38:40 +01:00
ssb
staging staging: bcm2835-audio: Replace unsafe strcpy() with strscpy() 2021-03-07 12:34:10 +01:00
target cxgb4/chtls/cxgbit: Keeping the max ofld immediate data size same in cxgb4 and ulds 2021-03-04 11:37:34 +01:00
tc
tee optee: simplify i2c access 2021-03-04 11:37:28 +01:00
thermal thermal: cpufreq_cooling: freq_qos_update_request() returns < 0 on error 2021-03-04 11:38:41 +01:00
thunderbolt thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() 2021-02-10 09:29:15 +01:00
tty tty: fix up iterate_tty_read() EOVERFLOW handling 2021-03-07 12:34:16 +01:00
uio
usb USB: serial: mos7720: fix error code in mos7720_write() 2021-03-04 11:38:24 +01:00
vdpa vdpa/mlx5: fix param validation in mlx5_vdpa_get_config() 2021-03-04 11:37:17 +01:00
vfio vfio/type1: Use follow_pte() 2021-03-04 11:38:17 +01:00
vhost
video udlfb: Fix memory leak in dlfb_usb_probe 2021-03-07 12:34:04 +01:00
virt virt: vbox: Do not use wait_event_interruptible when called from kernel context 2021-03-04 11:37:18 +01:00
virtio
visorbus
vlynq
vme
w1 w1: w1_therm: Fix conversion result for negative temperatures 2021-03-04 11:37:18 +01:00
watchdog watchdog: mei_wdt: request stop on unregister 2021-03-04 11:38:36 +01:00
xen xen-scsiback: don't "handle" error by BUG() 2021-02-23 15:53:24 +01:00
zorro
Kconfig
Makefile