Merge 5.4.158 into android11-5.4-lts
Changes in 5.4.158 scsi: core: Put LLD module refcnt after SCSI device is released vrf: Revert "Reset skb conntrack connection..." net: ethernet: microchip: lan743x: Fix skb allocation failure media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() Revert "xhci: Set HCD flag to defer primary roothub registration" Revert "usb: core: hcd: Add support for deferring roothub registration" sfc: Fix reading non-legacy supported link modes Revert "drm/ttm: fix memleak in ttm_transfered_destroy" ARM: 9120/1: Revert "amba: make use of -1 IRQs warn" Linux 5.4.158 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I78389a9bc39dca878c4178c11e86adb80c458f8a
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 157
|
||||
SUBLEVEL = 158
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
/*
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -125,7 +125,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().
|
||||
@@ -136,7 +135,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
|
||||
|
||||
Reference in New Issue
Block a user