Odroid XU4 - remove deprecated patches that were breaking build process (#3332)
This commit is contained in:
parent
ae5afb0bd0
commit
7783a2fe6b
File diff suppressed because it is too large
Load Diff
@ -1,331 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 49d639fe5a801..cef1d2704c410 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 157
|
||||
+SUBLEVEL = 158
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
|
||||
index af58768a03937..702284bcd467c 100644
|
||||
--- a/drivers/amba/bus.c
|
||||
+++ b/drivers/amba/bus.c
|
||||
@@ -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;
|
||||
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
|
||||
index a7b88ca8b97b3..fe81c565e7ef8 100644
|
||||
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
|
||||
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
|
||||
@@ -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);
|
||||
}
|
||||
diff --git a/drivers/media/firewire/firedtv-avc.c b/drivers/media/firewire/firedtv-avc.c
|
||||
index 2bf9467b917d1..71991f8638e6b 100644
|
||||
--- a/drivers/media/firewire/firedtv-avc.c
|
||||
+++ b/drivers/media/firewire/firedtv-avc.c
|
||||
@@ -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;
|
||||
}
|
||||
diff --git a/drivers/media/firewire/firedtv-ci.c b/drivers/media/firewire/firedtv-ci.c
|
||||
index 9363d005e2b61..e0d57e09dab0c 100644
|
||||
--- a/drivers/media/firewire/firedtv-ci.c
|
||||
+++ b/drivers/media/firewire/firedtv-ci.c
|
||||
@@ -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);
|
||||
}
|
||||
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
|
||||
index a109120da0e7c..22beeb5be9c41 100644
|
||||
--- a/drivers/net/ethernet/microchip/lan743x_main.c
|
||||
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
|
||||
@@ -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)
|
||||
diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
|
||||
index 86b965875540d..d53e945dd08fc 100644
|
||||
--- a/drivers/net/ethernet/sfc/ethtool.c
|
||||
+++ b/drivers/net/ethernet/sfc/ethtool.c
|
||||
@@ -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;
|
||||
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
|
||||
index 9b626c169554f..f08ed52d51f3f 100644
|
||||
--- a/drivers/net/vrf.c
|
||||
+++ b/drivers/net/vrf.c
|
||||
@@ -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;
|
||||
|
||||
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
|
||||
index 1f5b5c8a7f726..1ce3f90f782fd 100644
|
||||
--- a/drivers/scsi/scsi.c
|
||||
+++ b/drivers/scsi/scsi.c
|
||||
@@ -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);
|
||||
|
||||
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
|
||||
index 6aeb79e744e0b..12064ce76777d 100644
|
||||
--- a/drivers/scsi/scsi_sysfs.c
|
||||
+++ b/drivers/scsi/scsi_sysfs.c
|
||||
@@ -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);
|
||||
}
|
||||
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
|
||||
index 48ff9c66ae46d..d0f45600b6698 100644
|
||||
--- a/drivers/usb/core/hcd.c
|
||||
+++ b/drivers/usb/core/hcd.c
|
||||
@@ -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);
|
||||
|
||||
/*
|
||||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||||
index 4ef7484dff8b2..4bb850370bb6b 100644
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -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");
|
||||
|
||||
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
|
||||
index c0eb85b2981e0..712b2a603645f 100644
|
||||
--- a/include/linux/usb/hcd.h
|
||||
+++ b/include/linux/usb/hcd.h
|
||||
@@ -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
|
||||
@ -1,680 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index cef1d2704c410..602b5167dacd7 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 158
|
||||
+SUBLEVEL = 159
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
|
||||
index 642031b896f64..24a6905d60ee2 100644
|
||||
--- a/arch/x86/kvm/ioapic.c
|
||||
+++ b/arch/x86/kvm/ioapic.c
|
||||
@@ -91,7 +91,7 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
|
||||
static void rtc_irq_eoi_tracking_reset(struct kvm_ioapic *ioapic)
|
||||
{
|
||||
ioapic->rtc_status.pending_eoi = 0;
|
||||
- bitmap_zero(ioapic->rtc_status.dest_map.map, KVM_MAX_VCPU_ID + 1);
|
||||
+ bitmap_zero(ioapic->rtc_status.dest_map.map, KVM_MAX_VCPU_ID);
|
||||
}
|
||||
|
||||
static void kvm_rtc_eoi_tracking_restore_all(struct kvm_ioapic *ioapic);
|
||||
diff --git a/arch/x86/kvm/ioapic.h b/arch/x86/kvm/ioapic.h
|
||||
index 283f1f489bcac..ea1a4e0297dae 100644
|
||||
--- a/arch/x86/kvm/ioapic.h
|
||||
+++ b/arch/x86/kvm/ioapic.h
|
||||
@@ -43,13 +43,13 @@ struct kvm_vcpu;
|
||||
|
||||
struct dest_map {
|
||||
/* vcpu bitmap where IRQ has been sent */
|
||||
- DECLARE_BITMAP(map, KVM_MAX_VCPU_ID + 1);
|
||||
+ DECLARE_BITMAP(map, KVM_MAX_VCPU_ID);
|
||||
|
||||
/*
|
||||
* Vector sent to a given vcpu, only valid when
|
||||
* the vcpu's bit in map is set
|
||||
*/
|
||||
- u8 vectors[KVM_MAX_VCPU_ID + 1];
|
||||
+ u8 vectors[KVM_MAX_VCPU_ID];
|
||||
};
|
||||
|
||||
|
||||
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
|
||||
index 4eaef780844ea..2be6687c0148f 100644
|
||||
--- a/drivers/android/binder.c
|
||||
+++ b/drivers/android/binder.c
|
||||
@@ -2257,7 +2257,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
|
||||
binder_dec_node(buffer->target_node, 1, 0);
|
||||
|
||||
off_start_offset = ALIGN(buffer->data_size, sizeof(void *));
|
||||
- off_end_offset = is_failure ? failed_at :
|
||||
+ off_end_offset = is_failure && failed_at ? failed_at :
|
||||
off_start_offset + buffer->offsets_size;
|
||||
for (buffer_offset = off_start_offset; buffer_offset < off_end_offset;
|
||||
buffer_offset += sizeof(binder_size_t)) {
|
||||
@@ -2343,9 +2343,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
|
||||
binder_size_t fd_buf_size;
|
||||
binder_size_t num_valid;
|
||||
|
||||
- if (proc->tsk != current->group_leader) {
|
||||
+ if (is_failure) {
|
||||
/*
|
||||
- * Nothing to do if running in sender context
|
||||
* The fd fixups have not been applied so no
|
||||
* fds need to be closed.
|
||||
*/
|
||||
@@ -3548,6 +3547,7 @@ err_invalid_target_handle:
|
||||
* binder_free_buf() - free the specified buffer
|
||||
* @proc: binder proc that owns buffer
|
||||
* @buffer: buffer to be freed
|
||||
+ * @is_failure: failed to send transaction
|
||||
*
|
||||
* If buffer for an async transaction, enqueue the next async
|
||||
* transaction from the node.
|
||||
@@ -3557,7 +3557,7 @@ err_invalid_target_handle:
|
||||
static void
|
||||
binder_free_buf(struct binder_proc *proc,
|
||||
struct binder_thread *thread,
|
||||
- struct binder_buffer *buffer)
|
||||
+ struct binder_buffer *buffer, bool is_failure)
|
||||
{
|
||||
binder_inner_proc_lock(proc);
|
||||
if (buffer->transaction) {
|
||||
@@ -3585,7 +3585,7 @@ binder_free_buf(struct binder_proc *proc,
|
||||
binder_node_inner_unlock(buf_node);
|
||||
}
|
||||
trace_binder_transaction_buffer_release(buffer);
|
||||
- binder_transaction_buffer_release(proc, thread, buffer, 0, false);
|
||||
+ binder_transaction_buffer_release(proc, thread, buffer, 0, is_failure);
|
||||
binder_alloc_free_buf(&proc->alloc, buffer);
|
||||
}
|
||||
|
||||
@@ -3786,7 +3786,7 @@ static int binder_thread_write(struct binder_proc *proc,
|
||||
proc->pid, thread->pid, (u64)data_ptr,
|
||||
buffer->debug_id,
|
||||
buffer->transaction ? "active" : "finished");
|
||||
- binder_free_buf(proc, thread, buffer);
|
||||
+ binder_free_buf(proc, thread, buffer, false);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4474,7 +4474,7 @@ retry:
|
||||
buffer->transaction = NULL;
|
||||
binder_cleanup_transaction(t, "fd fixups failed",
|
||||
BR_FAILED_REPLY);
|
||||
- binder_free_buf(proc, thread, buffer);
|
||||
+ binder_free_buf(proc, thread, buffer, true);
|
||||
binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
|
||||
"%d:%d %stransaction %d fd fixups failed %d/%d, line %d\n",
|
||||
proc->pid, thread->pid,
|
||||
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
|
||||
index e8aa3d4bda885..1e5a2a0cc6700 100644
|
||||
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
|
||||
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
|
||||
@@ -61,7 +61,7 @@ static int rsi_usb_card_write(struct rsi_hw *adapter,
|
||||
(void *)seg,
|
||||
(int)len,
|
||||
&transfer,
|
||||
- HZ * 5);
|
||||
+ USB_CTRL_SET_TIMEOUT);
|
||||
|
||||
if (status < 0) {
|
||||
rsi_dbg(ERR_ZONE,
|
||||
diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c
|
||||
index 634f57730c1e0..704b04d2980d3 100644
|
||||
--- a/drivers/staging/comedi/drivers/dt9812.c
|
||||
+++ b/drivers/staging/comedi/drivers/dt9812.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/errno.h>
|
||||
+#include <linux/slab.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include "../comedi_usb.h"
|
||||
@@ -237,22 +238,42 @@ static int dt9812_read_info(struct comedi_device *dev,
|
||||
{
|
||||
struct usb_device *usb = comedi_to_usb_dev(dev);
|
||||
struct dt9812_private *devpriv = dev->private;
|
||||
- struct dt9812_usb_cmd cmd;
|
||||
+ struct dt9812_usb_cmd *cmd;
|
||||
+ size_t tbuf_size;
|
||||
int count, ret;
|
||||
+ void *tbuf;
|
||||
|
||||
- cmd.cmd = cpu_to_le32(DT9812_R_FLASH_DATA);
|
||||
- cmd.u.flash_data_info.address =
|
||||
+ tbuf_size = max(sizeof(*cmd), buf_size);
|
||||
+
|
||||
+ tbuf = kzalloc(tbuf_size, GFP_KERNEL);
|
||||
+ if (!tbuf)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ cmd = tbuf;
|
||||
+
|
||||
+ cmd->cmd = cpu_to_le32(DT9812_R_FLASH_DATA);
|
||||
+ cmd->u.flash_data_info.address =
|
||||
cpu_to_le16(DT9812_DIAGS_BOARD_INFO_ADDR + offset);
|
||||
- cmd.u.flash_data_info.numbytes = cpu_to_le16(buf_size);
|
||||
+ cmd->u.flash_data_info.numbytes = cpu_to_le16(buf_size);
|
||||
|
||||
/* DT9812 only responds to 32 byte writes!! */
|
||||
ret = usb_bulk_msg(usb, usb_sndbulkpipe(usb, devpriv->cmd_wr.addr),
|
||||
- &cmd, 32, &count, DT9812_USB_TIMEOUT);
|
||||
+ cmd, sizeof(*cmd), &count, DT9812_USB_TIMEOUT);
|
||||
if (ret)
|
||||
- return ret;
|
||||
+ goto out;
|
||||
+
|
||||
+ ret = usb_bulk_msg(usb, usb_rcvbulkpipe(usb, devpriv->cmd_rd.addr),
|
||||
+ tbuf, buf_size, &count, DT9812_USB_TIMEOUT);
|
||||
+ if (!ret) {
|
||||
+ if (count == buf_size)
|
||||
+ memcpy(buf, tbuf, buf_size);
|
||||
+ else
|
||||
+ ret = -EREMOTEIO;
|
||||
+ }
|
||||
+out:
|
||||
+ kfree(tbuf);
|
||||
|
||||
- return usb_bulk_msg(usb, usb_rcvbulkpipe(usb, devpriv->cmd_rd.addr),
|
||||
- buf, buf_size, &count, DT9812_USB_TIMEOUT);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int dt9812_read_multiple_registers(struct comedi_device *dev,
|
||||
@@ -261,22 +282,42 @@ static int dt9812_read_multiple_registers(struct comedi_device *dev,
|
||||
{
|
||||
struct usb_device *usb = comedi_to_usb_dev(dev);
|
||||
struct dt9812_private *devpriv = dev->private;
|
||||
- struct dt9812_usb_cmd cmd;
|
||||
+ struct dt9812_usb_cmd *cmd;
|
||||
int i, count, ret;
|
||||
+ size_t buf_size;
|
||||
+ void *buf;
|
||||
|
||||
- cmd.cmd = cpu_to_le32(DT9812_R_MULTI_BYTE_REG);
|
||||
- cmd.u.read_multi_info.count = reg_count;
|
||||
+ buf_size = max_t(size_t, sizeof(*cmd), reg_count);
|
||||
+
|
||||
+ buf = kzalloc(buf_size, GFP_KERNEL);
|
||||
+ if (!buf)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ cmd = buf;
|
||||
+
|
||||
+ cmd->cmd = cpu_to_le32(DT9812_R_MULTI_BYTE_REG);
|
||||
+ cmd->u.read_multi_info.count = reg_count;
|
||||
for (i = 0; i < reg_count; i++)
|
||||
- cmd.u.read_multi_info.address[i] = address[i];
|
||||
+ cmd->u.read_multi_info.address[i] = address[i];
|
||||
|
||||
/* DT9812 only responds to 32 byte writes!! */
|
||||
ret = usb_bulk_msg(usb, usb_sndbulkpipe(usb, devpriv->cmd_wr.addr),
|
||||
- &cmd, 32, &count, DT9812_USB_TIMEOUT);
|
||||
+ cmd, sizeof(*cmd), &count, DT9812_USB_TIMEOUT);
|
||||
if (ret)
|
||||
- return ret;
|
||||
+ goto out;
|
||||
+
|
||||
+ ret = usb_bulk_msg(usb, usb_rcvbulkpipe(usb, devpriv->cmd_rd.addr),
|
||||
+ buf, reg_count, &count, DT9812_USB_TIMEOUT);
|
||||
+ if (!ret) {
|
||||
+ if (count == reg_count)
|
||||
+ memcpy(value, buf, reg_count);
|
||||
+ else
|
||||
+ ret = -EREMOTEIO;
|
||||
+ }
|
||||
+out:
|
||||
+ kfree(buf);
|
||||
|
||||
- return usb_bulk_msg(usb, usb_rcvbulkpipe(usb, devpriv->cmd_rd.addr),
|
||||
- value, reg_count, &count, DT9812_USB_TIMEOUT);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int dt9812_write_multiple_registers(struct comedi_device *dev,
|
||||
@@ -285,19 +326,27 @@ static int dt9812_write_multiple_registers(struct comedi_device *dev,
|
||||
{
|
||||
struct usb_device *usb = comedi_to_usb_dev(dev);
|
||||
struct dt9812_private *devpriv = dev->private;
|
||||
- struct dt9812_usb_cmd cmd;
|
||||
+ struct dt9812_usb_cmd *cmd;
|
||||
int i, count;
|
||||
+ int ret;
|
||||
+
|
||||
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
|
||||
+ if (!cmd)
|
||||
+ return -ENOMEM;
|
||||
|
||||
- cmd.cmd = cpu_to_le32(DT9812_W_MULTI_BYTE_REG);
|
||||
- cmd.u.read_multi_info.count = reg_count;
|
||||
+ cmd->cmd = cpu_to_le32(DT9812_W_MULTI_BYTE_REG);
|
||||
+ cmd->u.read_multi_info.count = reg_count;
|
||||
for (i = 0; i < reg_count; i++) {
|
||||
- cmd.u.write_multi_info.write[i].address = address[i];
|
||||
- cmd.u.write_multi_info.write[i].value = value[i];
|
||||
+ cmd->u.write_multi_info.write[i].address = address[i];
|
||||
+ cmd->u.write_multi_info.write[i].value = value[i];
|
||||
}
|
||||
|
||||
/* DT9812 only responds to 32 byte writes!! */
|
||||
- return usb_bulk_msg(usb, usb_sndbulkpipe(usb, devpriv->cmd_wr.addr),
|
||||
- &cmd, 32, &count, DT9812_USB_TIMEOUT);
|
||||
+ ret = usb_bulk_msg(usb, usb_sndbulkpipe(usb, devpriv->cmd_wr.addr),
|
||||
+ cmd, sizeof(*cmd), &count, DT9812_USB_TIMEOUT);
|
||||
+ kfree(cmd);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int dt9812_rmw_multiple_registers(struct comedi_device *dev,
|
||||
@@ -306,17 +355,25 @@ static int dt9812_rmw_multiple_registers(struct comedi_device *dev,
|
||||
{
|
||||
struct usb_device *usb = comedi_to_usb_dev(dev);
|
||||
struct dt9812_private *devpriv = dev->private;
|
||||
- struct dt9812_usb_cmd cmd;
|
||||
+ struct dt9812_usb_cmd *cmd;
|
||||
int i, count;
|
||||
+ int ret;
|
||||
+
|
||||
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
|
||||
+ if (!cmd)
|
||||
+ return -ENOMEM;
|
||||
|
||||
- cmd.cmd = cpu_to_le32(DT9812_RMW_MULTI_BYTE_REG);
|
||||
- cmd.u.rmw_multi_info.count = reg_count;
|
||||
+ cmd->cmd = cpu_to_le32(DT9812_RMW_MULTI_BYTE_REG);
|
||||
+ cmd->u.rmw_multi_info.count = reg_count;
|
||||
for (i = 0; i < reg_count; i++)
|
||||
- cmd.u.rmw_multi_info.rmw[i] = rmw[i];
|
||||
+ cmd->u.rmw_multi_info.rmw[i] = rmw[i];
|
||||
|
||||
/* DT9812 only responds to 32 byte writes!! */
|
||||
- return usb_bulk_msg(usb, usb_sndbulkpipe(usb, devpriv->cmd_wr.addr),
|
||||
- &cmd, 32, &count, DT9812_USB_TIMEOUT);
|
||||
+ ret = usb_bulk_msg(usb, usb_sndbulkpipe(usb, devpriv->cmd_wr.addr),
|
||||
+ cmd, sizeof(*cmd), &count, DT9812_USB_TIMEOUT);
|
||||
+ kfree(cmd);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int dt9812_digital_in(struct comedi_device *dev, u8 *bits)
|
||||
diff --git a/drivers/staging/comedi/drivers/ni_usb6501.c b/drivers/staging/comedi/drivers/ni_usb6501.c
|
||||
index 360e86a19fe32..311632004f08a 100644
|
||||
--- a/drivers/staging/comedi/drivers/ni_usb6501.c
|
||||
+++ b/drivers/staging/comedi/drivers/ni_usb6501.c
|
||||
@@ -144,6 +144,10 @@ static const u8 READ_COUNTER_RESPONSE[] = {0x00, 0x01, 0x00, 0x10,
|
||||
0x00, 0x00, 0x00, 0x02,
|
||||
0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
+/* Largest supported packets */
|
||||
+static const size_t TX_MAX_SIZE = sizeof(SET_PORT_DIR_REQUEST);
|
||||
+static const size_t RX_MAX_SIZE = sizeof(READ_PORT_RESPONSE);
|
||||
+
|
||||
enum commands {
|
||||
READ_PORT,
|
||||
WRITE_PORT,
|
||||
@@ -501,6 +505,12 @@ static int ni6501_find_endpoints(struct comedi_device *dev)
|
||||
if (!devpriv->ep_rx || !devpriv->ep_tx)
|
||||
return -ENODEV;
|
||||
|
||||
+ if (usb_endpoint_maxp(devpriv->ep_rx) < RX_MAX_SIZE)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (usb_endpoint_maxp(devpriv->ep_tx) < TX_MAX_SIZE)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
|
||||
index 7956abcbae22b..7769eadfaf61d 100644
|
||||
--- a/drivers/staging/comedi/drivers/vmk80xx.c
|
||||
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
|
||||
@@ -90,6 +90,9 @@ enum {
|
||||
#define IC3_VERSION BIT(0)
|
||||
#define IC6_VERSION BIT(1)
|
||||
|
||||
+#define MIN_BUF_SIZE 64
|
||||
+#define PACKET_TIMEOUT 10000 /* ms */
|
||||
+
|
||||
enum vmk80xx_model {
|
||||
VMK8055_MODEL,
|
||||
VMK8061_MODEL
|
||||
@@ -157,22 +160,21 @@ static void vmk80xx_do_bulk_msg(struct comedi_device *dev)
|
||||
__u8 rx_addr;
|
||||
unsigned int tx_pipe;
|
||||
unsigned int rx_pipe;
|
||||
- size_t size;
|
||||
+ size_t tx_size;
|
||||
+ size_t rx_size;
|
||||
|
||||
tx_addr = devpriv->ep_tx->bEndpointAddress;
|
||||
rx_addr = devpriv->ep_rx->bEndpointAddress;
|
||||
tx_pipe = usb_sndbulkpipe(usb, tx_addr);
|
||||
rx_pipe = usb_rcvbulkpipe(usb, rx_addr);
|
||||
+ tx_size = usb_endpoint_maxp(devpriv->ep_tx);
|
||||
+ rx_size = usb_endpoint_maxp(devpriv->ep_rx);
|
||||
|
||||
- /*
|
||||
- * The max packet size attributes of the K8061
|
||||
- * input/output endpoints are identical
|
||||
- */
|
||||
- size = usb_endpoint_maxp(devpriv->ep_tx);
|
||||
+ usb_bulk_msg(usb, tx_pipe, devpriv->usb_tx_buf, tx_size, NULL,
|
||||
+ PACKET_TIMEOUT);
|
||||
|
||||
- usb_bulk_msg(usb, tx_pipe, devpriv->usb_tx_buf,
|
||||
- size, NULL, devpriv->ep_tx->bInterval);
|
||||
- usb_bulk_msg(usb, rx_pipe, devpriv->usb_rx_buf, size, NULL, HZ * 10);
|
||||
+ usb_bulk_msg(usb, rx_pipe, devpriv->usb_rx_buf, rx_size, NULL,
|
||||
+ PACKET_TIMEOUT);
|
||||
}
|
||||
|
||||
static int vmk80xx_read_packet(struct comedi_device *dev)
|
||||
@@ -191,7 +193,7 @@ static int vmk80xx_read_packet(struct comedi_device *dev)
|
||||
pipe = usb_rcvintpipe(usb, ep->bEndpointAddress);
|
||||
return usb_interrupt_msg(usb, pipe, devpriv->usb_rx_buf,
|
||||
usb_endpoint_maxp(ep), NULL,
|
||||
- HZ * 10);
|
||||
+ PACKET_TIMEOUT);
|
||||
}
|
||||
|
||||
static int vmk80xx_write_packet(struct comedi_device *dev, int cmd)
|
||||
@@ -212,7 +214,7 @@ static int vmk80xx_write_packet(struct comedi_device *dev, int cmd)
|
||||
pipe = usb_sndintpipe(usb, ep->bEndpointAddress);
|
||||
return usb_interrupt_msg(usb, pipe, devpriv->usb_tx_buf,
|
||||
usb_endpoint_maxp(ep), NULL,
|
||||
- HZ * 10);
|
||||
+ PACKET_TIMEOUT);
|
||||
}
|
||||
|
||||
static int vmk80xx_reset_device(struct comedi_device *dev)
|
||||
@@ -678,12 +680,12 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
|
||||
struct vmk80xx_private *devpriv = dev->private;
|
||||
size_t size;
|
||||
|
||||
- size = usb_endpoint_maxp(devpriv->ep_rx);
|
||||
+ size = max(usb_endpoint_maxp(devpriv->ep_rx), MIN_BUF_SIZE);
|
||||
devpriv->usb_rx_buf = kzalloc(size, GFP_KERNEL);
|
||||
if (!devpriv->usb_rx_buf)
|
||||
return -ENOMEM;
|
||||
|
||||
- size = usb_endpoint_maxp(devpriv->ep_tx);
|
||||
+ size = max(usb_endpoint_maxp(devpriv->ep_rx), MIN_BUF_SIZE);
|
||||
devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
|
||||
if (!devpriv->usb_tx_buf)
|
||||
return -ENOMEM;
|
||||
diff --git a/drivers/staging/media/ipu3/ipu3-css-fw.c b/drivers/staging/media/ipu3/ipu3-css-fw.c
|
||||
index 45aff76198e2c..981693eed8155 100644
|
||||
--- a/drivers/staging/media/ipu3/ipu3-css-fw.c
|
||||
+++ b/drivers/staging/media/ipu3/ipu3-css-fw.c
|
||||
@@ -124,12 +124,11 @@ int imgu_css_fw_init(struct imgu_css *css)
|
||||
/* Check and display fw header info */
|
||||
|
||||
css->fwp = (struct imgu_fw_header *)css->fw->data;
|
||||
- if (css->fw->size < sizeof(struct imgu_fw_header *) ||
|
||||
+ if (css->fw->size < struct_size(css->fwp, binary_header, 1) ||
|
||||
css->fwp->file_header.h_size != sizeof(struct imgu_fw_bi_file_h))
|
||||
goto bad_fw;
|
||||
- if (sizeof(struct imgu_fw_bi_file_h) +
|
||||
- css->fwp->file_header.binary_nr * sizeof(struct imgu_fw_info) >
|
||||
- css->fw->size)
|
||||
+ if (struct_size(css->fwp, binary_header,
|
||||
+ css->fwp->file_header.binary_nr) > css->fw->size)
|
||||
goto bad_fw;
|
||||
|
||||
dev_info(dev, "loaded firmware version %.64s, %u binaries, %zu bytes\n",
|
||||
diff --git a/drivers/staging/media/ipu3/ipu3-css-fw.h b/drivers/staging/media/ipu3/ipu3-css-fw.h
|
||||
index 79ffa70451390..650fd25fc79ee 100644
|
||||
--- a/drivers/staging/media/ipu3/ipu3-css-fw.h
|
||||
+++ b/drivers/staging/media/ipu3/ipu3-css-fw.h
|
||||
@@ -170,7 +170,7 @@ struct imgu_fw_bi_file_h {
|
||||
|
||||
struct imgu_fw_header {
|
||||
struct imgu_fw_bi_file_h file_header;
|
||||
- struct imgu_fw_info binary_header[1]; /* binary_nr items */
|
||||
+ struct imgu_fw_info binary_header[]; /* binary_nr items */
|
||||
};
|
||||
|
||||
/******************* Firmware functions *******************/
|
||||
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
|
||||
index e739d1979c877..6f65a9c9d6cf3 100644
|
||||
--- a/drivers/staging/rtl8192u/r8192U_core.c
|
||||
+++ b/drivers/staging/rtl8192u/r8192U_core.c
|
||||
@@ -236,7 +236,7 @@ int write_nic_byte_E(struct net_device *dev, int indx, u8 data)
|
||||
|
||||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
- indx | 0xfe00, 0, usbdata, 1, HZ / 2);
|
||||
+ indx | 0xfe00, 0, usbdata, 1, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
if (status < 0) {
|
||||
@@ -258,7 +258,7 @@ int read_nic_byte_E(struct net_device *dev, int indx, u8 *data)
|
||||
|
||||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
- indx | 0xfe00, 0, usbdata, 1, HZ / 2);
|
||||
+ indx | 0xfe00, 0, usbdata, 1, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
@@ -286,7 +286,7 @@ int write_nic_byte(struct net_device *dev, int indx, u8 data)
|
||||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
- usbdata, 1, HZ / 2);
|
||||
+ usbdata, 1, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
if (status < 0) {
|
||||
@@ -313,7 +313,7 @@ int write_nic_word(struct net_device *dev, int indx, u16 data)
|
||||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
- usbdata, 2, HZ / 2);
|
||||
+ usbdata, 2, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
if (status < 0) {
|
||||
@@ -340,7 +340,7 @@ int write_nic_dword(struct net_device *dev, int indx, u32 data)
|
||||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
- usbdata, 4, HZ / 2);
|
||||
+ usbdata, 4, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ int read_nic_byte(struct net_device *dev, int indx, u8 *data)
|
||||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
- usbdata, 1, HZ / 2);
|
||||
+ usbdata, 1, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
@@ -394,7 +394,7 @@ int read_nic_word(struct net_device *dev, int indx, u16 *data)
|
||||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
- usbdata, 2, HZ / 2);
|
||||
+ usbdata, 2, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
@@ -418,7 +418,7 @@ static int read_nic_word_E(struct net_device *dev, int indx, u16 *data)
|
||||
|
||||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
- indx | 0xfe00, 0, usbdata, 2, HZ / 2);
|
||||
+ indx | 0xfe00, 0, usbdata, 2, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
@@ -444,7 +444,7 @@ int read_nic_dword(struct net_device *dev, int indx, u32 *data)
|
||||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
- usbdata, 4, HZ / 2);
|
||||
+ usbdata, 4, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c
|
||||
index 9d290bc2fdb7f..2202a0caa252e 100644
|
||||
--- a/drivers/staging/rtl8712/usb_ops_linux.c
|
||||
+++ b/drivers/staging/rtl8712/usb_ops_linux.c
|
||||
@@ -493,7 +493,7 @@ int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value,
|
||||
memcpy(pIo_buf, pdata, len);
|
||||
}
|
||||
status = usb_control_msg(udev, pipe, request, reqtype, value, index,
|
||||
- pIo_buf, len, HZ / 2);
|
||||
+ pIo_buf, len, 500);
|
||||
if (status > 0) { /* Success this control transfer. */
|
||||
if (requesttype == 0x01) {
|
||||
/* For Control read transfer, we have to copy the read
|
||||
diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
|
||||
index d354036ff6c86..f985bb4a42db2 100644
|
||||
--- a/drivers/usb/gadget/udc/Kconfig
|
||||
+++ b/drivers/usb/gadget/udc/Kconfig
|
||||
@@ -330,6 +330,7 @@ config USB_AMD5536UDC
|
||||
config USB_FSL_QE
|
||||
tristate "Freescale QE/CPM USB Device Controller"
|
||||
depends on FSL_SOC && (QUICC_ENGINE || CPM)
|
||||
+ depends on !64BIT || BROKEN
|
||||
help
|
||||
Some of Freescale PowerPC processors have a Full Speed
|
||||
QE/CPM2 USB controller, which support device mode with 4
|
||||
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
|
||||
index 5c6ce1ef3f4b0..c0e344c3a8487 100644
|
||||
--- a/drivers/usb/host/ehci-hcd.c
|
||||
+++ b/drivers/usb/host/ehci-hcd.c
|
||||
@@ -634,7 +634,16 @@ static int ehci_run (struct usb_hcd *hcd)
|
||||
/* Wait until HC become operational */
|
||||
ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
|
||||
msleep(5);
|
||||
- rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT, 0, 100 * 1000);
|
||||
+
|
||||
+ /* For Aspeed, STS_HALT also depends on ASS/PSS status.
|
||||
+ * Check CMD_RUN instead.
|
||||
+ */
|
||||
+ if (ehci->is_aspeed)
|
||||
+ rc = ehci_handshake(ehci, &ehci->regs->command, CMD_RUN,
|
||||
+ 1, 100 * 1000);
|
||||
+ else
|
||||
+ rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT,
|
||||
+ 0, 100 * 1000);
|
||||
|
||||
up_write(&ehci_cf_port_reset_rwsem);
|
||||
|
||||
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
|
||||
index e4fc3f66d43bf..accbcc989c503 100644
|
||||
--- a/drivers/usb/host/ehci-platform.c
|
||||
+++ b/drivers/usb/host/ehci-platform.c
|
||||
@@ -286,6 +286,12 @@ static int ehci_platform_probe(struct platform_device *dev)
|
||||
"has-transaction-translator"))
|
||||
hcd->has_tt = 1;
|
||||
|
||||
+ if (of_device_is_compatible(dev->dev.of_node,
|
||||
+ "aspeed,ast2500-ehci") ||
|
||||
+ of_device_is_compatible(dev->dev.of_node,
|
||||
+ "aspeed,ast2600-ehci"))
|
||||
+ ehci->is_aspeed = 1;
|
||||
+
|
||||
if (soc_device_match(quirk_poll_match))
|
||||
priv->quirk_poll = true;
|
||||
|
||||
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
|
||||
index ac5e967907d14..356738462ce45 100644
|
||||
--- a/drivers/usb/host/ehci.h
|
||||
+++ b/drivers/usb/host/ehci.h
|
||||
@@ -218,6 +218,7 @@ struct ehci_hcd { /* one per controller */
|
||||
unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */
|
||||
unsigned need_oc_pp_cycle:1; /* MPC834X port power */
|
||||
unsigned imx28_write_fix:1; /* For Freescale i.MX28 */
|
||||
+ unsigned is_aspeed:1;
|
||||
|
||||
/* required for usb32 quirk */
|
||||
#define OHCI_CTRL_HCFS (3 << 6)
|
||||
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
|
||||
index ffe462a657b15..4622400ba4ddb 100644
|
||||
--- a/drivers/usb/musb/musb_gadget.c
|
||||
+++ b/drivers/usb/musb/musb_gadget.c
|
||||
@@ -1248,9 +1248,11 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
|
||||
status = musb_queue_resume_work(musb,
|
||||
musb_ep_restart_resume_work,
|
||||
request);
|
||||
- if (status < 0)
|
||||
+ if (status < 0) {
|
||||
dev_err(musb->controller, "%s resume work: %i\n",
|
||||
__func__, status);
|
||||
+ list_del(&request->list);
|
||||
+ }
|
||||
}
|
||||
|
||||
unlock:
|
||||
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
|
||||
index 7442793fe0502..3ba4e060fd051 100644
|
||||
--- a/drivers/usb/storage/unusual_devs.h
|
||||
+++ b/drivers/usb/storage/unusual_devs.h
|
||||
@@ -406,6 +406,16 @@ UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110,
|
||||
"785EPX Storage",
|
||||
USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN),
|
||||
|
||||
+/*
|
||||
+ * Reported by James Buren <braewoods+lkml@braewoods.net>
|
||||
+ * Virtual ISOs cannot be remounted if ejected while the device is locked
|
||||
+ * Disable locking to mimic Windows behavior that bypasses the issue
|
||||
+ */
|
||||
+UNUSUAL_DEV( 0x04c5, 0x2028, 0x0001, 0x0001,
|
||||
+ "iODD",
|
||||
+ "2531/2541",
|
||||
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE),
|
||||
+
|
||||
/*
|
||||
* Not sure who reported this originally but
|
||||
* Pavel Machek <pavel@ucw.cz> reported that the extra US_FL_SINGLE_LUN
|
||||
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
|
||||
index bf30f6ce8dd10..74e487d63c62c 100644
|
||||
--- a/fs/isofs/inode.c
|
||||
+++ b/fs/isofs/inode.c
|
||||
@@ -1328,6 +1328,8 @@ static int isofs_read_inode(struct inode *inode, int relocated)
|
||||
|
||||
de = (struct iso_directory_record *) (bh->b_data + offset);
|
||||
de_len = *(unsigned char *) de;
|
||||
+ if (de_len < sizeof(struct iso_directory_record))
|
||||
+ goto fail;
|
||||
|
||||
if (offset + de_len > bufsize) {
|
||||
int frag1 = bufsize - offset;
|
||||
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
|
||||
index 5569ef6bc1839..23e26a203a9e9 100644
|
||||
--- a/kernel/printk/printk.c
|
||||
+++ b/kernel/printk/printk.c
|
||||
@@ -2193,8 +2193,15 @@ static int __init console_setup(char *str)
|
||||
char *s, *options, *brl_options = NULL;
|
||||
int idx;
|
||||
|
||||
- if (str[0] == 0)
|
||||
+ /*
|
||||
+ * console="" or console=null have been suggested as a way to
|
||||
+ * disable console output. Use ttynull that has been created
|
||||
+ * for exacly this purpose.
|
||||
+ */
|
||||
+ if (str[0] == 0 || strcmp(str, "null") == 0) {
|
||||
+ __add_preferred_console("ttynull", 0, NULL, NULL);
|
||||
return 1;
|
||||
+ }
|
||||
|
||||
if (_braille_console_setup(&str, &brl_options))
|
||||
return 1;
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,309 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index e938662dab289..f552556966f1d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 160
|
||||
+SUBLEVEL = 161
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h
|
||||
index f6136871561dc..9182ce828f540 100644
|
||||
--- a/arch/mips/include/asm/cmpxchg.h
|
||||
+++ b/arch/mips/include/asm/cmpxchg.h
|
||||
@@ -239,6 +239,7 @@ static inline unsigned long __cmpxchg64(volatile void *ptr,
|
||||
" .set " MIPS_ISA_ARCH_LEVEL " \n"
|
||||
/* Load 64 bits from ptr */
|
||||
"1: lld %L0, %3 # __cmpxchg64 \n"
|
||||
+ " .set pop \n"
|
||||
/*
|
||||
* Split the 64 bit value we loaded into the 2 registers that hold the
|
||||
* ret variable.
|
||||
@@ -266,6 +267,8 @@ static inline unsigned long __cmpxchg64(volatile void *ptr,
|
||||
" or %L1, %L1, $at \n"
|
||||
" .set at \n"
|
||||
# endif
|
||||
+ " .set push \n"
|
||||
+ " .set " MIPS_ISA_ARCH_LEVEL " \n"
|
||||
/* Attempt to store new at ptr */
|
||||
" scd %L1, %2 \n"
|
||||
/* If we failed, loop! */
|
||||
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
|
||||
index 7d14e9ae18fb1..2f64f112934b6 100644
|
||||
--- a/arch/parisc/kernel/entry.S
|
||||
+++ b/arch/parisc/kernel/entry.S
|
||||
@@ -1842,7 +1842,7 @@ syscall_restore:
|
||||
|
||||
/* Are we being ptraced? */
|
||||
LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19
|
||||
- ldi _TIF_SYSCALL_TRACE_MASK,%r2
|
||||
+ ldi _TIF_SINGLESTEP|_TIF_BLOCKSTEP,%r2
|
||||
and,COND(=) %r19,%r2,%r0
|
||||
b,n syscall_restore_rfi
|
||||
|
||||
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
|
||||
index c8bd243717b7b..d0cc6c0d74d6b 100644
|
||||
--- a/drivers/pci/msi.c
|
||||
+++ b/drivers/pci/msi.c
|
||||
@@ -395,18 +395,6 @@ static void free_msi_irqs(struct pci_dev *dev)
|
||||
for (i = 0; i < entry->nvec_used; i++)
|
||||
BUG_ON(irq_has_action(entry->irq + i));
|
||||
|
||||
- pci_msi_teardown_msi_irqs(dev);
|
||||
-
|
||||
- list_for_each_entry_safe(entry, tmp, msi_list, list) {
|
||||
- if (entry->msi_attrib.is_msix) {
|
||||
- if (list_is_last(&entry->list, msi_list))
|
||||
- iounmap(entry->mask_base);
|
||||
- }
|
||||
-
|
||||
- list_del(&entry->list);
|
||||
- free_msi_entry(entry);
|
||||
- }
|
||||
-
|
||||
if (dev->msi_irq_groups) {
|
||||
sysfs_remove_groups(&dev->dev.kobj, dev->msi_irq_groups);
|
||||
msi_attrs = dev->msi_irq_groups[0]->attrs;
|
||||
@@ -422,6 +410,18 @@ static void free_msi_irqs(struct pci_dev *dev)
|
||||
kfree(dev->msi_irq_groups);
|
||||
dev->msi_irq_groups = NULL;
|
||||
}
|
||||
+
|
||||
+ pci_msi_teardown_msi_irqs(dev);
|
||||
+
|
||||
+ list_for_each_entry_safe(entry, tmp, msi_list, list) {
|
||||
+ if (entry->msi_attrib.is_msix) {
|
||||
+ if (list_is_last(&entry->list, msi_list))
|
||||
+ iounmap(entry->mask_base);
|
||||
+ }
|
||||
+
|
||||
+ list_del(&entry->list);
|
||||
+ free_msi_entry(entry);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void pci_intx_for_msi(struct pci_dev *dev, int enable)
|
||||
@@ -591,6 +591,9 @@ msi_setup_entry(struct pci_dev *dev, int nvec, struct irq_affinity *affd)
|
||||
goto out;
|
||||
|
||||
pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &control);
|
||||
+ /* Lies, damned lies, and MSIs */
|
||||
+ if (dev->dev_flags & PCI_DEV_FLAGS_HAS_MSI_MASKING)
|
||||
+ control |= PCI_MSI_FLAGS_MASKBIT;
|
||||
|
||||
entry->msi_attrib.is_msix = 0;
|
||||
entry->msi_attrib.is_64 = !!(control & PCI_MSI_FLAGS_64BIT);
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index fb7c5518447da..cf3986d4413f7 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -5777,3 +5777,9 @@ static void apex_pci_fixup_class(struct pci_dev *pdev)
|
||||
}
|
||||
DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a,
|
||||
PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);
|
||||
+
|
||||
+static void nvidia_ion_ahci_fixup(struct pci_dev *pdev)
|
||||
+{
|
||||
+ pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
|
||||
+}
|
||||
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);
|
||||
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
|
||||
index 24396f4d5f2d3..29c7a76d2c658 100644
|
||||
--- a/drivers/scsi/ufs/ufshcd.c
|
||||
+++ b/drivers/scsi/ufs/ufshcd.c
|
||||
@@ -4748,7 +4748,8 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
|
||||
break;
|
||||
} /* end of switch */
|
||||
|
||||
- if ((host_byte(result) != DID_OK) && !hba->silence_err_logs)
|
||||
+ if ((host_byte(result) != DID_OK) &&
|
||||
+ (host_byte(result) != DID_REQUEUE) && !hba->silence_err_logs)
|
||||
ufshcd_print_trs(hba, 1 << lrbp->task_tag, true);
|
||||
return result;
|
||||
}
|
||||
@@ -5661,9 +5662,12 @@ static irqreturn_t ufshcd_intr(int irq, void *__hba)
|
||||
intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
|
||||
}
|
||||
|
||||
- if (retval == IRQ_NONE) {
|
||||
- dev_err(hba->dev, "%s: Unhandled interrupt 0x%08x\n",
|
||||
- __func__, intr_status);
|
||||
+ if (enabled_intr_status && retval == IRQ_NONE &&
|
||||
+ !ufshcd_eh_in_progress(hba)) {
|
||||
+ dev_err(hba->dev, "%s: Unhandled interrupt 0x%08x (-, 0x%08x)\n",
|
||||
+ __func__,
|
||||
+ intr_status,
|
||||
+ enabled_intr_status);
|
||||
ufshcd_dump_regs(hba, 0, UFSHCI_REG_SPACE_SIZE, "host_regs: ");
|
||||
}
|
||||
|
||||
@@ -5705,7 +5709,10 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
|
||||
/*
|
||||
* blk_get_request() is used here only to get a free tag.
|
||||
*/
|
||||
- req = blk_get_request(q, REQ_OP_DRV_OUT, BLK_MQ_REQ_RESERVED);
|
||||
+ req = blk_get_request(q, REQ_OP_DRV_OUT, 0);
|
||||
+ if (IS_ERR(req))
|
||||
+ return PTR_ERR(req);
|
||||
+
|
||||
req->end_io_data = &wait;
|
||||
ufshcd_hold(hba, false);
|
||||
|
||||
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
|
||||
index ab75f41e9c0c9..d11320a4dfcf9 100644
|
||||
--- a/drivers/soc/tegra/pmc.c
|
||||
+++ b/drivers/soc/tegra/pmc.c
|
||||
@@ -579,7 +579,7 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg,
|
||||
|
||||
err = tegra_powergate_enable_clocks(pg);
|
||||
if (err)
|
||||
- goto disable_clks;
|
||||
+ goto powergate_off;
|
||||
|
||||
usleep_range(10, 20);
|
||||
|
||||
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
|
||||
index fad80c97d2476..fdd18c2508115 100644
|
||||
--- a/fs/erofs/zdata.c
|
||||
+++ b/fs/erofs/zdata.c
|
||||
@@ -288,11 +288,10 @@ static inline bool z_erofs_try_inplace_io(struct z_erofs_collector *clt,
|
||||
|
||||
/* callers must be with collection lock held */
|
||||
static int z_erofs_attach_page(struct z_erofs_collector *clt,
|
||||
- struct page *page,
|
||||
- enum z_erofs_page_type type)
|
||||
+ struct page *page, enum z_erofs_page_type type,
|
||||
+ bool pvec_safereuse)
|
||||
{
|
||||
int ret;
|
||||
- bool occupied;
|
||||
|
||||
/* give priority for inplaceio */
|
||||
if (clt->mode >= COLLECT_PRIMARY &&
|
||||
@@ -300,10 +299,9 @@ static int z_erofs_attach_page(struct z_erofs_collector *clt,
|
||||
z_erofs_try_inplace_io(clt, page))
|
||||
return 0;
|
||||
|
||||
- ret = z_erofs_pagevec_enqueue(&clt->vector,
|
||||
- page, type, &occupied);
|
||||
+ ret = z_erofs_pagevec_enqueue(&clt->vector, page, type,
|
||||
+ pvec_safereuse);
|
||||
clt->cl->vcnt += (unsigned int)ret;
|
||||
-
|
||||
return ret ? 0 : -EAGAIN;
|
||||
}
|
||||
|
||||
@@ -654,14 +652,15 @@ hitted:
|
||||
tight &= (clt->mode >= COLLECT_PRIMARY_FOLLOWED);
|
||||
|
||||
retry:
|
||||
- err = z_erofs_attach_page(clt, page, page_type);
|
||||
+ err = z_erofs_attach_page(clt, page, page_type,
|
||||
+ clt->mode >= COLLECT_PRIMARY_FOLLOWED);
|
||||
/* should allocate an additional staging page for pagevec */
|
||||
if (err == -EAGAIN) {
|
||||
struct page *const newpage =
|
||||
__stagingpage_alloc(pagepool, GFP_NOFS);
|
||||
|
||||
err = z_erofs_attach_page(clt, newpage,
|
||||
- Z_EROFS_PAGE_TYPE_EXCLUSIVE);
|
||||
+ Z_EROFS_PAGE_TYPE_EXCLUSIVE, true);
|
||||
if (!err)
|
||||
goto retry;
|
||||
}
|
||||
diff --git a/fs/erofs/zpvec.h b/fs/erofs/zpvec.h
|
||||
index 58556903aa945..6a20b2c3a24cd 100644
|
||||
--- a/fs/erofs/zpvec.h
|
||||
+++ b/fs/erofs/zpvec.h
|
||||
@@ -108,12 +108,17 @@ static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor,
|
||||
static inline bool z_erofs_pagevec_enqueue(struct z_erofs_pagevec_ctor *ctor,
|
||||
struct page *page,
|
||||
enum z_erofs_page_type type,
|
||||
- bool *occupied)
|
||||
+ bool pvec_safereuse)
|
||||
{
|
||||
- *occupied = false;
|
||||
- if (!ctor->next && type)
|
||||
- if (ctor->index + 1 == ctor->nr)
|
||||
+ if (!ctor->next) {
|
||||
+ /* some pages cannot be reused as pvec safely without I/O */
|
||||
+ if (type == Z_EROFS_PAGE_TYPE_EXCLUSIVE && !pvec_safereuse)
|
||||
+ type = Z_EROFS_VLE_PAGE_TYPE_TAIL_SHARED;
|
||||
+
|
||||
+ if (type != Z_EROFS_PAGE_TYPE_EXCLUSIVE &&
|
||||
+ ctor->index + 1 == ctor->nr)
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (ctor->index >= ctor->nr)
|
||||
z_erofs_pagevec_ctor_pagedown(ctor, false);
|
||||
@@ -125,7 +130,6 @@ static inline bool z_erofs_pagevec_enqueue(struct z_erofs_pagevec_ctor *ctor,
|
||||
/* should remind that collector->next never equal to 1, 2 */
|
||||
if (type == (uintptr_t)ctor->next) {
|
||||
ctor->next = page;
|
||||
- *occupied = true;
|
||||
}
|
||||
ctor->pages[ctor->index++] = tagptr_fold(erofs_vtptr_t, page, type);
|
||||
return true;
|
||||
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
|
||||
index 1211ae203face..f68dfef5939f4 100644
|
||||
--- a/fs/ext4/super.c
|
||||
+++ b/fs/ext4/super.c
|
||||
@@ -3071,8 +3071,8 @@ static int ext4_run_li_request(struct ext4_li_request *elr)
|
||||
struct ext4_group_desc *gdp = NULL;
|
||||
ext4_group_t group, ngroups;
|
||||
struct super_block *sb;
|
||||
- unsigned long timeout = 0;
|
||||
int ret = 0;
|
||||
+ u64 start_time;
|
||||
|
||||
sb = elr->lr_super;
|
||||
ngroups = EXT4_SB(sb)->s_groups_count;
|
||||
@@ -3092,13 +3092,12 @@ static int ext4_run_li_request(struct ext4_li_request *elr)
|
||||
ret = 1;
|
||||
|
||||
if (!ret) {
|
||||
- timeout = jiffies;
|
||||
+ start_time = ktime_get_real_ns();
|
||||
ret = ext4_init_inode_table(sb, group,
|
||||
elr->lr_timeout ? 0 : 1);
|
||||
if (elr->lr_timeout == 0) {
|
||||
- timeout = (jiffies - timeout) *
|
||||
- elr->lr_sbi->s_li_wait_mult;
|
||||
- elr->lr_timeout = timeout;
|
||||
+ elr->lr_timeout = nsecs_to_jiffies((ktime_get_real_ns() - start_time) *
|
||||
+ elr->lr_sbi->s_li_wait_mult);
|
||||
}
|
||||
elr->lr_next_sched = jiffies + elr->lr_timeout;
|
||||
elr->lr_next_group = group + 1;
|
||||
diff --git a/include/linux/pci.h b/include/linux/pci.h
|
||||
index 9a937f8b27838..bc35b15efadd0 100644
|
||||
--- a/include/linux/pci.h
|
||||
+++ b/include/linux/pci.h
|
||||
@@ -208,6 +208,8 @@ enum pci_dev_flags {
|
||||
PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 << 10),
|
||||
/* Don't use Relaxed Ordering for TLPs directed at this device */
|
||||
PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 11),
|
||||
+ /* Device does honor MSI masking despite saying otherwise */
|
||||
+ PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12),
|
||||
};
|
||||
|
||||
enum pci_irq_reroute_variant {
|
||||
diff --git a/security/Kconfig b/security/Kconfig
|
||||
index 2a1a2d3962281..52e5109f2c1b6 100644
|
||||
--- a/security/Kconfig
|
||||
+++ b/security/Kconfig
|
||||
@@ -191,6 +191,9 @@ config HARDENED_USERCOPY_PAGESPAN
|
||||
config FORTIFY_SOURCE
|
||||
bool "Harden common str/mem functions against buffer overflows"
|
||||
depends on ARCH_HAS_FORTIFY_SOURCE
|
||||
+ # https://bugs.llvm.org/show_bug.cgi?id=50322
|
||||
+ # https://bugs.llvm.org/show_bug.cgi?id=41459
|
||||
+ depends on !CC_IS_CLANG
|
||||
help
|
||||
Detect overflows of buffers in common string and memory functions
|
||||
where the compiler can determine and validate the buffer sizes.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user