Linux 5.4.158
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 157 +SUBLEVEL = 158 EXTRAVERSION = NAME = Kleptomaniac Octopus
drivers/amba/bus.c +0 -3
@@ -375,9 +375,6 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)void __iomem *tmp;int i, ret; -WARN_ON (dev->irq[0 ] == (unsigned int )-1 ); -WARN_ON (dev->irq[1 ] == (unsigned int )-1 ); - ret =request_resource (parent, &dev->res);if (ret) goto err_out;
drivers/gpu/drm/ttm/ttm_bo_util.c +0 -1
@@ -463,7 +463,6 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo)struct ttm_transfer_obj *fbo; fbo = container_of(bo, struct ttm_transfer_obj, base); -dma_resv_fini (&fbo->base.base._resv);ttm_bo_put (fbo->bo);kfree (fbo); }
drivers/media/firewire/firedtv-avc.c +11 -3
@@ -1165,7 +1165,11 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) read_pos += program_info_length; write_pos += program_info_length; } -while (read_pos < length) { +while (read_pos +4 < length) { +if (write_pos +4 >=sizeof (c->operand) -4 ) { + ret = -EINVAL ; + goto out; + } c->operand[write_pos++] = msg[read_pos++]; c->operand[write_pos++] = msg[read_pos++]; c->operand[write_pos++] = msg[read_pos++];
@@ -1177,13 +1181,17 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) c->operand[write_pos++] = es_info_length >>8 ; c->operand[write_pos++] = es_info_length &0xff ;if (es_info_length >0 ) { +if (read_pos >= length) { + ret = -EINVAL ; + goto out; + } pmt_cmd_id = msg[read_pos++];if (pmt_cmd_id !=1 && pmt_cmd_id !=4 )dev_err (fdtv->device,"invalid pmt_cmd_id %d at stream level\n" , pmt_cmd_id); -if (es_info_length >sizeof (c->operand) -4 - - write_pos) { +if (es_info_length >sizeof (c->operand) -4 - write_pos || + es_info_length > length - read_pos) { ret = -EINVAL ; goto out; }
drivers/media/firewire/firedtv-ci.c +2 -0
@@ -134,6 +134,8 @@ static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) }else { data_length = msg->msg[3 ]; } +if (data_length >sizeof (msg->msg) - data_pos) +return -EINVAL ;return avc_ca_pmt (fdtv, &msg->msg[data_pos], data_length); }
drivers/net/ethernet/microchip/lan743x_main.c +6 -4
@@ -1898,13 +1898,13 @@ static int lan743x_rx_next_index(struct lan743x_rx *rx, int index)return ((++index) % rx->ring_size); } -static struct sk_buff *lan743x_rx_allocate_skb (struct lan743x_rx *rx) +static struct sk_buff *lan743x_rx_allocate_skb (struct lan743x_rx *rx,gfp_t gfp) {int length =0 ; length = (LAN743X_MAX_FRAME_SIZE +ETH_HLEN +4 +RX_HEAD_PADDING );return __netdev_alloc_skb (rx->adapter->netdev, - length,GFP_ATOMIC |GFP_DMA ); + length, gfp); }static void lan743x_rx_update_tail (struct lan743x_rx *rx,int index)
@@ -2077,7 +2077,8 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)struct sk_buff *new_skb =NULL ;int packet_length; - new_skb =lan743x_rx_allocate_skb (rx); + new_skb =lan743x_rx_allocate_skb (rx, +GFP_ATOMIC |GFP_DMA );if (!new_skb) {/* failed to allocate next skb. * Memory is very low.
@@ -2314,7 +2315,8 @@ static int lan743x_rx_ring_init(struct lan743x_rx *rx) rx->last_head =0 ;for (index =0 ; index < rx->ring_size; index++) { -struct sk_buff *new_skb =lan743x_rx_allocate_skb (rx); +struct sk_buff *new_skb =lan743x_rx_allocate_skb (rx, +GFP_KERNEL ); ret =lan743x_rx_init_ring_element (rx, index, new_skb);if (ret)
drivers/net/ethernet/sfc/ethtool.c +2 -8
@@ -128,20 +128,14 @@ efx_ethtool_get_link_ksettings(struct net_device *net_dev, {struct efx_nic *efx =netdev_priv (net_dev);struct efx_link_state *link_state = &efx->link_state; -u32 supported;mutex_lock (&efx->mac_lock); efx->phy_op->get_link_ksettings (efx, cmd);mutex_unlock (&efx->mac_lock);/* Both MACs support pause frames (bidirectional and respond-only) */ -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); - - supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; - -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); +ethtool_link_ksettings_add_link_mode (cmd, supported, Pause); +ethtool_link_ksettings_add_link_mode (cmd, supported, Asym_Pause);if (LOOPBACK_INTERNAL (efx)) { cmd->base.speed = link_state->speed;
drivers/net/vrf.c +0 -4
@@ -1036,8 +1036,6 @@ static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev,bool need_strict =rt6_need_strict (&ipv6_hdr (skb)->daddr);bool is_ndisc =ipv6_ndisc_frame (skb); -nf_reset_ct (skb); -/* loopback, multicast & non-ND link-local traffic; do not push through * packet taps again. Reset pkt_type for upper layers to process skb. * For strict packets with a source LLA, determine the dst using the
@@ -1094,8 +1092,6 @@ static struct sk_buff *vrf_ip_rcv(struct net_device *vrf_dev, skb->skb_iif = vrf_dev->ifindex;IPCB (skb)->flags |=IPSKB_L3SLAVE ; -nf_reset_ct (skb); -if (ipv4_is_multicast (ip_hdr (skb)->daddr)) goto out;
drivers/scsi/scsi.c +3 -1
@@ -555,8 +555,10 @@ EXPORT_SYMBOL(scsi_device_get);*/ void scsi_device_put (struct scsi_device *sdev) { -module_put (sdev->host->hostt->module); +struct module *mod = sdev->host->hostt->module; +put_device (&sdev->sdev_gendev); +module_put (mod); }EXPORT_SYMBOL (scsi_device_put);
drivers/scsi/scsi_sysfs.c +9 -0
@@ -438,9 +438,12 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)struct list_head *this, *tmp;struct scsi_vpd *vpd_pg80 =NULL , *vpd_pg83 =NULL ;unsigned long flags; +struct module *mod; sdev = container_of(work, struct scsi_device, ew.work); + mod = sdev->host->hostt->module; +scsi_dh_release_device (sdev); parent = sdev->sdev_gendev.parent;
@@ -481,11 +484,17 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)if (parent)put_device (parent); +module_put (mod); }static void scsi_device_dev_release (struct device *dev) {struct scsi_device *sdp =to_scsi_device (dev); + +/* Set module pointer as NULL in case of module unloading */ +if (!try_module_get (sdp->host->hostt->module)) + sdp->host->hostt->module =NULL ; +execute_in_process_context (scsi_device_dev_release_usercontext, &sdp->ew); }
drivers/usb/core/hcd.c +6 -23
@@ -2636,7 +2636,6 @@ int usb_add_hcd(struct usb_hcd *hcd, {int retval;struct usb_device *rhdev; -struct usb_hcd *shared_hcd;if (!hcd->skip_phy_initialization &&usb_hcd_is_primary_hcd (hcd)) { hcd->phy_roothub =usb_phy_roothub_alloc (hcd->self.sysdev);
@@ -2793,26 +2792,13 @@ int usb_add_hcd(struct usb_hcd *hcd, goto err_hcd_driver_start; } -/* starting here, usbcore will pay attention to the shared HCD roothub */ - shared_hcd = hcd->shared_hcd; -if (!usb_hcd_is_primary_hcd (hcd) && shared_hcd &&HCD_DEFER_RH_REGISTER (shared_hcd)) { - retval =register_root_hub (shared_hcd); -if (retval !=0 ) - goto err_register_root_hub; - -if (shared_hcd->uses_new_polling &&HCD_POLL_RH (shared_hcd)) -usb_hcd_poll_rh_status (shared_hcd); - } -/* starting here, usbcore will pay attention to this root hub */ -if (!HCD_DEFER_RH_REGISTER (hcd)) { - retval =register_root_hub (hcd); -if (retval !=0 ) - goto err_register_root_hub; + retval =register_root_hub (hcd); +if (retval !=0 ) + goto err_register_root_hub; -if (hcd->uses_new_polling &&HCD_POLL_RH (hcd)) -usb_hcd_poll_rh_status (hcd); - } +if (hcd->uses_new_polling &&HCD_POLL_RH (hcd)) +usb_hcd_poll_rh_status (hcd);return retval;
@@ -2855,7 +2841,6 @@ EXPORT_SYMBOL_GPL(usb_add_hcd);void usb_remove_hcd (struct usb_hcd *hcd) {struct usb_device *rhdev = hcd->self.root_hub; -bool rh_registered;dev_info (hcd->self.controller,"remove, state %x\n" , hcd->state);
@@ -2866,7 +2851,6 @@ void usb_remove_hcd(struct usb_hcd *hcd)dev_dbg (hcd->self.controller,"roothub graceful disconnect\n" );spin_lock_irq (&hcd_root_hub_lock); - rh_registered = hcd->rh_registered; hcd->rh_registered =0 ;spin_unlock_irq (&hcd_root_hub_lock);
@@ -2876,8 +2860,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)cancel_work_sync (&hcd->died_work);mutex_lock (&usb_bus_idr_lock); -if (rh_registered) -usb_disconnect (&rhdev);/* Sets rhdev to NULL */ +usb_disconnect (&rhdev);/* Sets rhdev to NULL */ mutex_unlock (&usb_bus_idr_lock);/*
drivers/usb/host/xhci.c +0 -1
@@ -693,7 +693,6 @@ int xhci_run(struct usb_hcd *hcd)if (ret)xhci_free_command (xhci, command); } -set_bit (HCD_FLAG_DEFER_RH_REGISTER , &hcd->flags);xhci_dbg_trace (xhci, trace_xhci_dbg_init,"Finished xhci_run for USB2 roothub" );
include/linux/usb/hcd.h +0 -2
@@ -124,7 +124,6 @@ struct usb_hcd {#define HCD_FLAG_RH_RUNNING 5/* root hub is running? */ #define HCD_FLAG_DEAD 6/* controller has died? */ #define HCD_FLAG_INTF_AUTHORIZED 7/* authorize interfaces? */ -#define HCD_FLAG_DEFER_RH_REGISTER 8/* Defer roothub registration */ /* The flags can be tested using these macros; they are likely to * be slightly faster than test_bit().
@@ -135,7 +134,6 @@ struct usb_hcd {#define HCD_WAKEUP_PENDING (hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING))#define HCD_RH_RUNNING (hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING))#define HCD_DEAD (hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) -#define HCD_DEFER_RH_REGISTER (hcd) ((hcd)->flags & (1U << HCD_FLAG_DEFER_RH_REGISTER))/* * Specifies if interfaces are authorized by default
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.158 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - drivers/amba/bus.c | 3 -- drivers/gpu/drm/ttm/ttm_bo_util.c | 1 drivers/media/firewire/firedtv-avc.c | 14 +++++++++--- drivers/media/firewire/firedtv-ci.c | 2 + drivers/net/ethernet/microchip/lan743x_main.c | 10 +++++--- drivers/net/ethernet/sfc/ethtool.c | 10 +------- drivers/net/vrf.c | 4 --- drivers/scsi/scsi.c | 4 ++- drivers/scsi/scsi_sysfs.c | 9 ++++++++ drivers/usb/core/hcd.c | 29 +++++--------------------- drivers/usb/host/xhci.c | 1 include/linux/usb/hcd.h | 2 - 13 files changed, 40 insertions(+), 51 deletions(-)
Dan Carpenter (1):
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
Erik Ekman (1):
sfc: Fix reading non-legacy supported link modes
Eugene Crosser (1):
vrf: Revert "Reset skb conntrack connection..."
Greg Kroah-Hartman (4):
Revert "xhci: Set HCD flag to defer primary roothub registration" Revert "usb: core: hcd: Add support for deferring roothub registration" Revert "drm/ttm: fix memleak in ttm_transfered_destroy" Linux 5.4.158
Ming Lei (1):
scsi: core: Put LLD module refcnt after SCSI device is released
Wang Kefeng (1):
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Yuiko Oshino (1):
net: ethernet: microchip: lan743x: Fix skb allocation failure