linux-stable/drivers
Tom Parkin 4cf476ced4 ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls
This new ioctl pair allows two ppp channels to be bridged together:
frames arriving in one channel are transmitted in the other channel
and vice versa.

The practical use for this is primarily to support the L2TP Access
Concentrator use-case.  The end-user session is presented as a ppp
channel (typically PPPoE, although it could be e.g. PPPoA, or even PPP
over a serial link) and is switched into a PPPoL2TP session for
transmission to the LNS.  At the LNS the PPP session is terminated in
the ISP's network.

When a PPP channel is bridged to another it takes a reference on the
other's struct ppp_file.  This reference is dropped when the channels
are unbridged, which can occur either explicitly on userspace calling
the PPPIOCUNBRIDGECHAN ioctl, or implicitly when either channel in the
bridge is unregistered.

In order to implement the channel bridge, struct channel is extended
with a new field, 'bridge', which points to the other struct channel
making up the bridge.

This pointer is RCU protected to avoid adding another lock to the data
path.

To guard against concurrent writes to the pointer, the existing struct
channel lock 'upl' coverage is extended rather than adding a new lock.

The 'upl' lock is used to protect the existing unit pointer.  Since the
bridge effectively replaces the unit (they're mutually exclusive for a
channel) it makes coding easier to use the same lock to cover them
both.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-12-10 13:57:36 -08:00
..
accessibility TTY fixes for 5.10-rc5 2020-11-22 11:52:10 -08:00
acpi arm64 fixes for -rc6 2020-11-27 10:44:59 -08:00
amba
android task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
ata libata-5.10-2020-10-30 2020-10-30 14:51:01 -07:00
atm Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-19 19:08:46 -08:00
auxdisplay
base driver core: auxiliary bus: minor coding style tweaks 2020-12-04 13:30:59 +01:00
bcma
block loop: Fix occasional uevent drop 2020-11-12 13:59:04 -07:00
bluetooth Bluetooth: btusb: Add workaround for remote-wakeup issues with Barrot 8041a02 fake CSR controllers 2020-12-07 17:01:54 +02:00
bus wireless-drivers-next patches for v5.11 2020-12-04 10:56:37 -08:00
cdrom
char Char/Misc driver fixes for 5.10-rc4 2020-11-15 10:15:17 -08:00
clk clk: imx8m: fix bus critical clk registration 2020-11-04 17:13:12 -08:00
clocksource treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
connector
counter counter/ti-eqep: Fix regmap max_register 2020-11-01 17:17:31 +00:00
cpufreq Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-11-23 12:55:01 +01:00
cpuidle cpuidle: tegra: Annotate tegra_pm_set_cpu_in_lp2() with RCU_NONIDLE 2020-11-16 13:24:32 +01:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-06 17:33:38 -08:00
dax mm: fix phys_to_target_node() and memory_add_physaddr_to_nid() exports 2020-11-22 10:48:22 -08:00
dca
devfreq
dio
dma dmaengine fixes for v5.10-rc5 2020-11-20 10:23:49 -08:00
dma-buf dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
edac
eisa
extcon
firewire
firmware More EFI fixes for v5.10-rc: 2020-11-29 10:18:53 -08:00
fpga
fsi
gnss
gpio gpio: sifive: Fix SiFive gpio probe 2020-11-11 09:53:09 +01:00
gpu A bunch of fixes for vc4 fixing some coexistence issue between wifi and 2020-11-27 09:39:51 +10:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-11-22 14:36:06 -08:00
hsi
hv hyperv-fixes for 5.10-rc5 2020-11-16 15:02:33 -08:00
hwmon hwmon: (amd_energy) modify the visibility of the counters 2020-11-13 06:46:20 -08:00
hwspinlock
hwtracing coresight: cti: Initialize dynamic sysfs attributes 2020-10-29 20:10:25 +01:00
i2c i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED 2020-11-06 16:02:00 +01:00
i3c * Fix DAA for the pre-reserved address case 2020-10-17 11:01:01 -07:00
ide
idle intel_idle: Fix intel_idle() vs tracing 2020-11-24 16:47:36 +01:00
iio iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode 2020-11-14 17:33:47 +00:00
infiniband Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2020-12-07 18:36:21 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-11-17 12:00:40 -08:00
interconnect interconnect: fix memory trashing in of_count_icc_providers() 2020-11-20 16:01:35 +02:00
iommu iommu fixes for -rc6 2020-11-27 10:41:19 -08:00
ipack
irqchip irqchip fixes for Linux 5.10, take #2 2020-11-25 00:56:28 +01:00
isdn net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
leds
lightnvm lightnvm: fix out-of-bounds write to array devices->info[] 2020-10-16 09:28:45 -06:00
macintosh powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
mailbox ARM: SoC-related driver updates 2020-10-24 10:39:22 -07:00
mcb
md - Improve DM core's bio splitting to use blk_max_size_offset(). Also 2020-10-14 15:05:38 -07:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
memory ARM: SoC-related driver updates 2020-10-24 10:39:22 -07:00
memstick
message scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() 2020-10-26 16:57:18 -04:00
mfd - New Drivers 2020-10-14 15:56:58 -07:00
misc habanalabs/gaudi: fix missing code in ECC handling 2020-11-23 20:08:43 +02:00
mmc mmc: sdhci-of-arasan: Issue DLL reset explicitly 2020-11-17 12:44:44 +01:00
most
mtd mtd: rawnand: socrates: Move the ECC initialization to ->attach_chip() 2020-11-20 12:31:26 +01:00
mux
net ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls 2020-12-10 13:57:36 -08:00
nfc nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c module 2020-12-09 16:49:46 -08:00
ntb Bug fixes for v5.10 2020-10-25 11:12:31 -07:00
nubus
nvdimm
nvme nvme: fix memory leak freeing command effects 2020-11-14 09:57:55 +01:00
nvmem
of of/address: Fix of_node memory leak in of_dma_is_coherent 2020-11-11 17:10:16 -06:00
opp opp: Reduce the size of critical section in _opp_table_kref_release() 2020-10-27 13:21:03 +05:30
oprofile
parisc
parport
pci PCI: mvebu: Fix duplicate resource requests 2020-11-04 13:55:30 -06:00
pcmcia
perf
phy phy: mediatek: fix spelling mistake in Kconfig "veriosn" -> "version" 2020-11-16 13:21:28 +05:30
pinctrl intel-pinctrl for v5.10-2 2020-11-10 15:35:41 +01:00
platform platform/x86: touchscreen_dmi: Add info for the Irbis TW118 tablet 2020-11-26 15:49:16 +01:00
pnp PNP: fix kernel-doc markups 2020-10-27 19:23:04 +01:00
power ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
powercap Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2020-11-10 10:02:31 -08:00
pps
ps3
ptp ptp: clockmatrix: deprecate firmware older than 4.8.7 2020-12-09 15:00:55 -08:00
pwm pwm: sl28cpld: fix getting driver data in pwm callbacks 2020-12-03 09:57:37 -08:00
rapidio rapidio: fix the missed put_device() for rio_mport_add_riodev 2020-10-16 11:11:22 -07:00
ras
regulator regulator: ti-abb: Fix array out of bound read access on the first transition 2020-11-18 17:59:24 +00:00
remoteproc remoteproc updates for v5.10 2020-10-22 12:56:33 -07:00
reset ARM: SoC-related driver updates 2020-10-24 10:39:22 -07:00
rpmsg rpmsg updates for 5.10 2020-10-22 12:58:21 -07:00
rtc RTC for 5.10 2020-10-21 11:22:08 -07:00
s390 s390/qeth: make qeth_qdio_handle_aob() more robust 2020-12-07 06:55:21 -08:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
sfi
sh
siox
slimbus
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
soundwire
spi spi: dw: Fix spi registration for controllers overriding CS 2020-11-25 12:54:05 +00:00
spmi
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
target SCSI fixes on 20201120 2020-11-20 16:24:28 -08:00
tc
tee ARM: SoC fixes for v5.10, part 3 2020-11-27 14:48:03 -08:00
thermal thermal: ti-soc-thermal: Disable the CPU PM notifier for OMAP4430 2020-11-12 12:30:29 +01:00
thunderbolt thunderbolt: Add support for Intel Tiger Lake-H 2020-11-06 16:39:11 +03:00
tty serial: ar933x_uart: disable clk on error handling path in probe 2020-11-12 09:41:07 +01:00
uio uio: Fix use-after-free in uio_unregister_device() 2020-11-09 18:54:30 +01:00
usb usb: typec: stusb160x: fix power-opmode property with typec-power-opmode 2020-11-27 14:44:26 +01:00
vdpa Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2020-12-07 18:36:21 -08:00
vfio vfio/pci: Bypass IGD init in case of -ENODEV 2020-11-03 11:07:40 -07:00
vhost vhost_vdpa: return -EFAULT if copy_to_user() fails 2020-12-02 04:36:40 -05:00
video hyperv-fixes for 5.10-rc6 2020-11-23 15:29:03 -08:00
virt nitro_enclaves: Fixup type and simplify logic of the poll mask setup 2020-11-09 18:20:36 +01:00
virtio vhost,vdpa,virtio: cleanups, fixes 2020-10-23 11:00:57 -07:00
visorbus
vlynq
vme
w1
watchdog ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
xen swiotlb: remove the tbl_dma_addr argument to swiotlb_tbl_map_single 2020-11-02 10:10:39 -05:00
zorro
Kconfig
Makefile vdpa: mlx5: fix vdpa/vhost dependencies 2020-12-02 04:09:56 -05:00