android_kernel_sony_sdm845/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Xie He a42d588fbd drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values
[ Upstream commit 8306266c1d51aac9aa7aa907fe99032a58c6382c ]

The fr_hard_header function is used to prepend the header to skbs before
transmission. It is used in 3 situations:
1) When a control packet is generated internally in this driver;
2) When a user sends an skb on an Ethernet-emulating PVC device;
3) When a user sends an skb on a normal PVC device.

These 3 situations need to be handled differently by fr_hard_header.
Different headers should be prepended to the skb in different situations.

Currently fr_hard_header distinguishes these 3 situations using
skb->protocol. For situation 1 and 2, a special skb->protocol value
will be assigned before calling fr_hard_header, so that it can recognize
these 2 situations. All skb->protocol values other than these special ones
are treated by fr_hard_header as situation 3.

However, it is possible that in situation 3, the user sends an skb with
one of the special skb->protocol values. In this case, fr_hard_header
would incorrectly treat it as situation 1 or 2.

This patch tries to solve this issue by using skb->dev instead of
skb->protocol to distinguish between these 3 situations. For situation
1, skb->dev would be NULL; for situation 2, skb->dev->type would be
ARPHRD_ETHER; and for situation 3, skb->dev->type would be ARPHRD_DLCI.

This way fr_hard_header would be able to distinguish these 3 situations
correctly regardless what skb->protocol value the user tries to use in
situation 3.

Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-10 10:23:54 +01:00
..
accessibility
acpi ACPI: EC: Reference count query handlers under lock 2020-10-01 20:40:05 +02:00
amba
android binder: Prevent context manager from incrementing ref 0 2020-08-21 11:01:55 +02:00
ata ata: sata_rcar: Fix DMA boundary mask 2020-11-10 10:23:51 +01:00
atm atm: eni: fix the missed pci_disable_device() for eni_init_one() 2020-10-01 20:40:17 +02:00
auxdisplay
base driver core: Fix probe_count imbalance in really_probe() 2020-10-14 09:48:15 +02:00
bcma bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA 2020-01-29 10:24:31 +01:00
block rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2020-09-23 08:46:12 +02:00
bluetooth Bluetooth: btusb: fix PM leak in error case of setup 2020-01-12 11:24:16 +01:00
bus bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads 2020-04-24 07:58:46 +02:00
cdrom cdrom: respect device capabilities during opening action 2020-01-04 13:41:02 +01:00
char drivers: char: tlclk.c: Avoid data race between init and interrupt handler 2020-10-01 20:40:12 +02:00
clk clk: bcm2835: add missing release if devm_clk_hw_register fails 2020-10-29 09:05:40 +01:00
clocksource clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() 2020-10-01 20:40:17 +02:00
connector
cpufreq cpufreq: sti-cpufreq: add stih418 support 2020-11-10 10:23:53 +01:00
cpuidle cpuidle: Fix three reference count leaks 2020-06-20 10:24:18 +02:00
crypto crypto: ccp - fix error handling 2020-10-29 09:05:41 +01:00
dax
dca
devfreq PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out 2020-10-01 20:40:02 +02:00
dio
dma dmaengine: tegra-apb: Prevent race conditions on channel's freeing 2020-10-01 20:40:08 +02:00
dma-buf dma-buf: Fix memory leak in sync_file_merge() 2019-12-21 10:42:32 +01:00
edac EDAC/i5100: Fix error handling order in i5100_init_one() 2020-10-29 09:05:32 +01:00
eisa
extcon extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()' 2020-06-30 15:38:28 -04:00
firewire net: add annotations on hh->hh_len lockless accesses 2020-01-12 11:24:19 +01:00
firmware efi: Make it possible to disable efivar_ssdt entirely 2020-07-09 09:35:57 +02:00
fmc
fpga
gpio gpio: tc35894: fix up tc35894 interrupt configuration 2020-10-14 09:48:12 +02:00
gpu Fix use after free in get_capset_info callback. 2020-10-29 09:05:45 +01:00
hid HID: roccat: add bounds checking in kone_sysfs_write_settings() 2020-10-29 09:05:35 +01:00
hsi
hv Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload 2020-09-23 08:46:15 +02:00
hwmon hwmon: (applesmc) check status earlier. 2020-09-12 11:47:32 +02:00
hwspinlock
hwtracing intel_th: Fix user-visible error codes 2020-04-02 17:20:25 +02:00
i2c i2c: cpm: Fix i2c_ram structure 2020-10-14 09:48:13 +02:00
ide block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-12 11:47:36 +02:00
idle
iio iio:accel:mma8452: Fix timestamp alignment and prevent data leak. 2020-09-23 08:46:11 +02:00
infiniband IB/rdmavt: Fix sizeof mismatch 2020-10-29 09:05:39 +01:00
input Input: sun4i-ps2 - fix handling of platform_get_irq() error 2020-10-29 09:05:40 +01:00
iommu iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() 2020-10-14 09:48:13 +02:00
ipack
irqchip irqchip/gic: Atomically update affinity 2020-07-22 09:10:54 +02:00
isdn staging: gigaset: add endpoint-type sanity check 2019-12-21 10:41:50 +01:00
leds leds: core: Flush scheduled work for system suspend 2020-08-21 11:02:01 +02:00
lguest
lightnvm
macintosh drivers/macintosh: Fix memleak in windfarm_pm112 driver 2020-06-20 10:24:21 +02:00
mailbox
mcb
md bcache: fix a lost wake-up problem caused by mca_cannibalize_lock 2020-10-01 20:40:03 +02:00
media media: tw5864: check status of tw5864_frameinterval_get 2020-11-10 10:23:53 +01:00
memory memory: fsl-corenet-cf: Fix handling of platform_get_irq() error 2020-10-29 09:05:40 +01:00
memstick
message scsi: mptscsih: Fix read sense data size 2020-07-22 09:10:45 +02:00
mfd misc: rtsx: Fix memory leak in rtsx_pci_probe 2020-10-29 09:05:44 +01:00
misc eeprom: at25: set minimum read/write access stride to 1 2020-10-29 09:05:46 +01:00
mmc mmc: via-sdmmc: Fix data race bug 2020-11-10 10:23:53 +01:00
mtd mtd: mtdoops: Don't write panic data twice 2020-10-29 09:05:38 +01:00
net drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values 2020-11-10 10:23:54 +01:00
nfc NFC: st95hf: Fix memleak in st95hf_in_send_cmd 2020-09-23 08:46:09 +02:00
ntb NTB: hw: amd: fix an issue about leak system resources 2020-10-29 09:05:41 +01:00
nubus
nvdimm block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-12 11:47:36 +02:00
nvme nvmet: fix uninitialized work for zero kato 2020-10-29 09:05:41 +01:00
nvmem nvmem: qfprom: remove incorrect write support 2020-06-11 09:22:22 +02:00
of of: unittest: kmemleak in of_unittest_platform_populate() 2020-04-24 07:59:10 +02:00
oprofile
parisc parisc: mask out enable and reserved bits from sba imask 2020-08-21 11:02:06 +02:00
parport parport: load lowlevel driver if ports not found 2020-01-04 13:39:55 +01:00
pci PCI: Fix pci_create_slot() reference count leak 2020-09-03 11:21:17 +02:00
pcmcia
perf
phy phy: samsung: s5pv210-usb2: Add delay after reset 2020-10-01 20:40:12 +02:00
pinctrl pinctrl-single: fix pcs_parse_pinconf() return value 2020-08-21 11:02:04 +02:00
platform platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse 2020-10-14 09:48:15 +02:00
pnp
power power: supply: check if calc_soc succeeded in pm860x_init_battery 2020-08-21 11:02:03 +02:00
powercap
pps
ps3
ptp ptp: free ptp device pin descriptors properly 2020-05-20 08:15:33 +02:00
pwm pwm: bcm-iproc: handle clk_get_rate() return 2020-08-21 11:02:10 +02:00
rapidio rapidio: fix the missed put_device() for rio_mport_add_riodev 2020-10-29 09:05:39 +01:00
ras
regulator regulator: resolve supply after creating regulator 2020-10-29 09:05:33 +01:00
remoteproc remoteproc: Fix wrong rvring index computation 2020-05-02 17:23:14 +02:00
reset reset: Fix potential use-after-free in __of_reset_control_get() 2019-11-25 09:53:42 +01:00
rpmsg
rtc rtc: pm8xxx: Fix issue in RTC write path 2020-04-24 07:59:09 +02:00
s390 s390/cio: add cond_resched() in the slow_eval_known_fn() loop 2020-09-03 11:21:19 +02:00
sbus
scsi scsi: ibmvfc: Fix error return in ibmvfc_probe() 2020-10-29 09:05:45 +01:00
sfi
sh
sn
soc soc: qcom: smem: Use le32_to_cpu for comparison 2020-04-24 07:59:10 +02:00
spi spi: spi-loopback-test: Fix out-of-bounds read 2020-09-23 08:46:14 +02:00
spmi
ssb
staging staging: comedi: check validity of wMaxPacketSize of usb endpoints found 2020-10-17 11:02:20 +02:00
target scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem 2020-09-23 08:46:12 +02:00
tc
thermal thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 2020-09-12 11:47:34 +02:00
thunderbolt
tty tty: ipwireless: fix error handling 2020-10-29 09:05:45 +01:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-22 09:10:53 +02:00
usb USB: adutux: fix debugging 2020-11-10 10:23:53 +01:00
uwb
vfio vfio/pci: Clear token on bypass registration failure 2020-10-29 09:05:40 +01:00
vhost vhost: vsock: kick send_pkt worker once device is started 2020-05-10 10:28:00 +02:00
video video: fbdev: pvr2fb: initialize variables 2020-11-10 10:23:53 +01:00
virt drivers/virt/fsl_hypervisor: Fix error handling path 2020-10-29 09:05:35 +01:00
virtio virtio_ring: Avoid loop when vq is broken in virtqueue_poll 2020-08-26 10:29:05 +02:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-28 15:42:33 +01:00
w1 w1: omap-hdq: cleanup to add missing newline for some dev_dbg 2020-06-20 10:24:22 +02:00
watchdog watchdog: f71808e_wdt: clear watchdog timeout occurred flag 2020-08-21 11:02:09 +02:00
xen xen/xenbus: Fix granting of vmalloc'd memory 2020-09-12 11:47:32 +02:00
zorro
Kconfig
Makefile