5.5.1-stable review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 5.5.1-stable review
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.5.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.5.1-rc1
Paul Cercueil <[email protected]>
power/supply: ingenic-battery: Don't change scale if there's only one
Johannes Berg <[email protected]>
Revert "um: Enable CONFIG_CONSTRUCTORS"
Andrew Murray <[email protected]>
KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE
Herbert Xu <[email protected]>
crypto: pcrypt - Fix user-after-free on module unload
Iuliana Prodan <[email protected]>
crypto: caam - do not reset pointer size from MCFGR register
Daniel Axtens <[email protected]>
crypto: vmx - reject xts inputs that are too short
Herbert Xu <[email protected]>
crypto: af_alg - Use bh_lock_sock in sk_destruct
Johan Hovold <[email protected]>
rsi: fix non-atomic allocation in completion handler
Johan Hovold <[email protected]>
rsi: fix memory leak on failed URB submission
Johan Hovold <[email protected]>
rsi: fix use-after-free on probe errors
Johan Hovold <[email protected]>
rsi: fix use-after-free on failed probe and unbind
David Howells <[email protected]>
rxrpc: Fix use-after-free in rxrpc_receive_data()
Stephen Worley <[email protected]>
net: include struct nhmsg size in nh nlmsg size
Christophe JAILLET <[email protected]>
mlxsw: minimal: Fix an error handling path in 'mlxsw_m_port_create()'
Willem de Bruijn <[email protected]>
udp: segment looped gso packets correctly
Lorenzo Bianconi <[email protected]>
net: socionext: fix xdp_result initialization in netsec_process_rx
Lorenzo Bianconi <[email protected]>
net: socionext: fix possible user-after-free in netsec_process_rx
Cong Wang <[email protected]>
net_sched: walk through all child classes in tc_bind_tclass()
Cong Wang <[email protected]>
net_sched: fix ops->bind_class() implementations
Eric Dumazet <[email protected]>
net_sched: ematch: reject invalid TCF_EM_SIMPLE
Sven Auhagen <[email protected]>
mvneta driver disallow XDP program on hardware buffer management
Johan Hovold <[email protected]>
zd1211rw: fix storage endpoint lookup
Johan Hovold <[email protected]>
rtl8xxxu: fix interface sanity check
Johan Hovold <[email protected]>
brcmfmac: fix interface sanity check
Johan Hovold <[email protected]>
ath9k: fix storage endpoint lookup
Paulo Alcantara (SUSE) <[email protected]>
cifs: Fix memory allocation in __smb2_handle_cancelled_cmd()
Ronnie Sahlberg <[email protected]>
cifs: set correct max-buffer-size for smb2_ioctl_init()
Vincent Whitchurch <[email protected]>
CIFS: Fix task struct use-after-free on reconnect
Eric Biggers <[email protected]>
crypto: chelsio - fix writing tfm flags to wrong place
Guenter Roeck <[email protected]>
driver core: Fix test_async_driver_probe if NUMA is disabled
Andy Shevchenko <[email protected]>
iio: st_gyro: Correct data for LSM9DS0 gyro
Olivier Moysan <[email protected]>
iio: adc: stm32-dfsdm: fix single conversion
Tomas Winkler <[email protected]>
mei: me: add jasper point DID
Tomas Winkler <[email protected]>
mei: me: add comet point (lake) H device ids
Tomas Winkler <[email protected]>
mei: hdcp: bind only with i915 on the same PCH
Martin Fuzzey <[email protected]>
binder: fix log spam for existing debugfs file creation.
Lubomir Rintel <[email protected]>
component: do not dereference opaque pointer in debugfs
Eric Snowberg <[email protected]>
debugfs: Return -EPERM when locked down
Uwe Kleine-König <[email protected]>
serial: imx: fix a race condition in receive path
Lukas Wunner <[email protected]>
serial: 8250_bcm2835aux: Fix line mismatch on driver unbind
Malcolm Priestley <[email protected]>
staging: vt6656: Fix false Tx excessive retries reporting.
Malcolm Priestley <[email protected]>
staging: vt6656: use NULLFUCTION stack on mac80211
Malcolm Priestley <[email protected]>
staging: vt6656: correct packet types for CTS protect, mode.
Colin Ian King <[email protected]>
staging: wlan-ng: ensure error return is actually returned
Andrey Shvetsov <[email protected]>
staging: most: net: fix buffer overflow
Thomas Hebb <[email protected]>
usb: typec: fusb302: fix "op-sink-microwatt" default that was in mW
Thomas Hebb <[email protected]>
usb: typec: wcove: fix "op-sink-microwatt" default that was in mW
Bin Liu <[email protected]>
usb: dwc3: turn off VBUS when leaving host mode
Johan Hovold <[email protected]>
USB: serial: ir-usb: fix IrLAP framing
Johan Hovold <[email protected]>
USB: serial: ir-usb: fix link-speed handling
Johan Hovold <[email protected]>
USB: serial: ir-usb: add missing endpoint sanity check
Peter Robinson <[email protected]>
usb: host: xhci-tegra: set MODULE_FIRMWARE for tegra186
Heikki Krogerus <[email protected]>
usb: dwc3: pci: add ID for the Intel Comet Lake -V variant
Johan Hovold <[email protected]>
rsi_91x_usb: fix interface sanity check
Johan Hovold <[email protected]>
orinoco_usb: fix interface sanity check
Johan Hovold <[email protected]>
Bluetooth: btusb: fix non-atomic allocation in completion handler
-------------
Diffstat:
Makefile | 4 +- arch/arm64/kvm/debug.c | 6 +- arch/um/include/asm/common.lds.S | 2 +- arch/um/kernel/dyn.lds.S | 1 + crypto/af_alg.c | 6 +- crypto/pcrypt.c | 3 +- drivers/android/binder.c | 37 +++--- drivers/base/component.c | 8 +- drivers/base/test/test_async_driver_probe.c | 3 +- drivers/bluetooth/btusb.c | 2 +- drivers/crypto/caam/ctrl.c | 6 +- drivers/crypto/chelsio/chcr_algo.c | 16 +-- drivers/crypto/vmx/aes_xts.c | 3 + drivers/iio/adc/stm32-dfsdm-adc.c | 2 + drivers/iio/gyro/st_gyro_core.c | 75 +++++++++++- drivers/misc/mei/hdcp/mei_hdcp.c | 33 ++++- drivers/misc/mei/hw-me-regs.h | 6 + drivers/misc/mei/pci-me.c | 4 + drivers/net/ethernet/marvell/mvneta.c | 6 + drivers/net/ethernet/mellanox/mlxsw/minimal.c | 2 +- drivers/net/ethernet/socionext/netsec.c | 4 +- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 4 +- .../net/wireless/intersil/orinoco/orinoco_usb.c | 4 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- drivers/net/wireless/rsi/rsi_91x_hal.c | 12 +- drivers/net/wireless/rsi/rsi_91x_usb.c | 37 ++++-- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 2 +- drivers/power/supply/ingenic-battery.c | 15 ++- drivers/staging/most/net/net.c | 10 ++ drivers/staging/vt6656/device.h | 2 + drivers/staging/vt6656/int.c | 6 +- drivers/staging/vt6656/main_usb.c | 1 + drivers/staging/vt6656/rxtx.c | 26 ++-- drivers/staging/wlan-ng/prism2mgmt.c | 2 +- drivers/tty/serial/8250/8250_bcm2835aux.c | 2 +- drivers/tty/serial/imx.c | 51 ++++++-- drivers/usb/dwc3/core.c | 3 + drivers/usb/dwc3/dwc3-pci.c | 4 + drivers/usb/host/xhci-tegra.c | 1 + drivers/usb/serial/ir-usb.c | 136 ++++++++++++++++----- drivers/usb/typec/tcpm/fusb302.c | 2 +- drivers/usb/typec/tcpm/wcove.c | 2 +- fs/cifs/cifsglob.h | 1 + fs/cifs/smb2misc.c | 2 +- fs/cifs/smb2ops.c | 9 +- fs/cifs/smb2transport.c | 2 + fs/cifs/transport.c | 3 + fs/debugfs/file.c | 17 +-- include/linux/usb/irda.h | 13 +- include/net/pkt_cls.h | 33 ++--- include/net/sch_generic.h | 3 +- include/net/udp.h | 3 + init/Kconfig | 1 + kernel/gcov/Kconfig | 2 +- net/ipv4/nexthop.c | 4 +- net/rxrpc/input.c | 12 +- net/sched/cls_basic.c | 11 +- net/sched/cls_bpf.c | 11 +- net/sched/cls_flower.c | 11 +- net/sched/cls_fw.c | 11 +- net/sched/cls_matchall.c | 11 +- net/sched/cls_route.c | 11 +- net/sched/cls_rsvp.h | 11 +- net/sched/cls_tcindex.c | 11 +- net/sched/cls_u32.c | 11 +- net/sched/ematch.c | 3 + net/sched/sch_api.c | 47 +++++-- 68 files changed, 591 insertions(+), 218 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/56 Bluetooth: btusb: fix non-atomic allocation in completion handler
From: Johan Hovold <[email protected]>
commit 22cc6b7a1dbb58da4afc539d9b7d470b23a25eea upstream.
USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL.
--- drivers/bluetooth/btusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btusb.c +1 -1
@@ -2602,7 +2602,7 @@ static void btusb_mtk_wmt_recv(struct ur* and being processed the events from there then. */ if (test_bit (BTUSB_TX_WAIT_VND_EVT , &data->flags)) { - data->evt_skb =skb_clone (skb,GFP_KERNEL ); + data->evt_skb =skb_clone (skb,GFP_ATOMIC );if (!data->evt_skb) goto err_out; }
Greg Kroah-Hartman
maintainerPATCH 2/56 orinoco_usb: fix interface sanity check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit b73e05aa543cf8db4f4927e36952360d71291d41 upstream.
Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface.
Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on.
--- drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/intersil/orinoco/orinoco_usb.c +2 -2
@@ -1608,9 +1608,9 @@ static int ezusb_probe(struct usb_interf/* set up the endpoint information */ /* check out the endpoints */ - iface_desc = &interface->altsetting[0 ].desc; + iface_desc = &interface->cur_altsetting->desc;for (i =0 ; i < iface_desc->bNumEndpoints; ++i) { - ep = &interface->altsetting[0 ].endpoint[i].desc; + ep = &interface->cur_altsetting->endpoint[i].desc;if (usb_endpoint_is_bulk_in (ep)) {/* we found a bulk in endpoint */
Greg Kroah-Hartman
maintainerPATCH 3/56 rsi_91x_usb: fix interface sanity check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 3139b180906af43bc09bd3373fc2338a8271d9d9 upstream.
Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface.
Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on.
--- drivers/net/wireless/rsi/rsi_91x_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rsi/rsi_91x_usb.c +1 -1
@@ -117,7 +117,7 @@ static int rsi_find_bulk_in_and_out_endp__le16 buffer_size;int ii, bin_found =0 , bout_found =0 ; - iface_desc = &(interface->altsetting[0 ]); + iface_desc = interface->cur_altsetting;for (ii =0 ; ii < iface_desc->desc.bNumEndpoints; ++ii) { endpoint = &(iface_desc->endpoint[ii].desc);
Greg Kroah-Hartman
maintainerPATCH 4/56 usb: dwc3: pci: add ID for the Intel Comet Lake -V variant
In reply to Greg Kroah-HartmanFrom: Heikki Krogerus <[email protected]>
commit f5ae8869095552e3396ee3e404f9586cc6a828f0 upstream.
There is one more Comet Lake PCH variant, CML-V, that has its own PCI ID.
--- drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/dwc3/dwc3-pci.c +4 -0
@@ -34,6 +34,7 @@#define PCI_DEVICE_ID_INTEL_GLK 0x31aa#define PCI_DEVICE_ID_INTEL_CNPLP 0x9dee#define PCI_DEVICE_ID_INTEL_CNPH 0xa36e +#define PCI_DEVICE_ID_INTEL_CNPV 0xa3b0#define PCI_DEVICE_ID_INTEL_ICLLP 0x34ee#define PCI_DEVICE_ID_INTEL_EHLLP 0x4b7e#define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee
@@ -342,6 +343,9 @@ static const struct pci_device_id dwc3_p {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_INTEL_CNPH ), (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CNPV), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICLLP), (kernel_ulong_t) &dwc3_pci_intel_properties, },
Greg Kroah-Hartman
maintainerPATCH 5/56 usb: host: xhci-tegra: set MODULE_FIRMWARE for tegra186
In reply to Greg Kroah-HartmanFrom: Peter Robinson <[email protected]>
commit e1f236efd9c579a29d7df75aa052127d0d975267 upstream.
Set the MODULE_FIRMWARE for tegra186, it's registered for 124/210 and ensures the firmware is available at the appropriate time such as in the initrd, else if the firmware is unavailable the driver fails with the following errors:
tegra-xusb 3530000.usb: Direct firmware load for nvidia/tegra186/xusb.bin failed with error -2 tegra-xusb 3530000.usb: failed to request firmware: -2
tegra-xusb 3530000.usb: failed to load firmware: -2
tegra-xusb: probe of 3530000.usb failed with error -2
--- drivers/usb/host/xhci-tegra.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-tegra.c +1 -0
@@ -1432,6 +1432,7 @@ MODULE_FIRMWARE("nvidia/tegra210/xusb.bistatic const char *const tegra186_supply_names[] = { }; +MODULE_FIRMWARE ("nvidia/tegra186/xusb.bin" );static const struct tegra_xusb_phy_type tegra186_phy_types[] = { { .name ="usb3" , .num =3 , },
Greg Kroah-Hartman
maintainerPATCH 6/56 USB: serial: ir-usb: add missing endpoint sanity check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 2988a8ae7476fe9535ab620320790d1714bdad1d upstream.
Add missing endpoint sanity check to avoid dereferencing a NULL-pointer on open() in case a device lacks a bulk-out endpoint.
Note that prior to commit f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework") the oops would instead happen on open() if the device lacked a bulk-in endpoint and on write() if it lacked a bulk-out endpoint.
--- drivers/usb/serial/ir-usb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/serial/ir-usb.c +3 -0
@@ -195,6 +195,9 @@ static int ir_startup(struct usb_serialstruct usb_irda_cs_descriptor *irda_desc;int rates; +if (serial->num_bulk_in <1 || serial->num_bulk_out <1 ) +return -ENODEV ; + irda_desc =irda_usb_find_class_desc (serial,0 );if (!irda_desc) { dev_err(&serial->dev->dev,
Greg Kroah-Hartman
maintainerPATCH 7/56 USB: serial: ir-usb: fix link-speed handling
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 17a0184ca17e288decdca8b2841531e34d49285f upstream.
Commit e0d795e4f36c ("usb: irda: cleanup on ir-usb module") added a USB IrDA header with common defines, but mistakingly switched to using the class-descriptor baud-rate bitmask values for the outbound header.
This broke link-speed handling for rates above 9600 baud, but a device would also be able to operate at the default 9600 baud until a link-speed request was issued (e.g. using the TCGETS ioctl).
--- drivers/usb/serial/ir-usb.c | 20 ++++++++++---------- include/linux/usb/irda.h | 13 ++++++++++++- 2 files changed, 22 insertions(+), 11 deletions(-)
drivers/usb/serial/ir-usb.c +10 -10
@@ -335,34 +335,34 @@ static void ir_set_termios(struct tty_stswitch (baud) {case 2400 : - ir_baud =USB_IRDA_BR_2400 ; + ir_baud =USB_IRDA_LS_2400 ;break ;case 9600 : - ir_baud =USB_IRDA_BR_9600 ; + ir_baud =USB_IRDA_LS_9600 ;break ;case 19200 : - ir_baud =USB_IRDA_BR_19200 ; + ir_baud =USB_IRDA_LS_19200 ;break ;case 38400 : - ir_baud =USB_IRDA_BR_38400 ; + ir_baud =USB_IRDA_LS_38400 ;break ;case 57600 : - ir_baud =USB_IRDA_BR_57600 ; + ir_baud =USB_IRDA_LS_57600 ;break ;case 115200 : - ir_baud =USB_IRDA_BR_115200 ; + ir_baud =USB_IRDA_LS_115200 ;break ;case 576000 : - ir_baud =USB_IRDA_BR_576000 ; + ir_baud =USB_IRDA_LS_576000 ;break ;case 1152000 : - ir_baud =USB_IRDA_BR_1152000 ; + ir_baud =USB_IRDA_LS_1152000 ;break ;case 4000000 : - ir_baud =USB_IRDA_BR_4000000 ; + ir_baud =USB_IRDA_LS_4000000 ;break ;default : - ir_baud =USB_IRDA_BR_9600 ; + ir_baud =USB_IRDA_LS_9600 ; baud =9600 ; }
include/linux/usb/irda.h +12 -1
@@ -119,11 +119,22 @@ struct usb_irda_cs_descriptor {* 6 - 115200 bps * 7 - 576000 bps * 8 - 1.152 Mbps -* 9 - 5 mbps +* 9 - 4 Mbps * 10..15 - Reserved */ #define USB_IRDA_STATUS_LINK_SPEED 0x0f +#define USB_IRDA_LS_NO_CHANGE 0 +#define USB_IRDA_LS_2400 1 +#define USB_IRDA_LS_9600 2 +#define USB_IRDA_LS_19200 3 +#define USB_IRDA_LS_38400 4 +#define USB_IRDA_LS_57600 5 +#define USB_IRDA_LS_115200 6 +#define USB_IRDA_LS_576000 7 +#define USB_IRDA_LS_1152000 8 +#define USB_IRDA_LS_4000000 9 +/* The following is a 4-bit value used only for * outbound header: *
Greg Kroah-Hartman
maintainerPATCH 8/56 USB: serial: ir-usb: fix IrLAP framing
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 38c0d5bdf4973f9f5a888166e9d3e9ed0d32057a upstream.
Commit f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework") switched to using the generic write implementation which may combine multiple write requests into larger transfers. This can break the IrLAP protocol where end-of-frame is determined using the USB short packet mechanism, for example, if multiple frames are sent in rapid succession.
--- drivers/usb/serial/ir-usb.c | 113 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 22 deletions(-)
drivers/usb/serial/ir-usb.c +91 -22
@@ -45,9 +45,10 @@ static int buffer_size;static int xbof =-1 ;static int ir_startup (struct usb_serial *serial); -static int ir_open (struct tty_struct *tty,struct usb_serial_port *port); -static int ir_prepare_write_buffer (struct usb_serial_port *port, -void *dest,size_t size); +static int ir_write (struct tty_struct *tty,struct usb_serial_port *port, +const unsigned char *buf,int count); +static int ir_write_room (struct tty_struct *tty); +static void ir_write_bulk_callback (struct urb *urb);static void ir_process_read_urb (struct urb *urb);static void ir_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old_termios);
@@ -77,8 +78,9 @@ static struct usb_serial_driver ir_devic .num_ports = 1, .set_termios = ir_set_termios, .attach = ir_startup, - .open = ir_open, - .prepare_write_buffer = ir_prepare_write_buffer, + .write = ir_write, + .write_room = ir_write_room, + .write_bulk_callback = ir_write_bulk_callback, .process_read_urb = ir_process_read_urb, };
@@ -254,35 +256,102 @@ static int ir_startup(struct usb_serialreturn 0 ; } -static int ir_open (struct tty_struct *tty,struct usb_serial_port *port) +static int ir_write (struct tty_struct *tty,struct usb_serial_port *port, +const unsigned char *buf,int count) { -int i; +struct urb *urb =NULL ; +unsigned long flags; +int ret; -for (i =0 ; i <ARRAY_SIZE (port->write_urbs); ++i) - port->write_urbs[i]->transfer_flags =URB_ZERO_PACKET ; +if (port->bulk_out_size ==0 ) +return -EINVAL ; -/* Start reading from the device */ -return usb_serial_generic_open (tty, port); -} +if (count ==0 ) +return 0 ; -static int ir_prepare_write_buffer (struct usb_serial_port *port, -void *dest,size_t size) -{ -unsigned char *buf = dest; -int count; + count =min (count, port->bulk_out_size -1 ); + +spin_lock_irqsave (&port->lock, flags); +if (__test_and_clear_bit (0 , &port->write_urbs_free)) { + urb = port->write_urbs[0 ]; + port->tx_bytes += count; + } +spin_unlock_irqrestore (&port->lock, flags); + +if (!urb) +return 0 ;/* * The first byte of the packet we send to the device contains an -* inbound header which indicates an additional number of BOFs and +* outbound header which indicates an additional number of BOFs and * a baud rate change. * * See section 5.4.2.2 of the USB IrDA spec. */ - *buf = ir_xbof | ir_baud; + *(u8 *)urb->transfer_buffer = ir_xbof | ir_baud; + +memcpy (urb->transfer_buffer +1 , buf, count); + + urb->transfer_buffer_length = count +1 ; + urb->transfer_flags =URB_ZERO_PACKET ; + + ret =usb_submit_urb (urb,GFP_ATOMIC ); +if (ret) { +dev_err (&port->dev,"failed to submit write urb: %d\n" , ret); + +spin_lock_irqsave (&port->lock, flags); +__set_bit (0 , &port->write_urbs_free); + port->tx_bytes -= count; +spin_unlock_irqrestore (&port->lock, flags); + +return ret; + } + +return count; +} + +static void ir_write_bulk_callback (struct urb *urb) +{ +struct usb_serial_port *port = urb->context; +int status = urb->status; +unsigned long flags; + +spin_lock_irqsave (&port->lock, flags); +__set_bit (0 , &port->write_urbs_free); + port->tx_bytes -= urb->transfer_buffer_length -1 ; +spin_unlock_irqrestore (&port->lock, flags); + +switch (status) { +case 0 : +break ; +case -ENOENT : +case -ECONNRESET : +case -ESHUTDOWN : +dev_dbg (&port->dev,"write urb stopped: %d\n" , status); +return ; +case -EPIPE : +dev_err (&port->dev,"write urb stopped: %d\n" , status); +return ; +default : +dev_err (&port->dev,"nonzero write-urb status: %d\n" , status); +break ; + } + +usb_serial_port_softint (port); +} + +static int ir_write_room (struct tty_struct *tty) +{ +struct usb_serial_port *port = tty->driver_data; +int count =0 ; + +if (port->bulk_out_size ==0 ) +return 0 ; + +if (test_bit (0 , &port->write_urbs_free)) + count = port->bulk_out_size -1 ; - count =kfifo_out_locked (&port->write_fifo, buf +1 , size -1 , - &port->lock); -return count +1 ; +return count; }static void ir_process_read_urb (struct urb *urb)
Greg Kroah-Hartman
maintainerPATCH 9/56 usb: dwc3: turn off VBUS when leaving host mode
In reply to Greg Kroah-HartmanFrom: Bin Liu <[email protected]>
commit 09ed259fac621634d51cd986aa8d65f035662658 upstream.
VBUS should be turned off when leaving the host mode.
Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to turn off VBUS power.
--- drivers/usb/dwc3/core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/dwc3/core.c +3 -0
@@ -1246,6 +1246,9 @@ static void dwc3_core_exit_mode(struct d/* do nothing */ break ; } + +/* de-assert DRVVBUS for HOST and OTG mode */ +dwc3_set_prtcap (dwc,DWC3_GCTL_PRTCAP_DEVICE ); }static void dwc3_get_properties (struct dwc3 *dwc)
Greg Kroah-Hartman
maintainerPATCH 10/56 usb: typec: wcove: fix "op-sink-microwatt" default that was in mW
In reply to Greg Kroah-HartmanFrom: Thomas Hebb <[email protected]>
commit 0e64350bf4668d0fbbfec66fd8e637b971b4e976 upstream.
commit 4c912bff46cc ("usb: typec: wcove: Provide fwnode for the port") didn't convert this value from mW to uW when migrating to a new specification format like it should have.
--- drivers/usb/typec/tcpm/wcove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tcpm/wcove.c +1 -1
@@ -597,7 +597,7 @@ static const struct property_entry wcovePROPERTY_ENTRY_STRING ("try-power-role" ,"sink" ),PROPERTY_ENTRY_U32_ARRAY ("source-pdos" , src_pdo),PROPERTY_ENTRY_U32_ARRAY ("sink-pdos" , snk_pdo), - PROPERTY_ENTRY_U32("op-sink-microwatt", 15000), + PROPERTY_ENTRY_U32("op-sink-microwatt", 15000000), { } };
Greg Kroah-Hartman
maintainerPATCH 11/56 usb: typec: fusb302: fix "op-sink-microwatt" default that was in mW
In reply to Greg Kroah-HartmanFrom: Thomas Hebb <[email protected]>
commit eb7a3bb8c955b3694e0e0998413ce1563c02f90c upstream.
commit 8f6244055bd3 ("usb: typec: fusb302: Always provide fwnode for the port") didn't convert this value from mW to uW when migrating to a new specification format like it should have.
--- drivers/usb/typec/tcpm/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tcpm/fusb302.c +1 -1
@@ -1666,7 +1666,7 @@ static const struct property_entry port_PROPERTY_ENTRY_STRING ("try-power-role" ,"sink" ),PROPERTY_ENTRY_U32_ARRAY ("source-pdos" , src_pdo),PROPERTY_ENTRY_U32_ARRAY ("sink-pdos" , snk_pdo), - PROPERTY_ENTRY_U32("op-sink-microwatt", 2500), + PROPERTY_ENTRY_U32("op-sink-microwatt", 2500000), { } };
Greg Kroah-Hartman
maintainerPATCH 12/56 staging: most: net: fix buffer overflow
In reply to Greg Kroah-HartmanFrom: Andrey Shvetsov <[email protected]>
commit 4d1356ac12f4d5180d0df345d85ff0ee42b89c72 upstream.
If the length of the socket buffer is 0xFFFFFFFF (max size for an unsigned int), then payload_len becomes 0xFFFFFFF1 after subtracting 14 (ETH_HLEN). Then, mdp_len is set to payload_len + 16 (MDP_HDR_LEN) which overflows and results in a value of 2. These values for payload_len and mdp_len will pass current buffer size checks.
This patch checks if derived from skb->len sum may overflow.
The check is based on the following idea:
For any unsigned V1, V2 and derived unsigned SUM = V1 + V2, V1 + V2 overflows iif SUM < V1.
--- drivers/staging/most/net/net.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/staging/most/net/net.c +10 -0
@@ -81,6 +81,11 @@ static int skb_to_mamac(const struct sk_unsigned int payload_len = skb->len -ETH_HLEN ;unsigned int mdp_len = payload_len +MDP_HDR_LEN ; +if (mdp_len < skb->len) { +pr_err ("drop: too large packet! (%u)\n" , skb->len); +return -EINVAL ; + } +if (mbo->buffer_length < mdp_len) {pr_err ("drop: too small buffer! (%d for %d)\n" , mbo->buffer_length, mdp_len);
@@ -128,6 +133,11 @@ static int skb_to_mep(const struct sk_buu8 *buff = mbo->virt_address;unsigned int mep_len = skb->len +MEP_HDR_LEN ; +if (mep_len < skb->len) { +pr_err ("drop: too large packet! (%u)\n" , skb->len); +return -EINVAL ; + } +if (mbo->buffer_length < mep_len) {pr_err ("drop: too small buffer! (%d for %d)\n" , mbo->buffer_length, mep_len);
Greg Kroah-Hartman
maintainerPATCH 13/56 staging: wlan-ng: ensure error return is actually returned
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
commit 4cc41cbce536876678b35e03c4a8a7bb72c78fa9 upstream.
Currently when the call to prism2sta_ifst fails a netdev_err error is reported, error return variable result is set to -1 but the function always returns 0 for success. Fix this by returning the error value in variable result rather than 0.
Addresses-Coverity: ("Unused value")
--- drivers/staging/wlan-ng/prism2mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/prism2mgmt.c +1 -1
@@ -959,7 +959,7 @@ int prism2mgmt_flashdl_state(struct wlan } } -return 0 ; +return result; }/*----------------------------------------------------------------
Greg Kroah-Hartman
maintainerPATCH 14/56 staging: vt6656: correct packet types for CTS protect, mode.
In reply to Greg Kroah-HartmanFrom: Malcolm Priestley <[email protected]>
commit d971fdd3412f8342747778fb59b8803720ed82b1 upstream.
It appears that the driver still transmits in CTS protect mode even though it is not enabled in mac80211.
That is both packet types PK_TYPE_11GA and PK_TYPE_11GB both use CTS protect. The only difference between them GA does not use B rates.
Find if only B rate in GB or GA in protect mode otherwise transmit packets as PK_TYPE_11A.
--- drivers/staging/vt6656/device.h | 2 ++ drivers/staging/vt6656/rxtx.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/staging/vt6656/device.h +2 -0
@@ -52,6 +52,8 @@#define RATE_AUTO 12#define MAX_RATE 12 +#define VNT_B_RATES (BIT(RATE_1M) | BIT(RATE_2M) |\ + BIT(RATE_5M) | BIT(RATE_11M))/* * device specific
drivers/staging/vt6656/rxtx.c +8 -4
@@ -815,10 +815,14 @@ int vnt_tx_packet(struct vnt_private *prif (info->band ==NL80211_BAND_5GHZ ) { pkt_type =PK_TYPE_11A ; }else { -if (tx_rate->flags &IEEE80211_TX_RC_USE_CTS_PROTECT ) - pkt_type =PK_TYPE_11GB ; -else - pkt_type =PK_TYPE_11GA ; +if (tx_rate->flags &IEEE80211_TX_RC_USE_CTS_PROTECT ) { +if (priv->basic_rates &VNT_B_RATES ) + pkt_type =PK_TYPE_11GB ; +else + pkt_type =PK_TYPE_11GA ; + }else { + pkt_type =PK_TYPE_11A ; + } } }else { pkt_type =PK_TYPE_11B ;
Greg Kroah-Hartman
maintainerPATCH 15/56 staging: vt6656: use NULLFUCTION stack on mac80211
In reply to Greg Kroah-HartmanFrom: Malcolm Priestley <[email protected]>
commit d579c43c82f093e63639151625b2139166c730fd upstream.
It appears that the drivers does not go into power save correctly the NULL data packets are not being transmitted because it not enabled in mac80211.
The driver needs to capture ieee80211_is_nullfunc headers and copy the duration_id to it's own duration data header.
--- drivers/staging/vt6656/main_usb.c | 1 + drivers/staging/vt6656/rxtx.c | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-)
drivers/staging/vt6656/main_usb.c +1 -0
@@ -1015,6 +1015,7 @@ vt6656_probe(struct usb_interface *intf,ieee80211_hw_set (priv->hw,RX_INCLUDES_FCS );ieee80211_hw_set (priv->hw,REPORTS_TX_ACK_STATUS );ieee80211_hw_set (priv->hw,SUPPORTS_PS ); +ieee80211_hw_set (priv->hw,PS_NULLFUNC_STACK ); priv->hw->max_signal =100 ;
drivers/staging/vt6656/rxtx.c +5 -9
@@ -278,11 +278,9 @@ static u16 vnt_rxtx_datahead_g(struct vn PK_TYPE_11B, &buf->b);/* Get Duration and TimeStamp */ -if (ieee80211_is_pspoll (hdr->frame_control)) { -__le16 dur =cpu_to_le16 (priv->current_aid |BIT (14 ) |BIT (15 )); - - buf->duration_a = dur; - buf->duration_b = dur; +if (ieee80211_is_nullfunc (hdr->frame_control)) { + buf->duration_a = hdr->duration_id; + buf->duration_b = hdr->duration_id; }else { buf->duration_a =vnt_get_duration_le (priv, tx_context->pkt_type, need_ack);
@@ -371,10 +369,8 @@ static u16 vnt_rxtx_datahead_ab(struct v tx_context->pkt_type, &buf->ab);/* Get Duration and TimeStampOff */ -if (ieee80211_is_pspoll (hdr->frame_control)) { -__le16 dur =cpu_to_le16 (priv->current_aid |BIT (14 ) |BIT (15 )); - - buf->duration = dur; +if (ieee80211_is_nullfunc (hdr->frame_control)) { + buf->duration = hdr->duration_id; }else { buf->duration =vnt_get_duration_le (priv, tx_context->pkt_type, need_ack);
Greg Kroah-Hartman
maintainerPATCH 16/56 staging: vt6656: Fix false Tx excessive retries reporting.
In reply to Greg Kroah-HartmanFrom: Malcolm Priestley <[email protected]>
commit 9dd631fa99dc0a0dfbd191173bf355ba30ea786a upstream.
The driver reporting IEEE80211_TX_STAT_ACK is not being handled correctly. The driver should only report on TSR_TMO flag is not set indicating no transmission errors and when not IEEE80211_TX_CTL_NO_ACK is being requested.
--- drivers/staging/vt6656/int.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/vt6656/int.c +4 -2
@@ -99,9 +99,11 @@ static int vnt_int_report_rate(struct vn info->status.rates[0 ].count = tx_retry; -if (!(tsr & (TSR_TMO |TSR_RETRYTMO ))) { +if (!(tsr &TSR_TMO )) { info->status.rates[0 ].idx = idx; - info->flags |=IEEE80211_TX_STAT_ACK ; + +if (!(info->flags &IEEE80211_TX_CTL_NO_ACK )) + info->flags |=IEEE80211_TX_STAT_ACK ; }ieee80211_tx_status_irqsafe (priv->hw, context->skb);
Greg Kroah-Hartman
maintainerPATCH 17/56 serial: 8250_bcm2835aux: Fix line mismatch on driver unbind
In reply to Greg Kroah-HartmanFrom: Lukas Wunner <[email protected]>
commit dc76697d7e933d5e299116f219c890568785ea15 upstream.
Unbinding the bcm2835aux UART driver raises the following error if the maximum number of 8250 UARTs is set to 1 (via the 8250.nr_uarts module parameter or CONFIG_SERIAL_8250_RUNTIME_UARTS):
(NULL device *): Removing wrong port: a6f80333 != fa20408b
That's because bcm2835aux_serial_probe() retrieves UART line number 1 from the devicetree and stores it in data->uart.port.line, while serial8250_register_8250_port() instead uses UART line number 0, which is stored in data->line.
On driver unbind, bcm2835aux_serial_remove() uses data->uart.port.line, which contains the wrong number. Fix it.
The issue does not occur if the maximum number of 8250 UARTs is >= 2.
--- drivers/tty/serial/8250/8250_bcm2835aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/8250/8250_bcm2835aux.c +1 -1
@@ -113,7 +113,7 @@ static int bcm2835aux_serial_remove(stru {struct bcm2835aux_data *data =platform_get_drvdata (pdev); -serial8250_unregister_port (data->uart.port.line); +serial8250_unregister_port (data->line);clk_disable_unprepare (data->clk);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 18/56 serial: imx: fix a race condition in receive path
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
commit 101aa46bd221b768dfff8ef3745173fc8dbb85ee upstream.
The main irq handler function starts by first masking disabled interrupts in the status register values to ensure to only handle enabled interrupts. This is important as when the RX path in the hardware is disabled reading the RX fifo results in an external abort.
This checking must be done under the port lock, otherwise the following can happen:
CPU1 | CPU2
|
irq triggers as there are chars |
in the RX fifo | | grab port lock
imx_uart_int finds RRDY enabled |
and calls imx_uart_rxint which |
has to wait for port lock |
| disable RX (e.g. because we're | using RS485 with !RX_DURING_TX) |
| release port lock
read from RX fifo with RX |
disabled => exception |
So take the port lock only once in imx_uart_int() instead of in the functions called from there.
--- drivers/tty/serial/imx.c | 51 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 13 deletions(-)
drivers/tty/serial/imx.c +38 -13
@@ -700,22 +700,33 @@ static void imx_uart_start_tx(struct uar } } -static irqreturn_t imx_uart_rtsint (int irq,void *dev_id) +static irqreturn_t __imx_uart_rtsint (int irq,void *dev_id) {struct imx_port *sport = dev_id;u32 usr1; -spin_lock (&sport->port.lock); -imx_uart_writel (sport,USR1_RTSD ,USR1 ); usr1 =imx_uart_readl (sport,USR1 ) &USR1_RTSS ;uart_handle_cts_change (&sport->port, !!usr1);wake_up_interruptible (&sport->port.state->port.delta_msr_wait); -spin_unlock (&sport->port.lock);return IRQ_HANDLED ; } +static irqreturn_t imx_uart_rtsint (int irq,void *dev_id) +{ +struct imx_port *sport = dev_id; +irqreturn_t ret; + +spin_lock (&sport->port.lock); + + ret =__imx_uart_rtsint (irq, dev_id); + +spin_unlock (&sport->port.lock); + +return ret; +} +static irqreturn_t imx_uart_txint (int irq,void *dev_id) {struct imx_port *sport = dev_id;
@@ -726,14 +737,12 @@ static irqreturn_t imx_uart_txint(int irreturn IRQ_HANDLED ; } -static irqreturn_t imx_uart_rxint (int irq,void *dev_id) +static irqreturn_t __imx_uart_rxint (int irq,void *dev_id) {struct imx_port *sport = dev_id;unsigned int rx, flg, ignored =0 ;struct tty_port *port = &sport->port.state->port; -spin_lock (&sport->port.lock); -while (imx_uart_readl (sport,USR2 ) &USR2_RDR ) {u32 usr2;
@@ -792,11 +801,25 @@ static irqreturn_t imx_uart_rxint(int ir } out: -spin_unlock (&sport->port.lock);tty_flip_buffer_push (port); +return IRQ_HANDLED ; } +static irqreturn_t imx_uart_rxint (int irq,void *dev_id) +{ +struct imx_port *sport = dev_id; +irqreturn_t ret; + +spin_lock (&sport->port.lock); + + ret =__imx_uart_rxint (irq, dev_id); + +spin_unlock (&sport->port.lock); + +return ret; +} +static void imx_uart_clear_rx_errors (struct imx_port *sport);/*
@@ -855,6 +878,8 @@ static irqreturn_t imx_uart_int(int irq,unsigned int usr1, usr2, ucr1, ucr2, ucr3, ucr4;irqreturn_t ret =IRQ_NONE ; +spin_lock (&sport->port.lock); + usr1 =imx_uart_readl (sport,USR1 ); usr2 =imx_uart_readl (sport,USR2 ); ucr1 =imx_uart_readl (sport,UCR1 );
@@ -888,27 +913,25 @@ static irqreturn_t imx_uart_int(int irq, usr2 &= ~USR2_ORE ;if (usr1 & (USR1_RRDY |USR1_AGTIM )) { -imx_uart_rxint (irq, dev_id); +__imx_uart_rxint (irq, dev_id); ret =IRQ_HANDLED ; }if ((usr1 &USR1_TRDY ) || (usr2 &USR2_TXDC )) { -imx_uart_txint (irq, dev_id); +imx_uart_transmit_buffer (sport); ret =IRQ_HANDLED ; }if (usr1 &USR1_DTRD ) {imx_uart_writel (sport,USR1_DTRD ,USR1 ); -spin_lock (&sport->port.lock);imx_uart_mctrl_check (sport); -spin_unlock (&sport->port.lock); ret =IRQ_HANDLED ; }if (usr1 &USR1_RTSD ) { -imx_uart_rtsint (irq, dev_id); +__imx_uart_rtsint (irq, dev_id); ret =IRQ_HANDLED ; }
@@ -923,6 +946,8 @@ static irqreturn_t imx_uart_int(int irq, ret =IRQ_HANDLED ; } +spin_unlock (&sport->port.lock); +return ret; }
Greg Kroah-Hartman
maintainerPATCH 19/56 debugfs: Return -EPERM when locked down
In reply to Greg Kroah-HartmanFrom: Eric Snowberg <[email protected]>
commit a37f4958f7b63d2b3cd17a76151fdfc29ce1da5f upstream.
When lockdown is enabled, debugfs_is_locked_down returns 1. It will then trigger the following:
WARNING: CPU: 48 PID: 3747 CPU: 48 PID: 3743 Comm: bash Not tainted 5.4.0-1946.x86_64 #1 Hardware name: Oracle Corporation ORACLE SERVER X7-2/ASM, MB, X7-2, BIOS 41060400 05/20/2019 RIP: 0010:do_dentry_open+0x343/0x3a0 Code: 00 40 08 00 45 31 ff 48 c7 43 28 40 5b e7 89 e9 02 ff ff ff 48 8b 53 28 4c 8b 72 70 4d 85 f6 0f 84 10 fe ff ff e9 f5 fd ff ff <0f> 0b 41 bf ea ff ff ff e9 3b ff ff ff 41 bf e6 ff ff ff e9 b4 fe RSP: 0018:ffffb8740dde7ca0 EFLAGS: 00010202 RAX: ffffffff89e88a40 RBX: ffff928c8e6b6f00 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff928dbfd97778 RDI: ffff9285cff685c0 RBP: ffffb8740dde7cc8 R08: 0000000000000821 R09: 0000000000000030 R10: 0000000000000057 R11: ffffb8740dde7a98 R12: ffff926ec781c900 R13: ffff928c8e6b6f10 R14: ffffffff8936e190 R15: 0000000000000001 FS: 00007f45f6777740(0000) GS:ffff928dbfd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff95e0d5d8 CR3: 0000001ece562006 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: vfs_open+0x2d/0x30 path_openat+0x2d4/0x1680 ? tty_mode_ioctl+0x298/0x4c0 do_filp_open+0x93/0x100 ? strncpy_from_user+0x57/0x1b0 ? __alloc_fd+0x46/0x150 do_sys_open+0x182/0x230 __x64_sys_openat+0x20/0x30 do_syscall_64+0x60/0x1b0 entry_SYSCALL_64_after_hwframe+0x170/0x1d5 RIP: 0033:0x7f45f5e5ce02 Code: 25 00 00 41 00 3d 00 00 41 00 74 4c 48 8d 05 25 59 2d 00 8b 00 85 c0 75 6d 89 f2 b8 01 01 00 00 48 89 fe bf 9c ff ff ff 0f 05 <48> 3d 00 f0 ff ff 0f 87 a2 00 00 00 48 8b 4c 24 28 64 48 33 0c 25 RSP: 002b:00007fff95e0d2e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000561178c069b0 RCX: 00007f45f5e5ce02 RDX: 0000000000000241 RSI: 0000561178c08800 RDI: 00000000ffffff9c RBP: 00007fff95e0d3e0 R08: 0000000000000020 R09: 0000000000000005 R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000003 R14: 0000000000000001 R15: 0000561178c08800
Change the return type to int and return -EPERM when lockdown is enabled to remove the warning above. Also rename debugfs_is_locked_down to debugfs_locked_down to make it sound less like it returns a boolean.
--- fs/debugfs/file.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
fs/debugfs/file.c +10 -7
@@ -142,18 +142,21 @@ EXPORT_SYMBOL_GPL(debugfs_file_put);* We also need to exclude any file that has ways to write or alter it as root * can bypass the permissions check. */ -static bool debugfs_is_locked_down (struct inode *inode, -struct file *filp, -const struct file_operations *real_fops) +static int debugfs_locked_down (struct inode *inode, +struct file *filp, +const struct file_operations *real_fops) {if ((inode->i_mode &07777 ) ==0444 && !(filp->f_mode &FMODE_WRITE ) && !real_fops->unlocked_ioctl && !real_fops->compat_ioctl && !real_fops->mmap) -return false; +return 0 ; -return security_locked_down (LOCKDOWN_DEBUGFS ); +if (security_locked_down (LOCKDOWN_DEBUGFS )) +return -EPERM ; + +return 0 ; }static int open_proxy_open (struct inode *inode,struct file *filp)
@@ -168,7 +171,7 @@ static int open_proxy_open(struct inode real_fops =debugfs_real_fops (filp); - r =debugfs_is_locked_down (inode, filp, real_fops); + r =debugfs_locked_down (inode, filp, real_fops);if (r) goto out;
@@ -298,7 +301,7 @@ static int full_proxy_open(struct inode real_fops =debugfs_real_fops (filp); - r =debugfs_is_locked_down (inode, filp, real_fops); + r =debugfs_locked_down (inode, filp, real_fops);if (r) goto out;
Greg Kroah-Hartman
maintainerPATCH 20/56 component: do not dereference opaque pointer in debugfs
In reply to Greg Kroah-HartmanFrom: Lubomir Rintel <[email protected]>
commit ef9ffc1e5f1ac73ecd2fb3b70db2a3b2472ff2f7 upstream.
The match data does not have to be a struct device pointer, and indeed very often is not. Attempt to treat it as such easily results in a crash.
For the components that are not registered, we don't know which device is missing. Once it it is there, we can use the struct component to get the device and whether it's bound or not.
--- drivers/base/component.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/base/component.c +4 -4
@@ -102,11 +102,11 @@ static int component_devices_show(structseq_printf (s,"%-40s %20s\n" ,"device name" ,"status" );seq_puts (s,"-------------------------------------------------------------\n" );for (i =0 ; i < match->num; i++) { -struct device *d = (struct device *)match->compare[i].data; +struct component *component = match->compare[i].component; -seq_printf (s,"%-40s %20s\n" ,dev_name (d), - match->compare[i].component ? -"registered" :"not registered" ); +seq_printf (s,"%-40s %20s\n" , + component ?dev_name (component->dev) :"(unknown)" , + component ? (component->bound ?"bound" :"not bound" ) :"not registered" ); }mutex_unlock (&component_mutex);
Greg Kroah-Hartman
maintainerPATCH 21/56 binder: fix log spam for existing debugfs file creation.
In reply to Greg Kroah-HartmanFrom: Martin Fuzzey <[email protected]>
commit eb143f8756e77c8fcfc4d574922ae9efd3a43ca9 upstream.
Since commit 43e23b6c0b01 ("debugfs: log errors when something goes wrong") debugfs logs attempts to create existing files.
However binder attempts to create multiple debugfs files with the same name when a single PID has multiple contexts, this leads to log spamming during an Android boot (17 such messages during boot on my system).
Fix this by checking if we already know the PID and only create the debugfs entry for the first context per PID.
Do the same thing for binderfs for symmetry.
--- drivers/android/binder.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/android/binder.c +19 -18
@@ -5199,10 +5199,11 @@ err_bad_arg:static int binder_open (struct inode *nodp,struct file *filp) { -struct binder_proc *proc; +struct binder_proc *proc, *itr;struct binder_device *binder_dev;struct binderfs_info *info;struct dentry *binder_binderfs_dir_entry_proc =NULL ; +bool existing_pid = false;binder_debug (BINDER_DEBUG_OPEN_CLOSE ,"%s: %d:%d\n" , __func__, current->group_leader->pid, current->pid);
@@ -5235,19 +5236,24 @@ static int binder_open(struct inode *nod filp->private_data = proc;mutex_lock (&binder_procs_lock); +hlist_for_each_entry (itr, &binder_procs, proc_node) { +if (itr->pid == proc->pid) { + existing_pid = true; +break ; + } + }hlist_add_head (&proc->proc_node, &binder_procs);mutex_unlock (&binder_procs_lock); -if (binder_debugfs_dir_entry_proc) { +if (binder_debugfs_dir_entry_proc && !existing_pid) {char strbuf[11 ];snprintf (strbuf,sizeof (strbuf),"%u" , proc->pid);/* -* proc debug entries are shared between contexts, so -* this will fail if the process tries to open the driver -* again with a different context. The priting code will -* anyway print all contexts that a given PID has, so this -* is not a problem. +* proc debug entries are shared between contexts. +* Only create for the first PID to avoid debugfs log spamming +* The printing code will anyway print all contexts for a given +* PID so this is not a problem. */ proc->debugfs_entry = debugfs_create_file(strbuf, 0444, binder_debugfs_dir_entry_proc,
@@ -5255,19 +5261,16 @@ static int binder_open(struct inode *nod &proc_fops); } -if (binder_binderfs_dir_entry_proc) { +if (binder_binderfs_dir_entry_proc && !existing_pid) {char strbuf[11 ];struct dentry *binderfs_entry;snprintf (strbuf,sizeof (strbuf),"%u" , proc->pid);/* * Similar to debugfs, the process specific log file is shared -* between contexts. If the file has already been created for a -* process, the following binderfs_create_file() call will -* fail with error code EEXIST if another context of the same -* process invoked binder_open(). This is ok since same as -* debugfs, the log file will contain information on all -* contexts of a given PID. +* between contexts. Only create for the first PID. +* This is ok since same as debugfs, the log file will contain +* information on all contexts of a given PID. */ binderfs_entry =binderfs_create_file (binder_binderfs_dir_entry_proc, strbuf, &proc_fops, (void *)(unsigned long )proc->pid);
@@ -5277,10 +5280,8 @@ static int binder_open(struct inode *nodint error; error =PTR_ERR (binderfs_entry); -if (error != -EEXIST ) { -pr_warn ("Unable to create file %s in binderfs (error %d)\n" , - strbuf, error); - } +pr_warn ("Unable to create file %s in binderfs (error %d)\n" , + strbuf, error); } }
Greg Kroah-Hartman
maintainerPATCH 22/56 mei: hdcp: bind only with i915 on the same PCH
In reply to Greg Kroah-HartmanFrom: Tomas Winkler <[email protected]>
commit 1e8d19d9b0dfcf11b61bac627203a290577e807a upstream.
The mei device and i915 must reside on the same PCH in order for HDCP to work. Make the component matching function enforce this requirement.
hdcp
|
i915 mei
| |
+----= PCH =----+--- drivers/misc/mei/hdcp/mei_hdcp.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-)
drivers/misc/mei/hdcp/mei_hdcp.c +30 -3
@@ -757,11 +757,38 @@ static const struct component_master_ops .unbind = mei_component_master_unbind, }; +/** +* mei_hdcp_component_match - compare function for matching mei hdcp. +* +* The function checks if the driver is i915, the subcomponent is HDCP +* and the grand parent of hdcp and the parent of i915 are the same +* PCH device. +* +* @dev: master device +* @subcomponent: subcomponent to match (I915_COMPONENT_HDCP) +* @data: compare data (mei hdcp device) +* +* Return: +* * 1 - if components match +* * 0 - otherwise +*/ static int mei_hdcp_component_match (struct device *dev,int subcomponent,void *data) { -return !strcmp (dev->driver->name,"i915" ) && - subcomponent ==I915_COMPONENT_HDCP ; +struct device *base = data; + +if (strcmp (dev->driver->name,"i915" ) || + subcomponent !=I915_COMPONENT_HDCP ) +return 0 ; + + base = base->parent; +if (!base) +return 0 ; + + base = base->parent; + dev = dev->parent; + +return (base && dev && dev == base); } static int mei_hdcp_probe(struct mei_cl_device *cldev,
@@ -785,7 +812,7 @@ static int mei_hdcp_probe(struct mei_cl_ master_match =NULL ;component_match_add_typed (&cldev->dev, &master_match, - mei_hdcp_component_match, comp_master); + mei_hdcp_component_match, &cldev->dev);if (IS_ERR_OR_NULL (master_match)) { ret = -ENOMEM ; goto err_exit;
Greg Kroah-Hartman
maintainerPATCH 23/56 mei: me: add comet point (lake) H device ids
In reply to Greg Kroah-HartmanFrom: Tomas Winkler <[email protected]>
commit 559e575a8946a6561dfe8880de341d4ef78d5994 upstream.
Add Comet Point device IDs for Comet Lake H platforms.
--- drivers/misc/mei/hw-me-regs.h | 4 ++++ drivers/misc/mei/pci-me.c | 2 ++ 2 files changed, 6 insertions(+)
drivers/misc/mei/hw-me-regs.h +4 -0
@@ -81,8 +81,12 @@#define MEI_DEV_ID_CMP_LP 0x02e0/* Comet Point LP */ #define MEI_DEV_ID_CMP_LP_3 0x02e4/* Comet Point LP 3 (iTouch) */ +#define MEI_DEV_ID_CMP_V 0xA3BA/* Comet Point Lake V */ +#define MEI_DEV_ID_CMP_H 0x06e0/* Comet Lake H */ +#define MEI_DEV_ID_CMP_H_3 0x06e4/* Comet Lake H 3 (iTouch) */ +#define MEI_DEV_ID_ICP_LP 0x34E0/* Ice Lake Point LP */ #define MEI_DEV_ID_TGP_LP 0xA0E0/* Tiger Lake Point LP */
drivers/misc/mei/pci-me.c +2 -0
@@ -99,6 +99,8 @@ static const struct pci_device_id mei_me {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP, MEI_ME_PCH12_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP_3, MEI_ME_PCH8_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_V, MEI_ME_PCH12_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H, MEI_ME_PCH12_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H_3, MEI_ME_PCH8_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)},
Greg Kroah-Hartman
maintainerPATCH 24/56 mei: me: add jasper point DID
In reply to Greg Kroah-HartmanFrom: Tomas Winkler <[email protected]>
commit 0db4a15d4c2787b1112001790d4f95bd2c5fed6f upstream.
Add Jasper Point (Jasper Lake) device id for MEI
--- drivers/misc/mei/hw-me-regs.h | 2 ++ drivers/misc/mei/pci-me.c | 2 ++ 2 files changed, 4 insertions(+)
drivers/misc/mei/hw-me-regs.h +2 -0
@@ -89,6 +89,8 @@#define MEI_DEV_ID_ICP_LP 0x34E0/* Ice Lake Point LP */ +#define MEI_DEV_ID_JSP_N 0x4DE0/* Jasper Lake Point N */ +#define MEI_DEV_ID_TGP_LP 0xA0E0/* Tiger Lake Point LP */ #define MEI_DEV_ID_MCC 0x4B70/* Mule Creek Canyon (EHL) */
drivers/misc/mei/pci-me.c +2 -0
@@ -106,6 +106,8 @@ static const struct pci_device_id mei_me {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_JSP_N, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_MCC, MEI_ME_PCH15_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_MCC_4, MEI_ME_PCH8_CFG)},
Greg Kroah-Hartman
maintainerPATCH 25/56 iio: adc: stm32-dfsdm: fix single conversion
In reply to Greg Kroah-HartmanFrom: Olivier Moysan <[email protected]>
commit dc26935fb60e8da8d59655dd2ec0de47b20d7d8f upstream.
Apply data formatting to single conversion,
as this is already done in continuous and trigger modes.
--- drivers/iio/adc/stm32-dfsdm-adc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/iio/adc/stm32-dfsdm-adc.c +2 -0
@@ -1204,6 +1204,8 @@ static int stm32_dfsdm_single_conv(strucstm32_dfsdm_stop_conv (adc); +stm32_dfsdm_process_data (adc, res); + stop_dfsdm:stm32_dfsdm_stop_dfsdm (adc->dfsdm);
Greg Kroah-Hartman
maintainerPATCH 26/56 iio: st_gyro: Correct data for LSM9DS0 gyro
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
commit e825070f697abddf3b9b0a675ed0ff1884114818 upstream.
The commit 41c128cb25ce ("iio: st_gyro: Add lsm9ds0-gyro support") assumes that gyro in LSM9DS0 is the same as others with 0xd4 WAI ID, but datasheet tells slight different story, i.e. the first scale factor for the chip is 245 dps, and not 250 dps.
Correct this by introducing a separate settings for LSM9DS0.
Depends-on: 45a4e4220bf4 ("iio: gyro: st_gyro: fix L3GD20H support")
--- drivers/iio/gyro/st_gyro_core.c | 75 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-)
drivers/iio/gyro/st_gyro_core.c +74 -1
@@ -138,7 +138,6 @@ static const struct st_sensor_settings s [2] = LSM330DLC_GYRO_DEV_NAME, [3] = L3G4IS_GYRO_DEV_NAME, [4 ] =LSM330_GYRO_DEV_NAME , - [5 ] =LSM9DS0_GYRO_DEV_NAME , }, .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, .odr = {
@@ -202,6 +201,80 @@ static const struct st_sensor_settings s }, }, .sim = { + .addr = 0x23, + .value = BIT(0), + }, + .multi_read_bit = true, + .bootime = 2, + }, + { + .wai = 0xd4, + .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, + .sensors_supported = { + [0] = LSM9DS0_GYRO_DEV_NAME, + }, + .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, + .odr = { + .addr = 0x20, + .mask = GENMASK(7, 6), + .odr_avl = { + { .hz = 95, .value = 0x00, }, + { .hz = 190, .value = 0x01, }, + { .hz = 380, .value = 0x02, }, + { .hz = 760, .value = 0x03, }, + }, + }, + .pw = { + .addr = 0x20, + .mask = BIT(3), + .value_on = ST_SENSORS_DEFAULT_POWER_ON_VALUE, + .value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE, + }, + .enable_axis = { + .addr = ST_SENSORS_DEFAULT_AXIS_ADDR, + .mask = ST_SENSORS_DEFAULT_AXIS_MASK, + }, + .fs = { + .addr = 0x23, + .mask = GENMASK(5, 4), + .fs_avl = { + [0] = { + .num = ST_GYRO_FS_AVL_245DPS, + .value = 0x00, + .gain = IIO_DEGREE_TO_RAD(8750), + }, + [1] = { + .num = ST_GYRO_FS_AVL_500DPS, + .value = 0x01, + .gain = IIO_DEGREE_TO_RAD(17500), + }, + [2] = { + .num = ST_GYRO_FS_AVL_2000DPS, + .value = 0x02, + .gain = IIO_DEGREE_TO_RAD(70000), + }, + }, + }, + .bdu = { + .addr = 0x23, + .mask = BIT(7), + }, + .drdy_irq = { + .int2 = { + .addr = 0x22, + .mask = BIT(3), + }, + /* + * The sensor has IHL (active low) and open + * drain settings, but only for INT1 and not + * for the DRDY line on INT2. + */ + .stat_drdy = { + .addr = ST_SENSORS_DEFAULT_STAT_ADDR, + .mask = GENMASK(2, 0), + }, + }, + .sim = { .addr = 0x23, .value = BIT(0), },
Greg Kroah-Hartman
maintainerPATCH 27/56 driver core: Fix test_async_driver_probe if NUMA is disabled
In reply to Greg Kroah-HartmanFrom: Guenter Roeck <[email protected]>
commit 264d25275a46fce5da501874fa48a2ae5ec571c8 upstream.
Since commit 57ea974fb871 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity"), running the test with NUMA disabled results in warning messages similar to the following.
test_async_driver test_async_driver.12: NUMA node mismatch -1 != 0
If CONFIG_NUMA=n, dev_to_node(dev) returns -1, and numa_node_id() returns 0. Both are widely used, so it appears risky to change return values. Augment the check with IS_ENABLED(CONFIG_NUMA) instead to fix the problem.
--- drivers/base/test/test_async_driver_probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/base/test/test_async_driver_probe.c +2 -1
@@ -44,7 +44,8 @@ static int test_probe(struct platform_de* performing an async init on that node. */ if (dev->driver->probe_type ==PROBE_PREFER_ASYNCHRONOUS ) { -if (dev_to_node (dev) !=numa_node_id ()) { +if (IS_ENABLED (CONFIG_NUMA ) && +dev_to_node (dev) !=numa_node_id ()) {dev_warn (dev,"NUMA node mismatch %d != %d\n" ,dev_to_node (dev),numa_node_id ());atomic_inc (&warnings);
Greg Kroah-Hartman
maintainerPATCH 28/56 crypto: chelsio - fix writing tfm flags to wrong place
In reply to Greg Kroah-HartmanFrom: Eric Biggers <[email protected]>
commit bd56cea012fc2d6381e8cd3209510ce09f9de8c9 upstream.
The chelsio crypto driver is casting 'struct crypto_aead' directly to 'struct crypto_tfm', which is incorrect because the crypto_tfm isn't the first field of 'struct crypto_aead'. Consequently, the calls to crypto_tfm_set_flags() are modifying some other field in the struct.
Also, the driver is setting CRYPTO_TFM_RES_BAD_KEY_LEN in ->setauthsize(), not just in ->setkey(). This is incorrect since this flag is for bad key lengths, not for bad authentication tag lengths.
Fix these bugs by removing the broken crypto_tfm_set_flags() calls from ->setauthsize() and by fixing them in ->setkey().
--- drivers/crypto/chelsio/chcr_algo.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-)
drivers/crypto/chelsio/chcr_algo.c +3 -13
@@ -3195,9 +3195,6 @@ static int chcr_gcm_setauthsize(struct c aeadctx->mayverify =VERIFY_SW ;break ;default : - -crypto_tfm_set_flags ((struct crypto_tfm *) tfm, -CRYPTO_TFM_RES_BAD_KEY_LEN );return -EINVAL ; }return crypto_aead_setauthsize (aeadctx->sw_cipher, authsize);
@@ -3222,8 +3219,6 @@ static int chcr_4106_4309_setauthsize(st aeadctx->mayverify =VERIFY_HW ;break ;default : -crypto_tfm_set_flags ((struct crypto_tfm *)tfm, -CRYPTO_TFM_RES_BAD_KEY_LEN );return -EINVAL ; }return crypto_aead_setauthsize (aeadctx->sw_cipher, authsize);
@@ -3264,8 +3259,6 @@ static int chcr_ccm_setauthsize(struct c aeadctx->mayverify =VERIFY_HW ;break ;default : -crypto_tfm_set_flags ((struct crypto_tfm *)tfm, -CRYPTO_TFM_RES_BAD_KEY_LEN );return -EINVAL ; }return crypto_aead_setauthsize (aeadctx->sw_cipher, authsize);
@@ -3290,8 +3283,7 @@ static int chcr_ccm_common_setkey(struct ck_size =CHCR_KEYCTX_CIPHER_KEY_SIZE_256 ; mk_size =CHCR_KEYCTX_MAC_KEY_SIZE_256 ; }else { -crypto_tfm_set_flags ((struct crypto_tfm *)aead, -CRYPTO_TFM_RES_BAD_KEY_LEN ); +crypto_aead_set_flags (aead,CRYPTO_TFM_RES_BAD_KEY_LEN ); aeadctx->enckey_len =0 ;return -EINVAL ; }
@@ -3329,8 +3321,7 @@ static int chcr_aead_rfc4309_setkey(struint error;if (keylen <3 ) { -crypto_tfm_set_flags ((struct crypto_tfm *)aead, -CRYPTO_TFM_RES_BAD_KEY_LEN ); +crypto_aead_set_flags (aead,CRYPTO_TFM_RES_BAD_KEY_LEN ); aeadctx->enckey_len =0 ;return -EINVAL ; }
@@ -3380,8 +3371,7 @@ static int chcr_gcm_setkey(struct crypto }else if (keylen ==AES_KEYSIZE_256 ) { ck_size =CHCR_KEYCTX_CIPHER_KEY_SIZE_256 ; }else { -crypto_tfm_set_flags ((struct crypto_tfm *)aead, -CRYPTO_TFM_RES_BAD_KEY_LEN ); +crypto_aead_set_flags (aead,CRYPTO_TFM_RES_BAD_KEY_LEN );pr_err ("GCM: Invalid key length %d\n" , keylen); ret = -EINVAL ; goto out;
Greg Kroah-Hartman
maintainerPATCH 29/56 CIFS: Fix task struct use-after-free on reconnect
In reply to Greg Kroah-HartmanFrom: Vincent Whitchurch <[email protected]>
commit f1f27ad74557e39f67a8331a808b860f89254f2d upstream.
The task which created the MID may be gone by the time cifsd attempts to call the callbacks on MIDs from cifs_reconnect().
This leads to a use-after-free of the task struct in cifs_wake_up_task:
==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x31a0/0x3270
Read of size 8 at addr ffff8880103e3a68 by task cifsd/630
CPU: 0 PID: 630 Comm: cifsd Not tainted 5.5.0-rc6+ #119
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
Call Trace:
dump_stack+0x8e/0xcb
print_address_description.constprop.5+0x1d3/0x3c0
? __lock_acquire+0x31a0/0x3270
__kasan_report+0x152/0x1aa
? __lock_acquire+0x31a0/0x3270
? __lock_acquire+0x31a0/0x3270
kasan_report+0xe/0x20
__lock_acquire+0x31a0/0x3270
? __wake_up_common+0x1dc/0x630
? _raw_spin_unlock_irqrestore+0x4c/0x60
? mark_held_locks+0xf0/0xf0
? _raw_spin_unlock_irqrestore+0x39/0x60
? __wake_up_common_lock+0xd5/0x130
? __wake_up_common+0x630/0x630
lock_acquire+0x13f/0x330
? try_to_wake_up+0xa3/0x19e0
_raw_spin_lock_irqsave+0x38/0x50
? try_to_wake_up+0xa3/0x19e0
try_to_wake_up+0xa3/0x19e0
? cifs_compound_callback+0x178/0x210
? set_cpus_allowed_ptr+0x10/0x10
cifs_reconnect+0xa1c/0x15d0
? generic_ip_connect+0x1860/0x1860
? rwlock_bug.part.0+0x90/0x90
cifs_readv_from_socket+0x479/0x690
cifs_read_from_socket+0x9d/0xe0
? cifs_readv_from_socket+0x690/0x690
? mempool_resize+0x690/0x690
? rwlock_bug.part.0+0x90/0x90
? memset+0x1f/0x40
? allocate_buffers+0xff/0x340
cifs_demultiplex_thread+0x388/0x2a50
? cifs_handle_standard+0x610/0x610
? rcu_read_lock_held_common+0x120/0x120
? mark_lock+0x11b/0xc00
? __lock_acquire+0x14ed/0x3270
? __kthread_parkme+0x78/0x100
? lockdep_hardirqs_on+0x3e8/0x560
? lock_downgrade+0x6a0/0x6a0
? lockdep_hardirqs_on+0x3e8/0x560
? _raw_spin_unlock_irqrestore+0x39/0x60
? cifs_handle_standard+0x610/0x610
kthread+0x2bb/0x3a0
? kthread_create_worker_on_cpu+0xc0/0xc0
ret_from_fork+0x3a/0x50
Allocated by task 649:
save_stack+0x19/0x70
__kasan_kmalloc.constprop.5+0xa6/0xf0
kmem_cache_alloc+0x107/0x320
copy_process+0x17bc/0x5370
_do_fork+0x103/0xbf0
__x64_sys_clone+0x168/0x1e0
do_syscall_64+0x9b/0xec0
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 0:
save_stack+0x19/0x70
__kasan_slab_free+0x11d/0x160
kmem_cache_free+0xb5/0x3d0
rcu_core+0x52f/0x1230
__do_softirq+0x24d/0x962
The buggy address belongs to the object at ffff8880103e32c0
which belongs to the cache task_struct of size 6016
The buggy address is located 1960 bytes inside of
6016-byte region [ffff8880103e32c0, ffff8880103e4a40)
The buggy address belongs to the page:
page:ffffea000040f800 refcount:1 mapcount:0 mapping:ffff8880108da5c0
index:0xffff8880103e4c00 compound_mapcount: 0
raw: 4000000000010200 ffffea00001f2208 ffffea00001e3408 ffff8880108da5c0
raw: ffff8880103e4c00 0000000000050003 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880103e3900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880103e3980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880103e3a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880103e3a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880103e3b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================This can be reliably reproduced by adding the below delay to cifs_reconnect(), running find(1) on the mount, restarting the samba server while find is running, and killing find during the delay:
spin_unlock(&GlobalMid_Lock); mutex_unlock(&server->srv_mutex);
+ msleep(10000);
+
cifs_dbg(FYI, "%s: issuing mid callbacks\n", __func__); list_for_each_safe(tmp, tmp2, &retry_list) {
mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
Fix this by holding a reference to the task struct until the MID is freed.
--- fs/cifs/cifsglob.h | 1 + fs/cifs/smb2transport.c | 2 ++ fs/cifs/transport.c | 3 +++ 3 files changed, 6 insertions(+)
fs/cifs/cifsglob.h +1 -0
@@ -1588,6 +1588,7 @@ struct mid_q_entry {mid_callback_t *callback;/* call completion callback */ mid_handle_t *handle;/* call handle mid callback */ void *callback_data;/* general purpose pointer for callback */ +struct task_struct *creator;void *resp_buf;/* pointer to received SMB header */ unsigned int resp_buf_size;int mid_state;/* wish this were enum but can not pass to wait_event */
fs/cifs/smb2transport.c +2 -0
@@ -685,6 +685,8 @@ smb2_mid_entry_alloc(const struct smb2_s* The default is for the mid to be synchronous, so the * default callback just wakes up the current task. */ +get_task_struct (current); + temp->creator = current; temp->callback = cifs_wake_up_task; temp->callback_data = current;
fs/cifs/transport.c +3 -0
@@ -76,6 +76,8 @@ AllocMidQEntry(const struct smb_hdr *smb* The default is for the mid to be synchronous, so the * default callback just wakes up the current task. */ +get_task_struct (current); + temp->creator = current; temp->callback = cifs_wake_up_task; temp->callback_data = current;
@@ -158,6 +160,7 @@ static void _cifs_mid_q_entry_release(st } }#endif +put_task_struct (midEntry->creator);mempool_free (midEntry, cifs_mid_poolp); }
Greg Kroah-Hartman
maintainerPATCH 30/56 cifs: set correct max-buffer-size for smb2_ioctl_init()
In reply to Greg Kroah-HartmanFrom: Ronnie Sahlberg <[email protected]>
commit 731b82bb1750a906c1e7f070aedf5505995ebea7 upstream.
Fix two places where we need to adjust down the max response size for ioctl when it is used together with compounding.
--- fs/cifs/smb2ops.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
fs/cifs/smb2ops.c +7 -2
@@ -1523,7 +1523,9 @@ smb2_ioctl_query_info(const unsigned intCOMPOUND_FID ,COMPOUND_FID , qi.info_type, true, buffer, qi.output_buffer_length, - CIFSMaxBufSize); + CIFSMaxBufSize - +MAX_SMB2_CREATE_RESPONSE_SIZE - + MAX_SMB2_CLOSE_RESPONSE_SIZE); } }else if (qi.flags ==PASSTHRU_SET_INFO ) {/* Can eventually relax perm check since server enforces too */
@@ -2697,7 +2699,10 @@ smb2_query_symlink(const unsigned int xi rc =SMB2_ioctl_init (tcon, &rqst[1 ], fid.persistent_fid, fid.volatile_fid,FSCTL_GET_REPARSE_POINT , - true/* is_fctl */ ,NULL ,0 , CIFSMaxBufSize); + true/* is_fctl */ ,NULL ,0 , + CIFSMaxBufSize - +MAX_SMB2_CREATE_RESPONSE_SIZE - +MAX_SMB2_CLOSE_RESPONSE_SIZE );if (rc) goto querty_exit;
Greg Kroah-Hartman
maintainerPATCH 31/56 cifs: Fix memory allocation in __smb2_handle_cancelled_cmd()
In reply to Greg Kroah-HartmanFrom: Paulo Alcantara (SUSE) <[email protected]>
commit 0a5a98863c9debc02387b3d23c46d187756f5e2b upstream.
__smb2_handle_cancelled_cmd() is called under a spin lock held in cifs_mid_q_entry_release(), so make its memory allocation GFP_ATOMIC.
This issue was observed when running xfstests generic/028:
[ 1722.589204] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72064 cmd: 5 [ 1722.590687] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72065 cmd: 17 [ 1722.593529] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72066 cmd: 6 [ 1723.039014] BUG: sleeping function called from invalid context at mm/slab.h:565 [ 1723.040710] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 30877, name: cifsd [ 1723.045098] CPU: 3 PID: 30877 Comm: cifsd Not tainted 5.5.0-rc4+ #313 [ 1723.046256] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 [ 1723.048221] Call Trace: [ 1723.048689] dump_stack+0x97/0xe0 [ 1723.049268] ___might_sleep.cold+0xd1/0xe1 [ 1723.050069] kmem_cache_alloc_trace+0x204/0x2b0 [ 1723.051051] __smb2_handle_cancelled_cmd+0x40/0x140 [cifs] [ 1723.052137] smb2_handle_cancelled_mid+0xf6/0x120 [cifs] [ 1723.053247] cifs_mid_q_entry_release+0x44d/0x630 [cifs] [ 1723.054351] ? cifs_reconnect+0x26a/0x1620 [cifs] [ 1723.055325] cifs_demultiplex_thread+0xad4/0x14a0 [cifs] [ 1723.056458] ? cifs_handle_standard+0x2c0/0x2c0 [cifs] [ 1723.057365] ? kvm_sched_clock_read+0x14/0x30 [ 1723.058197] ? sched_clock+0x5/0x10 [ 1723.058838] ? sched_clock_cpu+0x18/0x110 [ 1723.059629] ? lockdep_hardirqs_on+0x17d/0x250 [ 1723.060456] kthread+0x1ab/0x200 [ 1723.061149] ? cifs_handle_standard+0x2c0/0x2c0 [cifs] [ 1723.062078] ? kthread_create_on_node+0xd0/0xd0 [ 1723.062897] ret_from_fork+0x3a/0x50
--- fs/cifs/smb2misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2misc.c +1 -1
@@ -743,7 +743,7 @@ __smb2_handle_cancelled_cmd(struct cifs_ {struct close_cancelled_open *cancelled; - cancelled =kzalloc (sizeof (*cancelled),GFP_KERNEL ); + cancelled =kzalloc (sizeof (*cancelled),GFP_ATOMIC );if (!cancelled)return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 32/56 ath9k: fix storage endpoint lookup
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 0ef332951e856efa89507cdd13ba8f4fb8d4db12 upstream.
Make sure to use the current alternate setting when verifying the storage interface descriptors to avoid submitting an URB to an invalid endpoint.
Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on.
--- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/hif_usb.c +1 -1
@@ -1216,7 +1216,7 @@ err_fw:static int send_eject_command (struct usb_interface *interface) {struct usb_device *udev =interface_to_usbdev (interface); -struct usb_host_interface *iface_desc = &interface->altsetting[0 ]; +struct usb_host_interface *iface_desc = interface->cur_altsetting;struct usb_endpoint_descriptor *endpoint;unsigned char *cmd;u8 bulk_out_ep;
Greg Kroah-Hartman
maintainerPATCH 33/56 brcmfmac: fix interface sanity check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 3428fbcd6e6c0850b1a8b2a12082b7b2aabb3da3 upstream.
Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface.
Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on.
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +2 -2
@@ -1348,7 +1348,7 @@ brcmf_usb_probe(struct usb_interface *in goto fail; } - desc = &intf->altsetting[0 ].desc; + desc = &intf->cur_altsetting->desc;if ((desc->bInterfaceClass !=USB_CLASS_VENDOR_SPEC ) || (desc->bInterfaceSubClass !=2 ) || (desc->bInterfaceProtocol !=0xff )) {
@@ -1361,7 +1361,7 @@ brcmf_usb_probe(struct usb_interface *in num_of_eps = desc->bNumEndpoints;for (ep =0 ; ep < num_of_eps; ep++) { - endpoint = &intf->altsetting[0 ].endpoint[ep].desc; + endpoint = &intf->cur_altsetting->endpoint[ep].desc; endpoint_num =usb_endpoint_num (endpoint);if (!usb_endpoint_xfer_bulk (endpoint))continue ;
Greg Kroah-Hartman
maintainerPATCH 34/56 rtl8xxxu: fix interface sanity check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 39a4281c312f2d226c710bc656ce380c621a2b16 upstream.
Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface.
Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on.
--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +1 -1
@@ -6384,7 +6384,7 @@ static int rtl8xxxu_parse_usb(struct rtlu8 dir, xtype, num;int ret =0 ; - host_interface = &interface->altsetting[0 ]; + host_interface = interface->cur_altsetting; interface_desc = &host_interface->desc; endpoints = interface_desc->bNumEndpoints;
Greg Kroah-Hartman
maintainerPATCH 35/56 zd1211rw: fix storage endpoint lookup
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 2d68bb2687abb747558b933e80845ff31570a49c upstream.
Make sure to use the current alternate setting when verifying the storage interface descriptors to avoid submitting an URB to an invalid endpoint.
Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on.
--- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/zydas/zd1211rw/zd_usb.c +1 -1
@@ -1263,7 +1263,7 @@ static void print_id(struct usb_device *static int eject_installer (struct usb_interface *intf) {struct usb_device *udev =interface_to_usbdev (intf); -struct usb_host_interface *iface_desc = &intf->altsetting[0 ]; +struct usb_host_interface *iface_desc = intf->cur_altsetting;struct usb_endpoint_descriptor *endpoint;unsigned char *cmd;u8 bulk_out_ep;
Greg Kroah-Hartman
maintainerPATCH 36/56 mvneta driver disallow XDP program on hardware buffer management
In reply to Greg Kroah-HartmanFrom: Sven Auhagen <[email protected]>
[ Upstream commit 79572c98c554dcdb080bca547c871a51716dcdf8 ]
Recently XDP Support was added to the mvneta driver for software buffer management only.
It is still possible to attach an XDP program if hardware buffer management is used.
It is not doing anything at that point.
The patch disallows attaching XDP programs to mvneta if hardware buffer management is used.
I am sorry about that. It is my first submission and I am having some troubles with the format of my emails.
v4 -> v5:
- Remove extra tabs
v3 -> v4:
- Please ignore v3 I accidentally submitted my other patch with git-send-mail and v4 is correct
v2 -> v3:
- My mailserver corrupted the patch
resubmission with git-send-email
v1 -> v2:
- Fixing the patches indentation
--- drivers/net/ethernet/marvell/mvneta.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/marvell/mvneta.c +6 -0
@@ -4226,6 +4226,12 @@ static int mvneta_xdp_setup(struct net_dreturn -EOPNOTSUPP ; } +if (pp->bm_priv) { +NL_SET_ERR_MSG_MOD (extack, +"Hardware Buffer Management not supported on XDP" ); +return -EOPNOTSUPP ; + } + need_update = !!pp->xdp_prog != !!prog;if (running && need_update)mvneta_stop (dev);
Greg Kroah-Hartman
maintainerPATCH 37/56 net_sched: ematch: reject invalid TCF_EM_SIMPLE
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 55cd9f67f1e45de8517cdaab985fb8e56c0bc1d8 ]
It is possible for malicious userspace to set TCF_EM_SIMPLE bit even for matches that should not have this bit set.
This can fool two places using tcf_em_is_simple()
1) tcf_em_tree_destroy() -> memory leak of em->data if ops->destroy() is NULL
2) tcf_em_tree_dump() wrongly report/leak 4 low-order bytes of a kernel pointer.
BUG: memory leak
unreferenced object 0xffff888121850a40 (size 32):
comm "syz-executor927", pid 7193, jiffies 4294941655 (age 19.840s)
hex dump (first 32 bytes):
00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000f67036ea>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
[<00000000f67036ea>] slab_post_alloc_hook mm/slab.h:586 [inline]
[<00000000f67036ea>] slab_alloc mm/slab.c:3320 [inline]
[<00000000f67036ea>] __do_kmalloc mm/slab.c:3654 [inline]
[<00000000f67036ea>] __kmalloc_track_caller+0x165/0x300 mm/slab.c:3671
[<00000000fab0cc8e>] kmemdup+0x27/0x60 mm/util.c:127
[<00000000d9992e0a>] kmemdup include/linux/string.h:453 [inline]
[<00000000d9992e0a>] em_nbyte_change+0x5b/0x90 net/sched/em_nbyte.c:32
[<000000007e04f711>] tcf_em_validate net/sched/ematch.c:241 [inline]
[<000000007e04f711>] tcf_em_tree_validate net/sched/ematch.c:359 [inline]
[<000000007e04f711>] tcf_em_tree_validate+0x332/0x46f net/sched/ematch.c:300
[<000000007a769204>] basic_set_parms net/sched/cls_basic.c:157 [inline]
[<000000007a769204>] basic_change+0x1d7/0x5f0 net/sched/cls_basic.c:219
[<00000000e57a5997>] tc_new_tfilter+0x566/0xf70 net/sched/cls_api.c:2104
[<0000000074b68559>] rtnetlink_rcv_msg+0x3b2/0x4b0 net/core/rtnetlink.c:5415
[<00000000b7fe53fb>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477
[<00000000e83a40d0>] rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5442
[<00000000d62ba933>] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
[<00000000d62ba933>] netlink_unicast+0x223/0x310 net/netlink/af_netlink.c:1328
[<0000000088070f72>] netlink_sendmsg+0x2c0/0x570 net/netlink/af_netlink.c:1917
[<00000000f70b15ea>] sock_sendmsg_nosec net/socket.c:639 [inline]
[<00000000f70b15ea>] sock_sendmsg+0x54/0x70 net/socket.c:659
[<00000000ef95a9be>] ____sys_sendmsg+0x2d0/0x300 net/socket.c:2330
[<00000000b650f1ab>] ___sys_sendmsg+0x8a/0xd0 net/socket.c:2384
[<0000000055bfa74a>] __sys_sendmsg+0x80/0xf0 net/socket.c:2417
[<000000002abac183>] __do_sys_sendmsg net/socket.c:2426 [inline]
[<000000002abac183>] __se_sys_sendmsg net/socket.c:2424 [inline]
[<000000002abac183>] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2424--- net/sched/ematch.c | 3 +++ 1 file changed, 3 insertions(+)
net/sched/ematch.c +3 -0
@@ -238,6 +238,9 @@ static int tcf_em_validate(struct tcf_pr goto errout;if (em->ops->change) { + err = -EINVAL ; +if (em_hdr->flags &TCF_EM_SIMPLE ) + goto errout; err = em->ops->change (net, data, data_len, em);if (err <0 ) goto errout;
Greg Kroah-Hartman
maintainerPATCH 38/56 net_sched: fix ops->bind_class() implementations
In reply to Greg Kroah-HartmanFrom: Cong Wang <[email protected]>
[ Upstream commit 2e24cd755552350b94a7617617c6877b8cbcb701 ]
The current implementations of ops->bind_class() are merely searching for classid and updating class in the struct tcf_result, without invoking either of cl_ops->bind_tcf() or cl_ops->unbind_tcf(). This breaks the design of them as qdisc's like cbq use them to count filters too. This is why syzbot triggered the warning in cbq_destroy_class().
In order to fix this, we have to call cl_ops->bind_tcf() and cl_ops->unbind_tcf() like the filter binding path. This patch does so by refactoring out two helper functions __tcf_bind_filter() and __tcf_unbind_filter(), which are lockless and accept a Qdisc pointer, then teaching each implementation to call them correctly.
Note, we merely pass the Qdisc pointer as an opaque pointer to each filter, they only need to pass it down to the helper functions without understanding it at all.
--- include/net/pkt_cls.h | 33 +++++++++++++++++++-------------- include/net/sch_generic.h | 3 ++- net/sched/cls_basic.c | 11 ++++++++--- net/sched/cls_bpf.c | 11 ++++++++--- net/sched/cls_flower.c | 11 ++++++++--- net/sched/cls_fw.c | 11 ++++++++--- net/sched/cls_matchall.c | 11 ++++++++--- net/sched/cls_route.c | 11 ++++++++--- net/sched/cls_rsvp.h | 11 ++++++++--- net/sched/cls_tcindex.c | 11 ++++++++--- net/sched/cls_u32.c | 11 ++++++++--- net/sched/sch_api.c | 6 ++++-- 12 files changed, 97 insertions(+), 44 deletions(-)
include/net/pkt_cls.h +19 -14
@@ -141,31 +141,38 @@ __cls_set_class(unsigned long *clp, unsireturn xchg (clp, cl); } -static inline unsigned long -cls_set_class (struct Qdisc *q,unsigned long *clp,unsigned long cl) +static inline void +__tcf_bind_filter (struct Qdisc *q,struct tcf_result *r,unsigned long base) { -unsigned long old_cl; +unsigned long cl; -sch_tree_lock (q); - old_cl =__cls_set_class (clp, cl); -sch_tree_unlock (q); -return old_cl; + cl = q->ops->cl_ops->bind_tcf (q, base, r->classid); + cl =__cls_set_class (&r->class, cl); +if (cl) + q->ops->cl_ops->unbind_tcf (q, cl); }static inline void tcf_bind_filter (struct tcf_proto *tp,struct tcf_result *r,unsigned long base) {struct Qdisc *q = tp->chain->block->q; -unsigned long cl;/* Check q as it is not set for shared blocks. In that case, * setting class is not supported. */ if (!q)return ; - cl = q->ops->cl_ops->bind_tcf (q, base, r->classid); - cl =cls_set_class (q, &r->class, cl); -if (cl) +sch_tree_lock (q); +__tcf_bind_filter (q, r, base); +sch_tree_unlock (q); +} + +static inline void +__tcf_unbind_filter (struct Qdisc *q,struct tcf_result *r) +{ +unsigned long cl; + +if ((cl =__cls_set_class (&r->class,0 )) !=0 ) q->ops->cl_ops->unbind_tcf (q, cl); }
@@ -173,12 +180,10 @@ static inline void tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r) { struct Qdisc *q = tp->chain->block->q; -unsigned long cl;if (!q)return ; -if ((cl =__cls_set_class (&r->class,0 )) !=0 ) - q->ops->cl_ops->unbind_tcf (q, cl); +__tcf_unbind_filter (q, r); } struct tcf_exts {
include/net/sch_generic.h +2 -1
@@ -318,7 +318,8 @@ struct tcf_proto_ops { void *type_data);void (*hw_del)(struct tcf_proto *tp,void *type_data); -void (*bind_class)(void *,u32 ,unsigned long ); +void (*bind_class)(void *,u32 ,unsigned long , +void *,unsigned long ); void * (*tmplt_create)(struct net *net, struct tcf_chain *chain, struct nlattr **tca,
net/sched/cls_basic.c +8 -3
@@ -263,12 +263,17 @@ skip: } } -static void basic_bind_class (void *fh,u32 classid,unsigned long cl) +static void basic_bind_class (void *fh,u32 classid,unsigned long cl,void *q, +unsigned long base) {struct basic_filter *f = fh; -if (f && f->res.classid == classid) - f->res.class = cl; +if (f && f->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &f->res, base); +else +__tcf_unbind_filter (q, &f->res); + } } static int basic_dump(struct net *net, struct tcf_proto *tp, void *fh,
net/sched/cls_bpf.c +8 -3
@@ -631,12 +631,17 @@ nla_put_failure:return -1 ; } -static void cls_bpf_bind_class (void *fh,u32 classid,unsigned long cl) +static void cls_bpf_bind_class (void *fh,u32 classid,unsigned long cl, +void *q,unsigned long base) {struct cls_bpf_prog *prog = fh; -if (prog && prog->res.classid == classid) - prog->res.class = cl; +if (prog && prog->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &prog->res, base); +else +__tcf_unbind_filter (q, &prog->res); + } } static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg,
net/sched/cls_flower.c +8 -3
@@ -2765,12 +2765,17 @@ nla_put_failure:return -EMSGSIZE ; } -static void fl_bind_class (void *fh,u32 classid,unsigned long cl) +static void fl_bind_class (void *fh,u32 classid,unsigned long cl,void *q, +unsigned long base) {struct cls_fl_filter *f = fh; -if (f && f->res.classid == classid) - f->res.class = cl; +if (f && f->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &f->res, base); +else +__tcf_unbind_filter (q, &f->res); + } }static bool fl_delete_empty (struct tcf_proto *tp)
net/sched/cls_fw.c +8 -3
@@ -419,12 +419,17 @@ nla_put_failure:return -1 ; } -static void fw_bind_class (void *fh,u32 classid,unsigned long cl) +static void fw_bind_class (void *fh,u32 classid,unsigned long cl,void *q, +unsigned long base) {struct fw_filter *f = fh; -if (f && f->res.classid == classid) - f->res.class = cl; +if (f && f->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &f->res, base); +else +__tcf_unbind_filter (q, &f->res); + } }static struct tcf_proto_ops cls_fw_ops__read_mostly = {
net/sched/cls_matchall.c +8 -3
@@ -393,12 +393,17 @@ nla_put_failure:return -1 ; } -static void mall_bind_class (void *fh,u32 classid,unsigned long cl) +static void mall_bind_class (void *fh,u32 classid,unsigned long cl,void *q, +unsigned long base) {struct cls_mall_head *head = fh; -if (head && head->res.classid == classid) - head->res.class = cl; +if (head && head->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &head->res, base); +else +__tcf_unbind_filter (q, &head->res); + } }static struct tcf_proto_ops cls_mall_ops__read_mostly = {
net/sched/cls_route.c +8 -3
@@ -641,12 +641,17 @@ nla_put_failure:return -1 ; } -static void route4_bind_class (void *fh,u32 classid,unsigned long cl) +static void route4_bind_class (void *fh,u32 classid,unsigned long cl,void *q, +unsigned long base) {struct route4_filter *f = fh; -if (f && f->res.classid == classid) - f->res.class = cl; +if (f && f->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &f->res, base); +else +__tcf_unbind_filter (q, &f->res); + } }static struct tcf_proto_ops cls_route4_ops__read_mostly = {
net/sched/cls_rsvp.h +8 -3
@@ -738,12 +738,17 @@ nla_put_failure:return -1 ; } -static void rsvp_bind_class (void *fh,u32 classid,unsigned long cl) +static void rsvp_bind_class (void *fh,u32 classid,unsigned long cl,void *q, +unsigned long base) {struct rsvp_filter *f = fh; -if (f && f->res.classid == classid) - f->res.class = cl; +if (f && f->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &f->res, base); +else +__tcf_unbind_filter (q, &f->res); + } }static struct tcf_proto_ops RSVP_OPS __read_mostly = {
net/sched/cls_tcindex.c +8 -3
@@ -654,12 +654,17 @@ nla_put_failure:return -1 ; } -static void tcindex_bind_class (void *fh,u32 classid,unsigned long cl) +static void tcindex_bind_class (void *fh,u32 classid,unsigned long cl, +void *q,unsigned long base) {struct tcindex_filter_result *r = fh; -if (r && r->res.classid == classid) - r->res.class = cl; +if (r && r->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &r->res, base); +else +__tcf_unbind_filter (q, &r->res); + } }static struct tcf_proto_ops cls_tcindex_ops__read_mostly = {
net/sched/cls_u32.c +8 -3
@@ -1255,12 +1255,17 @@ static int u32_reoffload(struct tcf_protreturn 0 ; } -static void u32_bind_class (void *fh,u32 classid,unsigned long cl) +static void u32_bind_class (void *fh,u32 classid,unsigned long cl,void *q, +unsigned long base) {struct tc_u_knode *n = fh; -if (n && n->res.classid == classid) - n->res.class = cl; +if (n && n->res.classid == classid) { +if (cl) +__tcf_bind_filter (q, &n->res, base); +else +__tcf_unbind_filter (q, &n->res); + } } static int u32_dump(struct net *net, struct tcf_proto *tp, void *fh,
net/sched/sch_api.c +4 -2
@@ -1891,8 +1891,9 @@ static int tclass_del_notify(struct netstruct tcf_bind_args {struct tcf_walker w; -u32 classid; +unsigned long base;unsigned long cl; +u32 classid; };static int tcf_node_bind (struct tcf_proto *tp,void *n,struct tcf_walker *arg)
@@ -1903,7 +1904,7 @@ static int tcf_node_bind(struct tcf_protstruct Qdisc *q =tcf_block_q (tp->chain->block);sch_tree_lock (q); - tp->ops->bind_class (n, a->classid, a->cl); + tp->ops->bind_class (n, a->classid, a->cl, q, a->base);sch_tree_unlock (q); }return 0 ;
@@ -1936,6 +1937,7 @@ static void tc_bind_tclass(struct Qdisc arg.w.fn = tcf_node_bind; arg.classid = clid; + arg.base = cl; arg.cl = new_cl; tp->ops->walk (tp, &arg.w, true); }
Greg Kroah-Hartman
maintainerPATCH 39/56 net_sched: walk through all child classes in tc_bind_tclass()
In reply to Greg Kroah-HartmanFrom: Cong Wang <[email protected]>
[ Upstream commit 760d228e322e99cdf6d81b4b60a268b8f13cf67a ]
In a complex TC class hierarchy like this:
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100Mbit \
avpkt 1000 cell 8
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit \
rate 6Mbit weight 0.6Mbit prio 8 allot 1514 cell 8 maxburst 20 \
avpkt 1000 bounded
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip \
sport 80 0xffff flowid 1:3
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip \
sport 25 0xffff flowid 1:4
tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 100Mbit \
rate 5Mbit weight 0.5Mbit prio 5 allot 1514 cell 8 maxburst 20 \
avpkt 1000
tc class add dev eth0 parent 1:1 classid 1:4 cbq bandwidth 100Mbit \
rate 3Mbit weight 0.3Mbit prio 5 allot 1514 cell 8 maxburst 20 \
avpkt 1000
where filters are installed on qdisc 1:0, so we can't merely search from class 1:1 when creating class 1:3 and class 1:4. We have to walk through all the child classes of the direct parent qdisc. Otherwise we would miss filters those need reverse binding.
--- net/sched/sch_api.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-)
net/sched/sch_api.c +30 -11
@@ -1910,22 +1910,24 @@ static int tcf_node_bind(struct tcf_protreturn 0 ; } -static void tc_bind_tclass (struct Qdisc *q,u32 portid,u32 clid, -unsigned long new_cl) +struct tc_bind_class_args { +struct qdisc_walker w; +unsigned long new_cl; +u32 portid; +u32 clid; +}; + +static int tc_bind_class_walker (struct Qdisc *q,unsigned long cl, +struct qdisc_walker *w) { +struct tc_bind_class_args *a = (struct tc_bind_class_args *)w;const struct Qdisc_class_ops *cops = q->ops->cl_ops;struct tcf_block *block;struct tcf_chain *chain; -unsigned long cl; - cl = cops->find (q, portid); -if (!cl) -return ; -if (!cops->tcf_block) -return ; block = cops->tcf_block (q, cl,NULL );if (!block) -return ; +return 0 ;for (chain =tcf_get_next_chain (block,NULL ); chain; chain =tcf_get_next_chain (block, chain)) {
@@ -1936,12 +1938,29 @@ static void tc_bind_tclass(struct Qdiscstruct tcf_bind_args arg = {}; arg.w.fn = tcf_node_bind; - arg.classid = clid; + arg.classid = a->clid; arg.base = cl; - arg.cl = new_cl; + arg.cl = a->new_cl; tp->ops->walk(tp, &arg.w, true); } } + +return 0 ; +} + +static void tc_bind_tclass (struct Qdisc *q,u32 portid,u32 clid, +unsigned long new_cl) +{ +const struct Qdisc_class_ops *cops = q->ops->cl_ops; +struct tc_bind_class_args args = {}; + +if (!cops->tcf_block) +return ; + args.portid = portid; + args.clid = clid; + args.new_cl = new_cl; + args.w.fn = tc_bind_class_walker; + q->ops->cl_ops->walk (q, &args.w); }#else
Greg Kroah-Hartman
maintainerPATCH 40/56 net: socionext: fix possible user-after-free in netsec_process_rx
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
[ Upstream commit b5e82e3c89c78ee0407ea8e8087af5519b6c7bae ]
Fix possible use-after-free in in netsec_process_rx that can occurs if the first packet is sent to the normal networking stack and the following one is dropped by the bpf program attached to the xdp hook. Fix the issue defining the skb pointer in the 'budget' loop
--- drivers/net/ethernet/socionext/netsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/socionext/netsec.c +1 -1
@@ -929,7 +929,6 @@ static int netsec_process_rx(struct netsstruct netsec_rx_pkt_info rx_info;enum dma_data_direction dma_dir;struct bpf_prog *xdp_prog; -struct sk_buff *skb =NULL ;u16 xdp_xmit =0 ;u32 xdp_act =0 ;int done =0 ;
@@ -943,6 +942,7 @@ static int netsec_process_rx(struct netsstruct netsec_de *de = dring->vaddr + (DESC_SZ * idx);struct netsec_desc *desc = &dring->desc[idx];struct page *page =virt_to_page (desc->addr); +struct sk_buff *skb =NULL ;u32 xdp_result =XDP_PASS ;u16 pkt_len, desc_len;dma_addr_t dma_handle;
Greg Kroah-Hartman
maintainerPATCH 41/56 net: socionext: fix xdp_result initialization in netsec_process_rx
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
[ Upstream commit 02758cb6dac31a2b4bd9e535cffbe718acd46404 ]
Fix xdp_result initialization in netsec_process_rx in order to not increase rx counters if there is no bpf program attached to the xdp hook and napi_gro_receive returns GRO_DROP
--- drivers/net/ethernet/socionext/netsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/socionext/netsec.c +1 -1
@@ -942,8 +942,8 @@ static int netsec_process_rx(struct netsstruct netsec_de *de = dring->vaddr + (DESC_SZ * idx);struct netsec_desc *desc = &dring->desc[idx];struct page *page =virt_to_page (desc->addr); +u32 xdp_result =NETSEC_XDP_PASS ;struct sk_buff *skb =NULL ; -u32 xdp_result =XDP_PASS ;u16 pkt_len, desc_len;dma_addr_t dma_handle;struct xdp_buff xdp;
Greg Kroah-Hartman
maintainerPATCH 42/56 udp: segment looped gso packets correctly
In reply to Greg Kroah-HartmanFrom: Willem de Bruijn <[email protected]>
[ Upstream commit 6cd021a58c18a1731f7e47f83e172c0c302d65e5 ]
Multicast and broadcast packets can be looped from egress to ingress pre segmentation with dev_loopback_xmit. That function unconditionally sets ip_summed to CHECKSUM_UNNECESSARY.
udp_rcv_segment segments gso packets in the udp rx path. Segmentation usually executes on egress, and does not expect packets of this type. __udp_gso_segment interprets !CHECKSUM_PARTIAL as CHECKSUM_NONE. But the offsets are not correct for gso_make_checksum.
UDP GSO packets are of type CHECKSUM_PARTIAL, with their uh->check set to the correct pseudo header checksum. Reset ip_summed to this type. (CHECKSUM_PARTIAL is allowed on ingress, see comments in skbuff.h)
--- include/net/udp.h | 3 +++ 1 file changed, 3 insertions(+)
include/net/udp.h +3 -0
@@ -476,6 +476,9 @@ static inline struct sk_buff *udp_rcv_seif (!inet_get_convert_csum (sk)) features |=NETIF_F_IP_CSUM |NETIF_F_IPV6_CSUM ; +if (skb->pkt_type ==PACKET_LOOPBACK ) + skb->ip_summed =CHECKSUM_PARTIAL ; +/* the GSO CB lays after the UDP one, no need to save and restore any * CB fragment */
Greg Kroah-Hartman
maintainerPATCH 43/56 mlxsw: minimal: Fix an error handling path in mlxsw_m_port_create()
In reply to Greg Kroah-HartmanFrom: Christophe JAILLET <[email protected]>
[ Upstream commit 6dd4b4f3936e17fedea1308bc70e9716f68bf232 ]
An 'alloc_etherdev()' called is not ballanced by a corresponding 'free_netdev()' call in one error handling path.
Slighly reorder the error handling code to catch the missed case.
--- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/minimal.c +1 -1
@@ -213,8 +213,8 @@ mlxsw_m_port_create(struct mlxsw_m *mlxs err_register_netdev: mlxsw_m->ports[local_port] =NULL ; -free_netdev (dev); err_dev_addr_get: +free_netdev (dev); err_alloc_etherdev:mlxsw_core_port_fini (mlxsw_m->core, local_port);return err;
Greg Kroah-Hartman
maintainerPATCH 44/56 net: include struct nhmsg size in nh nlmsg size
In reply to Greg Kroah-HartmanFrom: Stephen Worley <[email protected]>
[ Upstream commit f9e95555757915fc194288862d2978e370fe316b ]
Include the size of struct nhmsg size when calculating how much of a payload to allocate in a new netlink nexthop notification message.
Without this, we will fail to fill the skbuff at certain nexthop group sizes.
You can reproduce the failure with the following iproute2 commands:
ip link add dummy1 type dummy
ip link add dummy2 type dummy
ip link add dummy3 type dummy
ip link add dummy4 type dummy
ip link add dummy5 type dummy
ip link add dummy6 type dummy
ip link add dummy7 type dummy
ip link add dummy8 type dummy
ip link add dummy9 type dummy
ip link add dummy10 type dummy
ip link add dummy11 type dummy
ip link add dummy12 type dummy
ip link add dummy13 type dummy
ip link add dummy14 type dummy
ip link add dummy15 type dummy
ip link add dummy16 type dummy
ip link add dummy17 type dummy
ip link add dummy18 type dummy
ip link add dummy19 type dummy
ip ro add 1.1.1.1/32 dev dummy1
ip ro add 1.1.1.2/32 dev dummy2
ip ro add 1.1.1.3/32 dev dummy3
ip ro add 1.1.1.4/32 dev dummy4
ip ro add 1.1.1.5/32 dev dummy5
ip ro add 1.1.1.6/32 dev dummy6
ip ro add 1.1.1.7/32 dev dummy7
ip ro add 1.1.1.8/32 dev dummy8
ip ro add 1.1.1.9/32 dev dummy9
ip ro add 1.1.1.10/32 dev dummy10 ip ro add 1.1.1.11/32 dev dummy11 ip ro add 1.1.1.12/32 dev dummy12 ip ro add 1.1.1.13/32 dev dummy13 ip ro add 1.1.1.14/32 dev dummy14 ip ro add 1.1.1.15/32 dev dummy15 ip ro add 1.1.1.16/32 dev dummy16 ip ro add 1.1.1.17/32 dev dummy17 ip ro add 1.1.1.18/32 dev dummy18 ip ro add 1.1.1.19/32 dev dummy19
ip next add id 1 via 1.1.1.1 dev dummy1 ip next add id 2 via 1.1.1.2 dev dummy2 ip next add id 3 via 1.1.1.3 dev dummy3 ip next add id 4 via 1.1.1.4 dev dummy4 ip next add id 5 via 1.1.1.5 dev dummy5 ip next add id 6 via 1.1.1.6 dev dummy6 ip next add id 7 via 1.1.1.7 dev dummy7 ip next add id 8 via 1.1.1.8 dev dummy8 ip next add id 9 via 1.1.1.9 dev dummy9 ip next add id 10 via 1.1.1.10 dev dummy10 ip next add id 11 via 1.1.1.11 dev dummy11 ip next add id 12 via 1.1.1.12 dev dummy12 ip next add id 13 via 1.1.1.13 dev dummy13 ip next add id 14 via 1.1.1.14 dev dummy14 ip next add id 15 via 1.1.1.15 dev dummy15 ip next add id 16 via 1.1.1.16 dev dummy16 ip next add id 17 via 1.1.1.17 dev dummy17 ip next add id 18 via 1.1.1.18 dev dummy18 ip next add id 19 via 1.1.1.19 dev dummy19
ip next add id 1111 group 1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19 ip next del id 1111
--- net/ipv4/nexthop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/ipv4/nexthop.c +3 -1
@@ -321,7 +321,9 @@ static size_t nh_nlmsg_size_single(strucstatic size_t nh_nlmsg_size (struct nexthop *nh) { -size_t sz =nla_total_size (4 );/* NHA_ID */ +size_t sz =NLMSG_ALIGN (sizeof (struct nhmsg )); + + sz +=nla_total_size (4 );/* NHA_ID */ if (nh->is_group) sz +=nh_nlmsg_size_grp (nh);
Greg Kroah-Hartman
maintainerPATCH 45/56 rxrpc: Fix use-after-free in rxrpc_receive_data()
In reply to Greg Kroah-HartmanFrom: David Howells <[email protected]>
[ Upstream commit 122d74fac84204b9a98263636f6f9a3b2e665639 ]
The subpacket scanning loop in rxrpc_receive_data() references the subpacket count in the private data part of the sk_buff in the loop termination condition. However, when the final subpacket is pasted into the ring buffer, the function is no longer has a ref on the sk_buff and should not be looking at sp->* any more. This point is actually marked in the code when skb is cleared (but sp is not - which is an error).
Fix this by caching sp->nr_subpackets in a local variable and using that instead.
Also clear 'sp' to catch accesses after that point.
This can show up as an oops in rxrpc_get_skb() if sp->nr_subpackets gets trashed by the sk_buff getting freed and reused in the meantime.
--- net/rxrpc/input.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
net/rxrpc/input.c +7 -5
@@ -413,7 +413,7 @@ static void rxrpc_input_data(struct rxrp {struct rxrpc_skb_priv *sp =rxrpc_skb (skb);enum rxrpc_call_state state; -unsigned int j; +unsigned int j, nr_subpackets;rxrpc_serial_t serial = sp->hdr.serial, ack_serial =0 ;rxrpc_seq_t seq0 = sp->hdr.seq, hard_ack;bool immediate_ack = false, jumbo_bad = false;
@@ -457,7 +457,8 @@ static void rxrpc_input_data(struct rxrp call->ackr_prev_seq = seq0; hard_ack =READ_ONCE (call->rx_hard_ack); -if (sp->nr_subpackets >1 ) { + nr_subpackets = sp->nr_subpackets; +if (nr_subpackets >1 ) {if (call->nr_jumbo_bad >3 ) { ack =RXRPC_ACK_NOSPACE ; ack_serial = serial;
@@ -465,11 +466,11 @@ static void rxrpc_input_data(struct rxrp } } -for (j =0 ; j < sp->nr_subpackets; j++) { +for (j =0 ; j < nr_subpackets; j++) {rxrpc_serial_t serial = sp->hdr.serial + j;rxrpc_seq_t seq = seq0 + j;unsigned int ix = seq &RXRPC_RXTX_BUFF_MASK ; -bool terminal = (j == sp->nr_subpackets -1 ); +bool terminal = (j == nr_subpackets -1 );bool last = terminal && (sp->rx_flags &RXRPC_SKB_INCL_LAST );u8 flags, annotation = j;
@@ -506,7 +507,7 @@ static void rxrpc_input_data(struct rxrp }if (call->rxtx_buffer[ix]) { -rxrpc_input_dup_data (call, seq, sp->nr_subpackets >1 , +rxrpc_input_dup_data (call, seq, nr_subpackets >1 , &jumbo_bad);if (ack !=RXRPC_ACK_DUPLICATE ) { ack =RXRPC_ACK_DUPLICATE ;
@@ -564,6 +565,7 @@ static void rxrpc_input_data(struct rxrp* ring. */ skb =NULL ; + sp =NULL ; }if (last) {
Greg Kroah-Hartman
maintainerPATCH 46/56 rsi: fix use-after-free on failed probe and unbind
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit e93cd35101b61e4c79149be2cfc927c4b28dc60c upstream.
Make sure to stop both URBs before returning after failed probe as well as on disconnect to avoid use-after-free in the completion handler.
--- drivers/net/wireless/rsi/rsi_91x_usb.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/net/wireless/rsi/rsi_91x_usb.c +17 -1
@@ -292,6 +292,15 @@ out:dev_kfree_skb (rx_cb->rx_skb); } +static void rsi_rx_urb_kill (struct rsi_hw *adapter,u8 ep_num) +{ +struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; +struct rx_usb_ctrl_block *rx_cb = &dev->rx_cb[ep_num -1 ]; +struct urb *urb = rx_cb->rx_urb; + +usb_kill_urb (urb); +} +/** * rsi_rx_urb_submit() - This function submits the given URB to the USB stack. * @adapter: Pointer to the adapter structure.
@@ -823,10 +832,13 @@ static int rsi_probe(struct usb_interfacif (adapter->priv->coex_mode >1 ) { status =rsi_rx_urb_submit (adapter,BT_EP );if (status) - goto err1; + goto err_kill_wlan_urb; }return 0 ; + +err_kill_wlan_urb: +rsi_rx_urb_kill (adapter,WLAN_EP ); err1:rsi_deinit_usb_interface (adapter); err:
@@ -857,6 +869,10 @@ static void rsi_disconnect(struct usb_in adapter->priv->bt_adapter =NULL ; } +if (adapter->priv->coex_mode >1 ) +rsi_rx_urb_kill (adapter,BT_EP ); +rsi_rx_urb_kill (adapter,WLAN_EP ); +rsi_reset_card (adapter);rsi_deinit_usb_interface (adapter);rsi_91x_deinit (adapter);
Greg Kroah-Hartman
maintainerPATCH 47/56 rsi: fix use-after-free on probe errors
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 92aafe77123ab478e5f5095878856ab0424910da upstream.
The driver would fail to stop the command timer in most error paths, something which specifically could lead to the timer being freed while still active on I/O errors during probe.
Fix this by making sure that each function starting the timer also stops it in all relevant error paths.
--- drivers/net/wireless/rsi/rsi_91x_hal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/rsi/rsi_91x_hal.c +6 -6
@@ -622,6 +622,7 @@ static int bl_cmd(struct rsi_hw *adapterbl_start_cmd_timer (adapter, timeout); status =bl_write_cmd (adapter, cmd, exp_resp, ®out_val);if (status <0 ) { +bl_stop_cmd_timer (adapter);rsi_dbg (ERR_ZONE ,"%s: Command %s (%0x) writing failed..\n" , __func__, str, cmd);
@@ -737,10 +738,9 @@ static int ping_pong_write(struct rsi_hw } status =bl_cmd (adapter, cmd_req, cmd_resp, str); -if (status) { -bl_stop_cmd_timer (adapter); +if (status)return status; - } +return 0 ; }
@@ -828,10 +828,9 @@ static int auto_fw_upgrade(struct rsi_hw status =bl_cmd (adapter,EOF_REACHED ,FW_LOADING_SUCCESSFUL ,"EOF_REACHED" ); -if (status) { -bl_stop_cmd_timer (adapter); +if (status)return status; - } +rsi_dbg (INFO_ZONE ,"FW loading is done and FW is running..\n" );return 0 ; }
@@ -849,6 +848,7 @@ static int rsi_hal_prepare_fwload(struct ®out_val, RSI_COMMON_REG_SIZE);if (status <0 ) { +bl_stop_cmd_timer (adapter);rsi_dbg (ERR_ZONE ,"%s: REGOUT read failed\n" , __func__);return status;
Greg Kroah-Hartman
maintainerPATCH 48/56 rsi: fix memory leak on failed URB submission
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 47768297481184932844ab01a86752ba31a38861 upstream.
Make sure to free the skb on failed receive-URB submission (e.g. on disconnect or currently also due to a missing endpoint).
--- drivers/net/wireless/rsi/rsi_91x_usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/rsi/rsi_91x_usb.c +3 -1
@@ -338,8 +338,10 @@ static int rsi_rx_urb_submit(struct rsi_ rx_cb); status =usb_submit_urb (urb,GFP_KERNEL ); -if (status) +if (status) {rsi_dbg (ERR_ZONE ,"%s: Failed in urb submission\n" , __func__); +dev_kfree_skb (skb); + }return status; }
Greg Kroah-Hartman
maintainerPATCH 49/56 rsi: fix non-atomic allocation in completion handler
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit b9b9f9fea21830f85cf0148cd8dce001ae55ead1 upstream.
USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL.
--- drivers/net/wireless/rsi/rsi_91x_usb.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/net/wireless/rsi/rsi_91x_usb.c +7 -6
@@ -16,6 +16,7 @@*/ #include <linux/module.h> +#include <linux/types.h> #include <net/rsi_91x.h> #include "rsi_usb.h" #include "rsi_hal.h"
@@ -29,7 +30,7 @@ MODULE_PARM_DESC(dev_oper_mode,"9[Wi-Fi STA + BT LE], 13[Wi-Fi STA + BT classic + BT LE]\n" "6[AP + BT classic], 14[AP + BT classic + BT LE]"); -static int rsi_rx_urb_submit (struct rsi_hw *adapter,u8 ep_num); +static int rsi_rx_urb_submit (struct rsi_hw *adapter,u8 ep_num,gfp_t flags);/** * rsi_usb_card_write() - This function writes to the USB Card.
@@ -285,7 +286,7 @@ static void rsi_rx_done_handler(struct u status =0 ; out: -if (rsi_rx_urb_submit (dev->priv, rx_cb->ep_num)) +if (rsi_rx_urb_submit (dev->priv, rx_cb->ep_num,GFP_ATOMIC ))rsi_dbg (ERR_ZONE ,"%s: Failed in urb submission" , __func__);if (status)
@@ -307,7 +308,7 @@ static void rsi_rx_urb_kill(struct rsi_h* * Return: 0 on success, a negative error code on failure. */ -static int rsi_rx_urb_submit (struct rsi_hw *adapter,u8 ep_num) +static int rsi_rx_urb_submit (struct rsi_hw *adapter,u8 ep_num,gfp_t mem_flags) {struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;struct rx_usb_ctrl_block *rx_cb = &dev->rx_cb[ep_num -1 ];
@@ -337,7 +338,7 @@ static int rsi_rx_urb_submit(struct rsi_ rsi_rx_done_handler, rx_cb); - status =usb_submit_urb (urb,GFP_KERNEL ); + status =usb_submit_urb (urb, mem_flags);if (status) {rsi_dbg (ERR_ZONE ,"%s: Failed in urb submission\n" , __func__);dev_kfree_skb (skb);
@@ -827,12 +828,12 @@ static int rsi_probe(struct usb_interfacrsi_dbg (INIT_ZONE ,"%s: Device Init Done\n" , __func__); } - status =rsi_rx_urb_submit (adapter,WLAN_EP ); + status =rsi_rx_urb_submit (adapter,WLAN_EP ,GFP_KERNEL );if (status) goto err1;if (adapter->priv->coex_mode >1 ) { - status =rsi_rx_urb_submit (adapter,BT_EP ); + status =rsi_rx_urb_submit (adapter,BT_EP ,GFP_KERNEL );if (status) goto err_kill_wlan_urb; }
Greg Kroah-Hartman
maintainerPATCH 50/56 crypto: af_alg - Use bh_lock_sock in sk_destruct
In reply to Greg Kroah-HartmanFrom: Herbert Xu <[email protected]>
commit 37f96694cf73ba116993a9d2d99ad6a75fa7fdb0 upstream.
As af_alg_release_parent may be called from BH context (most notably due to an async request that only completes after socket closure, or as reported here because of an RCU-delayed sk_destruct call), we must use bh_lock_sock instead of lock_sock.
--- crypto/af_alg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
crypto/af_alg.c +4 -2
@@ -134,11 +134,13 @@ void af_alg_release_parent(struct sock * sk = ask->parent; ask =alg_sk (sk); -lock_sock (sk); +local_bh_disable (); +bh_lock_sock (sk); ask->nokey_refcnt -= nokey;if (!last) last = !--ask->refcnt; -release_sock (sk); +bh_unlock_sock (sk); +local_bh_enable ();if (last)sock_put (sk);
Greg Kroah-Hartman
maintainerPATCH 51/56 crypto: vmx - reject xts inputs that are too short
In reply to Greg Kroah-HartmanFrom: Daniel Axtens <[email protected]>
commit 1372a51b88fa0d5a8ed2803e4975c98da3f08463 upstream.
When the kernel XTS implementation was extended to deal with ciphertext stealing in commit 8083b1bf8163 ("crypto: xts - add support for ciphertext stealing"), a check was added to reject inputs that were too short.
However, in the vmx enablement - commit 239668419349 ("crypto: vmx/xts - use fallback for ciphertext stealing"), that check wasn't added to the vmx implementation. This disparity leads to errors like the following:
alg: skcipher: p8_aes_xts encryption unexpectedly succeeded on test vector "random: len=0 klen=64"; expected_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[<flush>66.99%@+10, 33.1%@alignmask+1155]"
Return -EINVAL if asked to operate with a cryptlen smaller than the AES block size. This brings vmx in line with the generic implementation.
--- drivers/crypto/vmx/aes_xts.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/vmx/aes_xts.c +3 -0
@@ -84,6 +84,9 @@ static int p8_aes_xts_crypt(struct skcipu8 tweak[AES_BLOCK_SIZE ];int ret; +if (req->cryptlen <AES_BLOCK_SIZE ) +return -EINVAL ; +if (!crypto_simd_usable () || (req->cryptlen %XTS_BLOCK_SIZE ) !=0 ) {struct skcipher_request *subreq =skcipher_request_ctx (req);
Greg Kroah-Hartman
maintainerPATCH 52/56 crypto: caam - do not reset pointer size from MCFGR register
In reply to Greg Kroah-HartmanFrom: Iuliana Prodan <[email protected]>
commit 7278fa25aa0ebcc0e62c39b12071069df13f7e77 upstream.
In commit 'a1cf573ee95 ("crypto: caam - select DMA address size at runtime")' CAAM pointer size (caam_ptr_size) is changed from sizeof(dma_addr_t) to runtime value computed from MCFGR register. Therefore, do not reset MCFGR[PS].
--- drivers/crypto/caam/ctrl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/crypto/caam/ctrl.c +2 -4
@@ -671,11 +671,9 @@ static int caam_probe(struct platform_deof_node_put (np);if (!ctrlpriv->mc_en) -clrsetbits_32 (&ctrl->mcr,MCFGR_AWCACHE_MASK |MCFGR_LONG_PTR , +clrsetbits_32 (&ctrl->mcr,MCFGR_AWCACHE_MASK ,MCFGR_AWCACHE_CACH |MCFGR_AWCACHE_BUFF | -MCFGR_WDENABLE |MCFGR_LARGE_BURST | - (sizeof (dma_addr_t) ==sizeof (u64) ? -MCFGR_LONG_PTR :0 )); +MCFGR_WDENABLE |MCFGR_LARGE_BURST );handle_imx6_err005766 (&ctrl->mcr);
Greg Kroah-Hartman
maintainerPATCH 53/56 crypto: pcrypt - Fix user-after-free on module unload
In reply to Greg Kroah-HartmanFrom: Herbert Xu <[email protected]>
commit 07bfd9bdf568a38d9440c607b72342036011f727 upstream.
On module unload of pcrypt we must unregister the crypto algorithms first and then tear down the padata structure. As otherwise the crypto algorithms are still alive and can be used while the padata structure is being freed.
--- crypto/pcrypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
crypto/pcrypt.c +2 -1
@@ -362,11 +362,12 @@ err: static void __exit pcrypt_exit(void) { +crypto_unregister_template (&pcrypt_tmpl); +pcrypt_fini_padata (pencrypt);pcrypt_fini_padata (pdecrypt);kset_unregister (pcrypt_kset); -crypto_unregister_template (&pcrypt_tmpl); }subsys_initcall (pcrypt_init);
Greg Kroah-Hartman
maintainerPATCH 54/56 KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE
In reply to Greg Kroah-HartmanFrom: Andrew Murray <[email protected]>
commit 4942dc6638b07b5326b6d2faa142635c559e7cd5 upstream.
On VHE systems arch.mdcr_el2 is written to mdcr_el2 at vcpu_load time to set options for self-hosted debug and the performance monitors extension.
Unfortunately the value of arch.mdcr_el2 is not calculated until kvm_arm_setup_debug() in the run loop after the vcpu has been loaded. This means that the initial brief iterations of the run loop use a zero value of mdcr_el2 - until the vcpu is preempted. This also results in a delay between changes to vcpu->guest_debug taking effect.
Fix this by writing to mdcr_el2 in kvm_arm_setup_debug() on VHE systems when a change to arch.mdcr_el2 has been detected.
--- arch/arm64/kvm/debug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm64/kvm/debug.c +5 -1
@@ -101,7 +101,7 @@ void kvm_arm_reset_debug_ptr(struct kvm_void kvm_arm_setup_debug (struct kvm_vcpu *vcpu) {bool trap_debug = !(vcpu->arch.flags &KVM_ARM64_DEBUG_DIRTY ); -unsigned long mdscr; +unsigned long mdscr, orig_mdcr_el2 = vcpu->arch.mdcr_el2;trace_kvm_arm_setup_debug (vcpu, vcpu->guest_debug);
@@ -197,6 +197,10 @@ void kvm_arm_setup_debug(struct kvm_vcpuif (vcpu_read_sys_reg (vcpu,MDSCR_EL1 ) & (DBG_MDSCR_KDE |DBG_MDSCR_MDE )) vcpu->arch.flags |=KVM_ARM64_DEBUG_DIRTY ; +/* Write mdcr_el2 changes since vcpu_load on VHE systems */ +if (has_vhe () && orig_mdcr_el2 != vcpu->arch.mdcr_el2) +write_sysreg (vcpu->arch.mdcr_el2, mdcr_el2); +trace_kvm_arm_set_dreg32 ("MDCR_EL2" , vcpu->arch.mdcr_el2);trace_kvm_arm_set_dreg32 ("MDSCR_EL1" ,vcpu_read_sys_reg (vcpu,MDSCR_EL1 )); }
Greg Kroah-Hartman
maintainerPATCH 55/56 Revert "um: Enable CONFIG_CONSTRUCTORS"
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit 87c9366e17259040a9118e06b6dc8de986e5d3d1 upstream.
This reverts commit 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS").
There are two issues with this commit, uncovered by Anton in tests on some (Debian) systems:
1) I completely forgot to call any constructors if CONFIG_CONSTRUCTORS isn't set. Don't recall now if it just wasn't needed on my system, or if I never tested this case.
2) With that fixed, it works - with CONFIG_CONSTRUCTORS *unset*. If I set CONFIG_CONSTRUCTORS, it fails again, which isn't totally unexpected since whatever wanted to run is likely to have to run before the kernel init etc. that calls the constructors in this case.
Basically, some constructors that gcc emits (libc has?) need to run very early during init; the failure mode otherwise was that the ptrace fork test already failed:
----------------------
$ ./linux mem=512M Core dump limits : soft - 0 hard - NONE Checking that ptrace can change system call numbers...check_ptrace : child exited with exitcode 6, while expecting 0; status 0x67f Aborted ----------------------
Thinking more about this, it's clear that we simply cannot support CONFIG_CONSTRUCTORS in UML. All the cases we need now (gcov, kasan) involve not use of the __attribute__((constructor)), but instead some constructor code/entry generated by gcc. Therefore, we cannot distinguish between kernel constructors and system constructors.
Thus, revert this commit.
--- arch/um/include/asm/common.lds.S | 2 +- arch/um/kernel/dyn.lds.S | 1 + init/Kconfig | 1 + kernel/gcov/Kconfig | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-)
arch/um/include/asm/common.lds.S +1 -1
@@ -82,8 +82,8 @@ __preinit_array_end = .; } .init_array : { - /* dummy - we call this ourselves */ __init_array_start = .; + *(.init_array) __init_array_end = .; } .fini_array : {
arch/um/kernel/dyn.lds.S +1 -0
@@ -103,6 +103,7 @@ SECTIONS be empty, which isn't pretty. */ . = ALIGN(32 / 8); .preinit_array : { *(.preinit_array) } + .init_array : { *(.init_array) } .fini_array : { *(.fini_array) } .data : { INIT_TASK_DATA(KERNEL_STACK_SIZE)
init/Kconfig +1 -0
@@ -54,6 +54,7 @@ config CC_DISABLE_WARN_MAYBE_UNINITIALIZ config CONSTRUCTORS bool + depends on !UML config IRQ_WORK bool
kernel/gcov/Kconfig +1 -1
@@ -4,7 +4,7 @@ menu "GCOV-based kernel profiling" config GCOV_KERNEL bool "Enable gcov-based kernel profiling" depends on DEBUG_FS - select CONSTRUCTORS + select CONSTRUCTORS if !UML default n ---help--- This option enables gcov-based code profiling (e.g. for code coverage
Greg Kroah-Hartman
maintainerPATCH 56/56 power/supply: ingenic-battery: Dont change scale if theres only one
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 86b9182df8bb12610d4d6feac45a69f3ed57bfd2 upstream.
The ADC in the JZ4740 can work either in high-precision mode with a 2.5V range, or in low-precision mode with a 7.5V range. The code in place in this driver will select the proper scale according to the maximum voltage of the battery.
The JZ4770 however only has one mode, with a 6.6V range. If only one scale is available, there's no need to change it (and nothing to change it to), and trying to do so will fail with -EINVAL.
--- drivers/power/supply/ingenic-battery.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/power/supply/ingenic-battery.c +11 -4
@@ -100,10 +100,17 @@ static int ingenic_battery_set_scale(strreturn -EINVAL ; } -return iio_write_channel_attribute (bat->channel, - scale_raw[best_idx], - scale_raw[best_idx +1 ], -IIO_CHAN_INFO_SCALE ); +/* Only set scale if there is more than one (fractional) entry */ +if (scale_len >2 ) { + ret =iio_write_channel_attribute (bat->channel, + scale_raw[best_idx], + scale_raw[best_idx +1 ], +IIO_CHAN_INFO_SCALE ); +if (ret) +return ret; + } + +return 0 ; }static enum power_supply_property ingenic_battery_properties[] = {
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Greg Kroah-Hartman
maintainerQuoted 15 lines · shuah
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Thanks for testing all of these and letting me know.
greg k-h
Jon Hunter
maintainerQuoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.5:
13 builds: 13 pass, 0 fail
22 boots: 22 pass, 0 fail
40 tests: 40 pass, 0 failLinux version: 5.5.1-rc1-gad64b54689dd
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 27 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.5:
13 builds: 13 pass, 0 fail 22 boots: 22 pass, 0 fail 40 tests: 40 pass, 0 fail
Quoted 5 lines
Linux version: 5.5.1-rc1-gad64b54689dd
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04
Thanks for testing all of these and letting me know.
greg k-h
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 5.5.1-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.5.y
git commit: ad64b54689dd4e8943ba6ebd8461ab5273f4d665
git describe: v5.5-57-gad64b54689dd
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-5.5-oe/build/v5.5-57-gad64b54689dd
No regressions (compared to build v5.5-54-g04aed3481f3d)
No fixes (compared to build v5.5-54-g04aed3481f3d)
Ran 24154 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15
- x86
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libgpiod
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-mm-tests
* ltp-sched-tests
* ltp-syscalls-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* ltp-nptl-tests
* ltp-pty-tests
* ltp-securebits-tests
* ltp-commands-tests
* ltp-fs-tests
* ltp-math-tests
* ltp-open-posix-tests
* network-basic-tests
* kvm-unit-tests
* libhugetlbfs
* ssuite
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 17 lines · Naresh Kamboju
Quoted 15 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.
Thanks for testing all 3 of these and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
Build results:
total: 157 pass: 157 fail: 0 Qemu test results: total: 388 pass: 388 fail: 0
Guenter
Greg Kroah-Hartman
maintainerQuoted 6 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Quoted 3 lines
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
Build results:
total: 157 pass: 157 fail: 0 Qemu test results: total: 388 pass: 388 fail: 0
Thanks for testing all of these and letting me know.
greg k-h
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.1 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Sat, 01 Feb 2020 18:35:06 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.1-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.
hello ,
compiled and booted 5.5.1-rc1+ . No new errors according to "sudo dmesg -l err"
--
software engineer
rajagiri school of engineering and technology