linux-stable/drivers/bluetooth
Linus Torvalds 279e54536d tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer
[ Upstream commit 3b830a9c34 ]

The tty line discipline .read() function was passed the final user
pointer destination as an argument, which doesn't match the 'write()'
function, and makes it very inconvenient to do a splice method for
ttys.

This is a conversion to use a kernel buffer instead.

NOTE! It does this by passing the tty line discipline ->read() function
an additional "cookie" to fill in, and an offset into the cookie data.

The line discipline can fill in the cookie data with its own private
information, and then the reader will repeat the read until either the
cookie is cleared or it runs out of data.

The only real user of this is N_HDLC, which can use this to handle big
packets, even if the kernel buffer is smaller than the whole packet.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 11:37:36 +01:00
..
ath3k.c Bluetooth: ath3k: use usb_control_msg_send() and usb_control_msg_recv() 2020-09-25 16:33:59 +02:00
bcm203x.c Bluetooth: Use fallthrough pseudo-keyword 2020-07-10 19:09:42 +02:00
bfusb.c Bluetooth: bfusb: Switch from BT_ERR to bt_dev_err where possible 2020-03-11 10:05:50 +02:00
bluecard_cs.c Bluetooth: Use fallthrough pseudo-keyword 2020-07-10 19:09:42 +02:00
bpa10x.c Bluetooth: bpa10x: change return value 2019-09-04 16:11:46 +02:00
bt3c_cs.c Bluetooth: bt3c_cs: Fix obsolete function 2018-09-27 12:57:39 +02:00
btbcm.c Bluetooth: btbcm: Added 003.006.007, changed 001.003.015 2020-05-28 10:28:12 +02:00
btbcm.h Bluetooth: btbcm: Make btbcm_setup_patchram use btbcm_finalize 2020-04-22 19:43:58 +02:00
btintel.c Bluetooth: btintel: Functions to send firmware header / payload 2020-09-14 20:30:36 +02:00
btintel.h Bluetooth: btintel: Replace zero-length array with flexible-array member 2020-10-30 16:57:41 -05:00
btmrvl_debugfs.c Bluetooth: btmrvl: Re-use kstrtol_from_user() 2018-05-30 08:16:05 +02:00
btmrvl_drv.h Bluetooth: btmrvl: Drop unused GPIO includes 2019-01-22 09:51:20 +01:00
btmrvl_main.c Bluetooth: btmrvl_sdio: Implement prevent_wake 2020-06-12 08:38:52 +02:00
btmrvl_sdio.c Bluetooth: btmrvl: eliminate duplicates introducing btmrvl_reg_89xx 2020-08-02 19:59:43 +02:00
btmrvl_sdio.h btmrvl: add platform specific wakeup interrupt support 2016-05-02 19:26:15 +02:00
btmtksdio.c Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_firmware() 2020-12-30 11:53:39 +01:00
btmtkuart.c Bluetooth: btmtkuart: Use serdev_device_write_buf() instead of serdev_device_write() 2020-06-01 08:05:07 +02:00
btqca.c Bluetooth: hci_qca: Disable SoC debug logging for WCN3991 2020-06-12 15:17:47 +02:00
btqca.h Bluetooth: hci_qca: Disable SoC debug logging for WCN3991 2020-06-12 15:17:47 +02:00
btqcomsmd.c Bluetooth: btqcomsmd: Fix a resource leak in error handling paths in the probe function 2021-03-04 11:37:20 +01:00
btrsi.c Bluetooth: btrsi: fix bt tx timeout issue 2018-09-27 12:53:40 +02:00
btrtl.c Bluetooth: btrtl: Add support for RTL8761B 2020-04-11 07:58:23 +02:00
btrtl.h Bluetooth: Replace zero-length array with flexible-array member 2020-02-28 08:30:02 +01:00
btsdio.c Bluetooth: btsdio: Check for valid packet type 2020-01-15 22:28:51 +01:00
btusb.c Bluetooth: btusb: Fix memory leak in btusb_mtk_wmt_recv 2021-03-04 11:37:27 +01:00
dtl1_cs.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
h4_recv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
hci_ag6xx.c Bluetooth: hci_uart: Replace zero-length array with flexible-array member 2020-02-13 08:28:38 +01:00
hci_ath.c Bluetooth: hci_uart: check for missing tty operations 2019-07-31 13:17:33 -07:00
hci_bcm.c Bluetooth: btbcm: Make btbcm_setup_patchram use btbcm_finalize 2020-04-22 19:43:58 +02:00
hci_bcsp.c Bluetooth: Fix invalid-free in bcsp_close() 2019-11-04 15:19:02 +01:00
hci_h4.c Bluetooth: hci_h4: Remove a redundant assignment in 'h4_flush()' 2020-02-28 08:43:57 +01:00
hci_h5.c Bluetooth: revert: hci_h5: close serdev device and free hu in h5_close 2021-01-12 20:18:16 +01:00
hci_intel.c Bluetooth: hci_intel: enable on new platform 2020-09-11 09:03:42 +02:00
hci_ldisc.c tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer 2021-03-04 11:37:36 +01:00
hci_ll.c Bluetooth: Use fallthrough pseudo-keyword 2020-07-10 19:09:42 +02:00
hci_mrvl.c Bluetooth: hci_uart: check for missing tty operations 2019-07-31 13:17:33 -07:00
hci_nokia.c Bluetooth: hci_nokia: Save a few cycles in 'nokia_enqueue()' 2019-10-16 19:26:40 +02:00
hci_qca.c Bluetooth: hci_qca: Fix memleak in qca_controller_memdump 2021-03-04 11:37:22 +01:00
hci_serdev.c Bluetooth: hci_uart: Fix a race for write_work scheduling 2021-03-04 11:37:20 +01:00
hci_uart.h Bluetooth: hci_h4: Add support for ISO packets 2020-01-15 22:28:51 +01:00
hci_vhci.c Bluetooth: hci_vhci: Add support for ISO packets 2020-01-15 22:28:51 +01:00
Kconfig Bluetooth: hci_h5: btrtl: Add support for RTL8822C 2020-02-18 09:22:22 +01:00
Makefile Bluetooth: btwilink: drop superseded driver 2019-10-16 21:12:52 +02:00