This is the 5.4.238 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmQa9GUACgkQONu9yGCS aT7WQQ/6A3UoCjvRNAyt6E9eLZtioHQEc3Nrep18tkkMQFTEyv3EMrmS8GWuvwYm n+gsDDzJS+v1irMQnaUm3hBsD5Iji52fwr3FL3ec2cZsLt0ulHFdH+xDakLXV+oe Zs40Hpuf5hLIPpEOi0xsSRHtMQeKRUyeAxw6qHzok3oVPI//vh5VawjpLN4mNYwx EXht4BDpV8A07Qn1SmX91qmfyn6ZLfsyOwGPZPfmL5L57SgAQVHVcKbwLZBcWKaa XCc3oGvVGAUX/93hZzWEGtELYUzjWNK8THX+OdkvFwGqP/JCjx602qtBS52znG76 2cNBIiAzpi115yEFS4xlAEVUHXUNFWJ3duDgYpBuQJX57QuA8SEOLYeycFlZYEMp iIxGUfhnXmn4nSZNNvLKjWv+wyW33tHfBIp8CEdTKizLeL6r9H5Z1yExJE4xGWhJ hpg+qbqHvvcCJ2Yk1qKST3VxoCCHNM3X94nopyrPkRFpUMzzd+lwUiqZSGe6nzVk k/B0Xr/JqWuCc7p9DguwC5yKJNNAKQeL+0vAR/2isE/WM4b26wIwbrECOwLv1Epq ClBNORLmiVgM+lG2LgMJkKxvoIwTtelzGpD6Ybg3MeubJbFoAta9QBLVTuCKVuze VRUbVE4E7jotAOmqp6qdM9r89tAE68laayY82wOFxS6X/T5AaZk= =wski -----END PGP SIGNATURE----- Merge 5.4.238 into android11-5.4-lts Changes in 5.4.238 ext4: fix cgroup writeback accounting with fs-layer encryption xfrm: Allow transport-mode states with AF_UNSPEC selector drm/panfrost: Don't sync rpm suspension after mmu flushing cifs: Move the in_send statistic to __smb_send_rqst() drm/meson: fix 1px pink line on GXM when scaling video overlay clk: HI655X: select REGMAP instead of depending on it docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add() ALSA: hda - add Intel DG1 PCI and HDMI ids ALSA: hda - controller is in GPU on the DG1 ALSA: hda: Add Alderlake-S PCI ID and HDMI codec vid ALSA: hda: Add Intel DG2 PCI ID and HDMI codec vid ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU() netfilter: nft_redir: correct value of inet type `.maxattrs` scsi: core: Fix a comment in function scsi_host_dev_release() scsi: core: Fix a procfs host directory removal regression tcp: tcp_make_synack() can be called from process context nfc: pn533: initialize struct pn533_out_arg properly ipvlan: Make skb->skb_iif track skb->dev for l3s mode i40e: Fix kernel crash during reboot when adapter is in recovery mode qed/qed_dev: guard against a possible division by zero net: tunnels: annotate lockless accesses to dev->needed_headroom net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition net: usb: smsc75xx: Limit packet length to skb->len nvmet: avoid potential UAF in nvmet_req_complete() block: sunvdc: add check for mdesc_grab() returning NULL ipv4: Fix incorrect table ID in IOCTL path net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull net/iucv: Fix size of interrupt data ethernet: sun: add check for the mdesc_grab() hwmon: (adt7475) Display smoothing attributes in correct order hwmon: (adt7475) Fix masking of hysteresis registers hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition hwmon: (ina3221) return prober error code media: m5mols: fix off-by-one loop termination error mmc: atmel-mci: fix race between stop command and start of next command jffs2: correct logic when creating a hole in jffs2_write_begin ext4: fail ext4_iget if special inode unallocated ext4: fix task hung in ext4_xattr_delete_inode drm/amdkfd: Fix an illegal memory access sh: intc: Avoid spurious sizeof-pointer-div warning ext4: fix possible double unlock when moving a directory tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted interconnect: fix mem leak when freeing nodes tracing: Check field value in hist_field_name() tracing: Make tracepoint lockdep check actually test something KVM: nVMX: add missing consistency checks for CR0 and CR4 ftrace: Fix invalid address access in lookup_rec() when index is 0 fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks x86/mm: Fix use of uninitialized buffer in sme_enable() drm/i915: Don't use stolen memory for ring buffers with LLC serial: 8250_em: Fix UART port type s390/ipl: add missing intersection check to ipl_report handling PCI: Unify delay handling for reset and resume HID: core: Provide new max_buffer_size attribute to over-ride the default HID: uhid: Over-ride the default maximum data buffer value with our own Linux 5.4.238 Change-Id: I29d1460644a834fba41654b94a3bb35551976001 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
1e58c0c8e9
@ -1173,7 +1173,7 @@ defined:
|
||||
return
|
||||
-ECHILD and it will be called again in ref-walk mode.
|
||||
|
||||
``_weak_revalidate``
|
||||
``d_weak_revalidate``
|
||||
called when the VFS needs to revalidate a "jumped" dentry. This
|
||||
is called when a path-walk ends at dentry that was not acquired
|
||||
by doing a lookup in the parent directory. This includes "/",
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 237
|
||||
SUBLEVEL = 238
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
@ -57,11 +57,19 @@ static unsigned long find_bootdata_space(struct ipl_rb_components *comps,
|
||||
if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
|
||||
intersects(INITRD_START, INITRD_SIZE, safe_addr, size))
|
||||
safe_addr = INITRD_START + INITRD_SIZE;
|
||||
if (intersects(safe_addr, size, (unsigned long)comps, comps->len)) {
|
||||
safe_addr = (unsigned long)comps + comps->len;
|
||||
goto repeat;
|
||||
}
|
||||
for_each_rb_entry(comp, comps)
|
||||
if (intersects(safe_addr, size, comp->addr, comp->len)) {
|
||||
safe_addr = comp->addr + comp->len;
|
||||
goto repeat;
|
||||
}
|
||||
if (intersects(safe_addr, size, (unsigned long)certs, certs->len)) {
|
||||
safe_addr = (unsigned long)certs + certs->len;
|
||||
goto repeat;
|
||||
}
|
||||
for_each_rb_entry(cert, certs)
|
||||
if (intersects(safe_addr, size, cert->addr, cert->len)) {
|
||||
safe_addr = cert->addr + cert->len;
|
||||
|
@ -2779,7 +2779,7 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu,
|
||||
struct vmcs12 *vmcs12,
|
||||
u32 *exit_qual)
|
||||
{
|
||||
bool ia32e;
|
||||
bool ia32e = !!(vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE);
|
||||
|
||||
*exit_qual = ENTRY_FAIL_DEFAULT;
|
||||
|
||||
@ -2796,6 +2796,13 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (CC((vmcs12->guest_cr0 & (X86_CR0_PG | X86_CR0_PE)) == X86_CR0_PG))
|
||||
return -EINVAL;
|
||||
|
||||
if (CC(ia32e && !(vmcs12->guest_cr4 & X86_CR4_PAE)) ||
|
||||
CC(ia32e && !(vmcs12->guest_cr0 & X86_CR0_PG)))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* If the load IA32_EFER VM-entry control is 1, the following checks
|
||||
* are performed on the field for the IA32_EFER MSR:
|
||||
@ -2807,7 +2814,6 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu,
|
||||
*/
|
||||
if (to_vmx(vcpu)->nested.nested_run_pending &&
|
||||
(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_EFER)) {
|
||||
ia32e = (vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) != 0;
|
||||
if (CC(!kvm_valid_efer(vcpu, vmcs12->guest_ia32_efer)) ||
|
||||
CC(ia32e != !!(vmcs12->guest_ia32_efer & EFER_LMA)) ||
|
||||
CC(((vmcs12->guest_cr0 & X86_CR0_PG) &&
|
||||
|
@ -579,7 +579,8 @@ void __init sme_enable(struct boot_params *bp)
|
||||
cmdline_ptr = (const char *)((u64)bp->hdr.cmd_line_ptr |
|
||||
((u64)bp->ext_cmd_line_ptr << 32));
|
||||
|
||||
cmdline_find_option(cmdline_ptr, cmdline_arg, buffer, sizeof(buffer));
|
||||
if (cmdline_find_option(cmdline_ptr, cmdline_arg, buffer, sizeof(buffer)) < 0)
|
||||
return;
|
||||
|
||||
if (!strncmp(buffer, cmdline_on, sizeof(buffer)))
|
||||
sme_me_mask = me_mask;
|
||||
|
@ -983,6 +983,8 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
||||
print_version();
|
||||
|
||||
hp = mdesc_grab();
|
||||
if (!hp)
|
||||
return -ENODEV;
|
||||
|
||||
err = -ENODEV;
|
||||
if ((vdev->dev_no << PARTITION_SHIFT) & ~(u64)MINORMASK) {
|
||||
|
@ -63,7 +63,7 @@ config COMMON_CLK_RK808
|
||||
config COMMON_CLK_HI655X
|
||||
tristate "Clock driver for Hi655x" if EXPERT
|
||||
depends on (MFD_HI655X_PMIC || COMPILE_TEST)
|
||||
depends on REGMAP
|
||||
select REGMAP
|
||||
default MFD_HI655X_PMIC
|
||||
---help---
|
||||
This driver supports the hi655x PMIC clock. This
|
||||
|
@ -529,16 +529,13 @@ static struct kfd_event_waiter *alloc_event_waiters(uint32_t num_events)
|
||||
struct kfd_event_waiter *event_waiters;
|
||||
uint32_t i;
|
||||
|
||||
event_waiters = kmalloc_array(num_events,
|
||||
sizeof(struct kfd_event_waiter),
|
||||
GFP_KERNEL);
|
||||
event_waiters = kcalloc(num_events, sizeof(struct kfd_event_waiter),
|
||||
GFP_KERNEL);
|
||||
if (!event_waiters)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; (event_waiters) && (i < num_events) ; i++) {
|
||||
for (i = 0; i < num_events; i++)
|
||||
init_wait(&event_waiters[i].wait);
|
||||
event_waiters[i].activated = false;
|
||||
}
|
||||
|
||||
return event_waiters;
|
||||
}
|
||||
|
@ -1268,10 +1268,11 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
|
||||
{
|
||||
struct i915_address_space *vm = &ggtt->vm;
|
||||
struct drm_i915_private *i915 = vm->i915;
|
||||
struct drm_i915_gem_object *obj;
|
||||
struct drm_i915_gem_object *obj = NULL;
|
||||
struct i915_vma *vma;
|
||||
|
||||
obj = i915_gem_object_create_stolen(i915, size);
|
||||
if (!HAS_LLC(i915))
|
||||
obj = i915_gem_object_create_stolen(i915, size);
|
||||
if (!obj)
|
||||
obj = i915_gem_object_create_internal(i915, size);
|
||||
if (IS_ERR(obj))
|
||||
|
@ -100,6 +100,8 @@ void meson_vpp_init(struct meson_drm *priv)
|
||||
priv->io_base + _REG(VPP_DOLBY_CTRL));
|
||||
writel_relaxed(0x1020080,
|
||||
priv->io_base + _REG(VPP_DUMMY_DATA1));
|
||||
writel_relaxed(0x42020,
|
||||
priv->io_base + _REG(VPP_DUMMY_DATA));
|
||||
} else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A))
|
||||
writel_relaxed(0xf, priv->io_base + _REG(DOLBY_PATH_CTRL));
|
||||
|
||||
|
@ -233,7 +233,7 @@ static void panfrost_mmu_flush_range(struct panfrost_device *pfdev,
|
||||
if (pm_runtime_active(pfdev->dev))
|
||||
mmu_hw_do_operation(pfdev, mmu, iova, size, AS_COMMAND_FLUSH_PT);
|
||||
|
||||
pm_runtime_put_sync_autosuspend(pfdev->dev);
|
||||
pm_runtime_put_autosuspend(pfdev->dev);
|
||||
}
|
||||
|
||||
static int mmu_map_sg(struct panfrost_device *pfdev, struct panfrost_mmu *mmu,
|
||||
|
@ -258,6 +258,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
|
||||
{
|
||||
struct hid_report *report;
|
||||
struct hid_field *field;
|
||||
unsigned int max_buffer_size = HID_MAX_BUFFER_SIZE;
|
||||
unsigned int usages;
|
||||
unsigned int offset;
|
||||
unsigned int i;
|
||||
@ -288,8 +289,11 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
|
||||
offset = report->size;
|
||||
report->size += parser->global.report_size * parser->global.report_count;
|
||||
|
||||
if (parser->device->ll_driver->max_buffer_size)
|
||||
max_buffer_size = parser->device->ll_driver->max_buffer_size;
|
||||
|
||||
/* Total size check: Allow for possible report index byte */
|
||||
if (report->size > (HID_MAX_BUFFER_SIZE - 1) << 3) {
|
||||
if (report->size > (max_buffer_size - 1) << 3) {
|
||||
hid_err(parser->device, "report is too long\n");
|
||||
return -1;
|
||||
}
|
||||
@ -1745,6 +1749,7 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
|
||||
struct hid_report_enum *report_enum = hid->report_enum + type;
|
||||
struct hid_report *report;
|
||||
struct hid_driver *hdrv;
|
||||
int max_buffer_size = HID_MAX_BUFFER_SIZE;
|
||||
unsigned int a;
|
||||
u32 rsize, csize = size;
|
||||
u8 *cdata = data;
|
||||
@ -1761,10 +1766,13 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
|
||||
|
||||
rsize = hid_compute_report_size(report);
|
||||
|
||||
if (report_enum->numbered && rsize >= HID_MAX_BUFFER_SIZE)
|
||||
rsize = HID_MAX_BUFFER_SIZE - 1;
|
||||
else if (rsize > HID_MAX_BUFFER_SIZE)
|
||||
rsize = HID_MAX_BUFFER_SIZE;
|
||||
if (hid->ll_driver->max_buffer_size)
|
||||
max_buffer_size = hid->ll_driver->max_buffer_size;
|
||||
|
||||
if (report_enum->numbered && rsize >= max_buffer_size)
|
||||
rsize = max_buffer_size - 1;
|
||||
else if (rsize > max_buffer_size)
|
||||
rsize = max_buffer_size;
|
||||
|
||||
if (csize < rsize) {
|
||||
dbg_hid("report %d is too short, (%d < %d)\n", report->id,
|
||||
|
@ -395,6 +395,7 @@ struct hid_ll_driver uhid_hid_driver = {
|
||||
.parse = uhid_hid_parse,
|
||||
.raw_request = uhid_hid_raw_request,
|
||||
.output_report = uhid_hid_output_report,
|
||||
.max_buffer_size = UHID_DATA_MAX,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(uhid_hid_driver);
|
||||
|
||||
|
@ -484,10 +484,10 @@ static ssize_t temp_store(struct device *dev, struct device_attribute *attr,
|
||||
val = (temp - val) / 1000;
|
||||
|
||||
if (sattr->index != 1) {
|
||||
data->temp[HYSTERSIS][sattr->index] &= 0xF0;
|
||||
data->temp[HYSTERSIS][sattr->index] &= 0x0F;
|
||||
data->temp[HYSTERSIS][sattr->index] |= (val & 0xF) << 4;
|
||||
} else {
|
||||
data->temp[HYSTERSIS][sattr->index] &= 0x0F;
|
||||
data->temp[HYSTERSIS][sattr->index] &= 0xF0;
|
||||
data->temp[HYSTERSIS][sattr->index] |= (val & 0xF);
|
||||
}
|
||||
|
||||
@ -552,11 +552,11 @@ static ssize_t temp_st_show(struct device *dev, struct device_attribute *attr,
|
||||
val = data->enh_acoustics[0] & 0xf;
|
||||
break;
|
||||
case 1:
|
||||
val = (data->enh_acoustics[1] >> 4) & 0xf;
|
||||
val = data->enh_acoustics[1] & 0xf;
|
||||
break;
|
||||
case 2:
|
||||
default:
|
||||
val = data->enh_acoustics[1] & 0xf;
|
||||
val = (data->enh_acoustics[1] >> 4) & 0xf;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -672,7 +672,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,
|
||||
return ret;
|
||||
} else if (val > INA3221_CHANNEL3) {
|
||||
dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
input = &ina->inputs[val];
|
||||
|
@ -768,6 +768,7 @@ static int xgene_hwmon_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
|
||||
|
||||
cancel_work_sync(&ctx->workq);
|
||||
hwmon_device_unregister(ctx->hwmon_dev);
|
||||
kfifo_free(&ctx->async_msg_fifo);
|
||||
if (acpi_disabled)
|
||||
|
@ -614,6 +614,10 @@ void icc_node_destroy(int id)
|
||||
|
||||
mutex_unlock(&icc_lock);
|
||||
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
kfree(node->links);
|
||||
kfree(node);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(icc_node_destroy);
|
||||
|
@ -488,7 +488,7 @@ static enum m5mols_restype __find_restype(u32 code)
|
||||
do {
|
||||
if (code == m5mols_default_ffmt[type].code)
|
||||
return type;
|
||||
} while (type++ != SIZE_DEFAULT_FFMT);
|
||||
} while (++type != SIZE_DEFAULT_FFMT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1812,7 +1812,6 @@ static void atmci_tasklet_func(unsigned long priv)
|
||||
atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
|
||||
state = STATE_WAITING_NOTBUSY;
|
||||
} else if (host->mrq->stop) {
|
||||
atmci_writel(host, ATMCI_IER, ATMCI_CMDRDY);
|
||||
atmci_send_stop_cmd(host, data);
|
||||
state = STATE_SENDING_STOP;
|
||||
} else {
|
||||
@ -1845,8 +1844,6 @@ static void atmci_tasklet_func(unsigned long priv)
|
||||
* command to send.
|
||||
*/
|
||||
if (host->mrq->stop) {
|
||||
atmci_writel(host, ATMCI_IER,
|
||||
ATMCI_CMDRDY);
|
||||
atmci_send_stop_cmd(host, data);
|
||||
state = STATE_SENDING_STOP;
|
||||
} else {
|
||||
|
@ -14823,6 +14823,7 @@ static int i40e_init_recovery_mode(struct i40e_pf *pf, struct i40e_hw *hw)
|
||||
int err;
|
||||
int v_idx;
|
||||
|
||||
pci_set_drvdata(pf->pdev, pf);
|
||||
pci_save_state(pf->pdev);
|
||||
|
||||
/* set up periodic task facility */
|
||||
|
@ -5139,6 +5139,11 @@ static int qed_init_wfq_param(struct qed_hwfn *p_hwfn,
|
||||
|
||||
num_vports = p_hwfn->qm_info.num_vports;
|
||||
|
||||
if (num_vports < 2) {
|
||||
DP_NOTICE(p_hwfn, "Unexpected num_vports: %d\n", num_vports);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Accounting for the vports which are configured for WFQ explicitly */
|
||||
for (i = 0; i < num_vports; i++) {
|
||||
u32 tmp_speed;
|
||||
|
@ -290,6 +290,9 @@ static int vsw_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
||||
|
||||
hp = mdesc_grab();
|
||||
|
||||
if (!hp)
|
||||
return -ENODEV;
|
||||
|
||||
rmac = mdesc_get_property(hp, vdev->mp, remote_macaddr_prop, &len);
|
||||
err = -ENODEV;
|
||||
if (!rmac) {
|
||||
|
@ -431,6 +431,9 @@ static int vnet_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
||||
|
||||
hp = mdesc_grab();
|
||||
|
||||
if (!hp)
|
||||
return -ENODEV;
|
||||
|
||||
vp = vnet_find_parent(hp, vdev->mp, vdev);
|
||||
if (IS_ERR(vp)) {
|
||||
pr_err("Cannot find port parent vnet\n");
|
||||
|
@ -101,6 +101,7 @@ static unsigned int ipvlan_nf_input(void *priv, struct sk_buff *skb,
|
||||
goto out;
|
||||
|
||||
skb->dev = addr->master->dev;
|
||||
skb->skb_iif = skb->dev->ifindex;
|
||||
len = skb->len + ETH_HLEN;
|
||||
ipvlan_count_rx(addr->master, len, true, false);
|
||||
out:
|
||||
|
@ -108,8 +108,11 @@ static int lan911x_config_init(struct phy_device *phydev)
|
||||
static int lan87xx_read_status(struct phy_device *phydev)
|
||||
{
|
||||
struct smsc_phy_priv *priv = phydev->priv;
|
||||
int err;
|
||||
|
||||
int err = genphy_read_status(phydev);
|
||||
err = genphy_read_status(phydev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (!phydev->link && priv->energy_enable) {
|
||||
int i;
|
||||
|
@ -2198,6 +2198,13 @@ static int smsc75xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
size = (rx_cmd_a & RX_CMD_A_LEN) - RXW_PADDING;
|
||||
align_count = (4 - ((size + RXW_PADDING) % 4)) % 4;
|
||||
|
||||
if (unlikely(size > skb->len)) {
|
||||
netif_dbg(dev, rx_err, dev->net,
|
||||
"size err rx_cmd_a=0x%08x\n",
|
||||
rx_cmd_a);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (unlikely(rx_cmd_a & RX_CMD_A_RED)) {
|
||||
netif_dbg(dev, rx_err, dev->net,
|
||||
"Error rx_cmd_a=0x%08x\n", rx_cmd_a);
|
||||
|
@ -175,6 +175,7 @@ static int pn533_usb_send_frame(struct pn533 *dev,
|
||||
print_hex_dump_debug("PN533 TX: ", DUMP_PREFIX_NONE, 16, 1,
|
||||
out->data, out->len, false);
|
||||
|
||||
arg.phy = phy;
|
||||
init_completion(&arg.done);
|
||||
cntx = phy->out_urb->context;
|
||||
phy->out_urb->context = &arg;
|
||||
|
@ -286,13 +286,15 @@ EXPORT_SYMBOL(ndlc_probe);
|
||||
|
||||
void ndlc_remove(struct llt_ndlc *ndlc)
|
||||
{
|
||||
st_nci_remove(ndlc->ndev);
|
||||
|
||||
/* cancel timers */
|
||||
del_timer_sync(&ndlc->t1_timer);
|
||||
del_timer_sync(&ndlc->t2_timer);
|
||||
ndlc->t2_active = false;
|
||||
ndlc->t1_active = false;
|
||||
/* cancel work */
|
||||
cancel_work_sync(&ndlc->sm_work);
|
||||
|
||||
st_nci_remove(ndlc->ndev);
|
||||
|
||||
skb_queue_purge(&ndlc->rcv_q);
|
||||
skb_queue_purge(&ndlc->send_q);
|
||||
|
@ -728,8 +728,10 @@ static void __nvmet_req_complete(struct nvmet_req *req, u16 status)
|
||||
|
||||
void nvmet_req_complete(struct nvmet_req *req, u16 status)
|
||||
{
|
||||
struct nvmet_sq *sq = req->sq;
|
||||
|
||||
__nvmet_req_complete(req, status);
|
||||
percpu_ref_put(&req->sq->ref);
|
||||
percpu_ref_put(&sq->ref);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvmet_req_complete);
|
||||
|
||||
|
@ -946,7 +946,7 @@ static int pci_pm_resume_noirq(struct device *dev)
|
||||
pcie_pme_root_status_cleanup(pci_dev);
|
||||
|
||||
if (!skip_bus_pm && prev_state == PCI_D3cold)
|
||||
pci_bridge_wait_for_secondary_bus(pci_dev);
|
||||
pci_bridge_wait_for_secondary_bus(pci_dev, "resume", PCI_RESET_WAIT);
|
||||
|
||||
if (pci_has_legacy_pm_support(pci_dev))
|
||||
return pci_legacy_resume_early(dev);
|
||||
@ -1355,7 +1355,7 @@ static int pci_pm_runtime_resume(struct device *dev)
|
||||
pci_fixup_device(pci_fixup_resume, pci_dev);
|
||||
|
||||
if (prev_state == PCI_D3cold)
|
||||
pci_bridge_wait_for_secondary_bus(pci_dev);
|
||||
pci_bridge_wait_for_secondary_bus(pci_dev, "resume", PCI_RESET_WAIT);
|
||||
|
||||
if (pm && pm->runtime_resume)
|
||||
rc = pm->runtime_resume(dev);
|
||||
|
@ -4484,7 +4484,7 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
if (delay > 1000)
|
||||
if (delay > PCI_RESET_WAIT)
|
||||
pci_info(dev, "not ready %dms after %s; waiting\n",
|
||||
delay - 1, reset_type);
|
||||
|
||||
@ -4493,7 +4493,7 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
|
||||
pci_read_config_dword(dev, PCI_COMMAND, &id);
|
||||
}
|
||||
|
||||
if (delay > 1000)
|
||||
if (delay > PCI_RESET_WAIT)
|
||||
pci_info(dev, "ready %dms after %s\n", delay - 1,
|
||||
reset_type);
|
||||
|
||||
@ -4728,24 +4728,31 @@ static int pci_bus_max_d3cold_delay(const struct pci_bus *bus)
|
||||
/**
|
||||
* pci_bridge_wait_for_secondary_bus - Wait for secondary bus to be accessible
|
||||
* @dev: PCI bridge
|
||||
* @reset_type: reset type in human-readable form
|
||||
* @timeout: maximum time to wait for devices on secondary bus (milliseconds)
|
||||
*
|
||||
* Handle necessary delays before access to the devices on the secondary
|
||||
* side of the bridge are permitted after D3cold to D0 transition.
|
||||
* side of the bridge are permitted after D3cold to D0 transition
|
||||
* or Conventional Reset.
|
||||
*
|
||||
* For PCIe this means the delays in PCIe 5.0 section 6.6.1. For
|
||||
* conventional PCI it means Tpvrh + Trhfa specified in PCI 3.0 section
|
||||
* 4.3.2.
|
||||
*
|
||||
* Return 0 on success or -ENOTTY if the first device on the secondary bus
|
||||
* failed to become accessible.
|
||||
*/
|
||||
void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev)
|
||||
int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type,
|
||||
int timeout)
|
||||
{
|
||||
struct pci_dev *child;
|
||||
int delay;
|
||||
|
||||
if (pci_dev_is_disconnected(dev))
|
||||
return;
|
||||
return 0;
|
||||
|
||||
if (!pci_is_bridge(dev))
|
||||
return;
|
||||
return 0;
|
||||
|
||||
down_read(&pci_bus_sem);
|
||||
|
||||
@ -4757,14 +4764,14 @@ void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev)
|
||||
*/
|
||||
if (!dev->subordinate || list_empty(&dev->subordinate->devices)) {
|
||||
up_read(&pci_bus_sem);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Take d3cold_delay requirements into account */
|
||||
delay = pci_bus_max_d3cold_delay(dev->subordinate);
|
||||
if (!delay) {
|
||||
up_read(&pci_bus_sem);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
child = list_first_entry(&dev->subordinate->devices, struct pci_dev,
|
||||
@ -4773,14 +4780,12 @@ void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev)
|
||||
|
||||
/*
|
||||
* Conventional PCI and PCI-X we need to wait Tpvrh + Trhfa before
|
||||
* accessing the device after reset (that is 1000 ms + 100 ms). In
|
||||
* practice this should not be needed because we don't do power
|
||||
* management for them (see pci_bridge_d3_possible()).
|
||||
* accessing the device after reset (that is 1000 ms + 100 ms).
|
||||
*/
|
||||
if (!pci_is_pcie(dev)) {
|
||||
pci_dbg(dev, "waiting %d ms for secondary bus\n", 1000 + delay);
|
||||
msleep(1000 + delay);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4797,11 +4802,11 @@ void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev)
|
||||
* configuration requests if we only wait for 100 ms (see
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=203885).
|
||||
*
|
||||
* Therefore we wait for 100 ms and check for the device presence.
|
||||
* If it is still not present give it an additional 100 ms.
|
||||
* Therefore we wait for 100 ms and check for the device presence
|
||||
* until the timeout expires.
|
||||
*/
|
||||
if (!pcie_downstream_port(dev))
|
||||
return;
|
||||
return 0;
|
||||
|
||||
if (pcie_get_speed_cap(dev) <= PCIE_SPEED_5_0GT) {
|
||||
pci_dbg(dev, "waiting %d ms for downstream link\n", delay);
|
||||
@ -4811,14 +4816,11 @@ void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev)
|
||||
delay);
|
||||
if (!pcie_wait_for_link_delay(dev, true, delay)) {
|
||||
/* Did not train, no need to wait any further */
|
||||
return;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pci_device_is_present(child)) {
|
||||
pci_dbg(child, "waiting additional %d ms to become accessible\n", delay);
|
||||
msleep(delay);
|
||||
}
|
||||
return pci_dev_wait(child, reset_type, timeout - delay);
|
||||
}
|
||||
|
||||
void pci_reset_secondary_bus(struct pci_dev *dev)
|
||||
@ -4837,15 +4839,6 @@ void pci_reset_secondary_bus(struct pci_dev *dev)
|
||||
|
||||
ctrl &= ~PCI_BRIDGE_CTL_BUS_RESET;
|
||||
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl);
|
||||
|
||||
/*
|
||||
* Trhfa for conventional PCI is 2^25 clock cycles.
|
||||
* Assuming a minimum 33MHz clock this results in a 1s
|
||||
* delay before we can consider subordinate devices to
|
||||
* be re-initialized. PCIe has some ways to shorten this,
|
||||
* but we don't make use of them yet.
|
||||
*/
|
||||
ssleep(1);
|
||||
}
|
||||
|
||||
void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
|
||||
@ -4864,7 +4857,8 @@ int pci_bridge_secondary_bus_reset(struct pci_dev *dev)
|
||||
{
|
||||
pcibios_reset_secondary_bus(dev);
|
||||
|
||||
return pci_dev_wait(dev, "bus reset", PCIE_RESET_READY_POLL_MS);
|
||||
return pci_bridge_wait_for_secondary_bus(dev, "bus reset",
|
||||
PCIE_RESET_READY_POLL_MS);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pci_bridge_secondary_bus_reset);
|
||||
|
||||
|
@ -48,6 +48,13 @@ int pci_bus_error_reset(struct pci_dev *dev);
|
||||
#define PCI_PM_D3COLD_WAIT 100
|
||||
#define PCI_PM_BUS_WAIT 50
|
||||
|
||||
/*
|
||||
* Following exit from Conventional Reset, devices must be ready within 1 sec
|
||||
* (PCIe r6.0 sec 6.6.1). A D3cold to D0 transition implies a Conventional
|
||||
* Reset (PCIe r6.0 sec 5.8).
|
||||
*/
|
||||
#define PCI_RESET_WAIT 1000 /* msec */
|
||||
|
||||
/**
|
||||
* struct pci_platform_pm_ops - Firmware PM callbacks
|
||||
*
|
||||
@ -108,7 +115,8 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev);
|
||||
void pci_free_cap_save_buffers(struct pci_dev *dev);
|
||||
bool pci_bridge_d3_possible(struct pci_dev *dev);
|
||||
void pci_bridge_d3_update(struct pci_dev *dev);
|
||||
void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev);
|
||||
int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type,
|
||||
int timeout);
|
||||
|
||||
static inline void pci_wakeup_event(struct pci_dev *dev)
|
||||
{
|
||||
|
@ -319,10 +319,7 @@ static void scsi_host_dev_release(struct device *dev)
|
||||
struct Scsi_Host *shost = dev_to_shost(dev);
|
||||
struct device *parent = dev->parent;
|
||||
|
||||
/* In case scsi_remove_host() has not been called. */
|
||||
scsi_proc_hostdir_rm(shost->hostt);
|
||||
|
||||
/* Wait for functions invoked through call_rcu(&shost->rcu, ...) */
|
||||
/* Wait for functions invoked through call_rcu(&scmd->rcu, ...) */
|
||||
rcu_barrier();
|
||||
|
||||
if (shost->tmf_work_q)
|
||||
|
@ -670,7 +670,7 @@ mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle,
|
||||
goto out_fail;
|
||||
}
|
||||
port = sas_port_alloc_num(sas_node->parent_dev);
|
||||
if ((sas_port_add(port))) {
|
||||
if (!port || (sas_port_add(port))) {
|
||||
ioc_err(ioc, "failure at %s:%d/%s()!\n",
|
||||
__FILE__, __LINE__, __func__);
|
||||
goto out_fail;
|
||||
@ -695,6 +695,12 @@ mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle,
|
||||
rphy = sas_expander_alloc(port,
|
||||
mpt3sas_port->remote_identify.device_type);
|
||||
|
||||
if (!rphy) {
|
||||
ioc_err(ioc, "failure at %s:%d/%s()!\n",
|
||||
__FILE__, __LINE__, __func__);
|
||||
goto out_delete_port;
|
||||
}
|
||||
|
||||
rphy->identify = mpt3sas_port->remote_identify;
|
||||
|
||||
if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) {
|
||||
@ -714,6 +720,7 @@ mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle,
|
||||
__FILE__, __LINE__, __func__);
|
||||
sas_rphy_free(rphy);
|
||||
rphy = NULL;
|
||||
goto out_delete_port;
|
||||
}
|
||||
|
||||
if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) {
|
||||
@ -741,7 +748,10 @@ mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle,
|
||||
rphy_to_expander_device(rphy));
|
||||
return mpt3sas_port;
|
||||
|
||||
out_fail:
|
||||
out_delete_port:
|
||||
sas_port_delete(port);
|
||||
|
||||
out_fail:
|
||||
list_for_each_entry_safe(mpt3sas_phy, next, &mpt3sas_port->phy_list,
|
||||
port_siblings)
|
||||
list_del(&mpt3sas_phy->port_siblings);
|
||||
|
@ -102,8 +102,8 @@ static int serial8250_em_probe(struct platform_device *pdev)
|
||||
memset(&up, 0, sizeof(up));
|
||||
up.port.mapbase = regs->start;
|
||||
up.port.irq = irq->start;
|
||||
up.port.type = PORT_UNKNOWN;
|
||||
up.port.flags = UPF_BOOT_AUTOCONF | UPF_FIXED_PORT | UPF_IOREMAP;
|
||||
up.port.type = PORT_16750;
|
||||
up.port.flags = UPF_FIXED_PORT | UPF_IOREMAP | UPF_FIXED_TYPE;
|
||||
up.port.dev = &pdev->dev;
|
||||
up.port.private_data = priv;
|
||||
|
||||
|
@ -2002,9 +2002,15 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||
/* update the per-port timeout */
|
||||
uart_update_timeout(port, termios->c_cflag, baud);
|
||||
|
||||
/* wait transmit engin complete */
|
||||
lpuart32_write(&sport->port, 0, UARTMODIR);
|
||||
lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC);
|
||||
/*
|
||||
* LPUART Transmission Complete Flag may never be set while queuing a break
|
||||
* character, so skip waiting for transmission complete when UARTCTRL_SBK is
|
||||
* asserted.
|
||||
*/
|
||||
if (!(old_ctrl & UARTCTRL_SBK)) {
|
||||
lpuart32_write(&sport->port, 0, UARTMODIR);
|
||||
lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC);
|
||||
}
|
||||
|
||||
/* disable transmit and receive */
|
||||
lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE),
|
||||
|
@ -921,6 +921,28 @@ SETUP_HCRX(struct stifb_info *fb)
|
||||
|
||||
/* ------------------- driver specific functions --------------------------- */
|
||||
|
||||
static int
|
||||
stifb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
{
|
||||
struct stifb_info *fb = container_of(info, struct stifb_info, info);
|
||||
|
||||
if (var->xres != fb->info.var.xres ||
|
||||
var->yres != fb->info.var.yres ||
|
||||
var->bits_per_pixel != fb->info.var.bits_per_pixel)
|
||||
return -EINVAL;
|
||||
|
||||
var->xres_virtual = var->xres;
|
||||
var->yres_virtual = var->yres;
|
||||
var->xoffset = 0;
|
||||
var->yoffset = 0;
|
||||
var->grayscale = fb->info.var.grayscale;
|
||||
var->red.length = fb->info.var.red.length;
|
||||
var->green.length = fb->info.var.green.length;
|
||||
var->blue.length = fb->info.var.blue.length;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
stifb_setcolreg(u_int regno, u_int red, u_int green,
|
||||
u_int blue, u_int transp, struct fb_info *info)
|
||||
@ -1103,6 +1125,7 @@ stifb_init_display(struct stifb_info *fb)
|
||||
|
||||
static struct fb_ops stifb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_check_var = stifb_check_var,
|
||||
.fb_setcolreg = stifb_setcolreg,
|
||||
.fb_blank = stifb_blank,
|
||||
.fb_fillrect = cfb_fillrect,
|
||||
@ -1122,6 +1145,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
||||
struct stifb_info *fb;
|
||||
struct fb_info *info;
|
||||
unsigned long sti_rom_address;
|
||||
char modestr[32];
|
||||
char *dev_name;
|
||||
int bpp, xres, yres;
|
||||
|
||||
@ -1300,6 +1324,9 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA;
|
||||
info->pseudo_palette = &fb->pseudo_palette;
|
||||
|
||||
scnprintf(modestr, sizeof(modestr), "%dx%d-%d", xres, yres, bpp);
|
||||
fb_find_mode(&info->var, info, modestr, NULL, 0, NULL, bpp);
|
||||
|
||||
/* This has to be done !!! */
|
||||
if (fb_alloc_cmap(&info->cmap, NR_PALETTE, 0))
|
||||
goto out_err1;
|
||||
|
@ -312,7 +312,7 @@ static int
|
||||
__smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
|
||||
struct smb_rqst *rqst)
|
||||
{
|
||||
int rc = 0;
|
||||
int rc;
|
||||
struct kvec *iov;
|
||||
int n_vec;
|
||||
unsigned int send_length = 0;
|
||||
@ -324,6 +324,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
|
||||
int val = 1;
|
||||
__be32 rfc1002_marker;
|
||||
|
||||
cifs_in_send_inc(server);
|
||||
if (cifs_rdma_enabled(server)) {
|
||||
/* return -EAGAIN when connecting or reconnecting */
|
||||
rc = -EAGAIN;
|
||||
@ -332,14 +333,17 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
|
||||
goto smbd_done;
|
||||
}
|
||||
|
||||
rc = -EAGAIN;
|
||||
if (ssocket == NULL)
|
||||
return -EAGAIN;
|
||||
goto out;
|
||||
|
||||
rc = -ERESTARTSYS;
|
||||
if (fatal_signal_pending(current)) {
|
||||
cifs_dbg(FYI, "signal pending before send request\n");
|
||||
return -ERESTARTSYS;
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = 0;
|
||||
/* cork the socket */
|
||||
kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK,
|
||||
(char *)&val, sizeof(val));
|
||||
@ -453,7 +457,8 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
|
||||
rc);
|
||||
else if (rc > 0)
|
||||
rc = 0;
|
||||
|
||||
out:
|
||||
cifs_in_send_dec(server);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -830,9 +835,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst,
|
||||
* I/O response may come back and free the mid entry on another thread.
|
||||
*/
|
||||
cifs_save_when_sent(mid);
|
||||
cifs_in_send_inc(server);
|
||||
rc = smb_send_rqst(server, 1, rqst, flags);
|
||||
cifs_in_send_dec(server);
|
||||
|
||||
if (rc < 0) {
|
||||
revert_current_mid(server, mid->credits);
|
||||
@ -1095,9 +1098,7 @@ compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
|
||||
else
|
||||
midQ[i]->callback = cifs_compound_last_callback;
|
||||
}
|
||||
cifs_in_send_inc(server);
|
||||
rc = smb_send_rqst(server, num_rqst, rqst, flags);
|
||||
cifs_in_send_dec(server);
|
||||
|
||||
for (i = 0; i < num_rqst; i++)
|
||||
cifs_save_when_sent(midQ[i]);
|
||||
@ -1332,9 +1333,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses,
|
||||
|
||||
midQ->mid_state = MID_REQUEST_SUBMITTED;
|
||||
|
||||
cifs_in_send_inc(server);
|
||||
rc = smb_send(server, in_buf, len);
|
||||
cifs_in_send_dec(server);
|
||||
cifs_save_when_sent(midQ);
|
||||
|
||||
if (rc < 0)
|
||||
@ -1471,9 +1470,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
}
|
||||
|
||||
midQ->mid_state = MID_REQUEST_SUBMITTED;
|
||||
cifs_in_send_inc(server);
|
||||
rc = smb_send(server, in_buf, len);
|
||||
cifs_in_send_dec(server);
|
||||
cifs_save_when_sent(midQ);
|
||||
|
||||
if (rc < 0)
|
||||
|
@ -4998,13 +4998,6 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
|
||||
goto bad_inode;
|
||||
raw_inode = ext4_raw_inode(&iloc);
|
||||
|
||||
if ((ino == EXT4_ROOT_INO) && (raw_inode->i_links_count == 0)) {
|
||||
ext4_error_inode(inode, function, line, 0,
|
||||
"iget: root inode unallocated");
|
||||
ret = -EFSCORRUPTED;
|
||||
goto bad_inode;
|
||||
}
|
||||
|
||||
if ((flags & EXT4_IGET_HANDLE) &&
|
||||
(raw_inode->i_links_count == 0) && (raw_inode->i_mode == 0)) {
|
||||
ret = -ESTALE;
|
||||
@ -5075,11 +5068,16 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
|
||||
* NeilBrown 1999oct15
|
||||
*/
|
||||
if (inode->i_nlink == 0) {
|
||||
if ((inode->i_mode == 0 ||
|
||||
if ((inode->i_mode == 0 || flags & EXT4_IGET_SPECIAL ||
|
||||
!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS)) &&
|
||||
ino != EXT4_BOOT_LOADER_INO) {
|
||||
/* this inode is deleted */
|
||||
ret = -ESTALE;
|
||||
/* this inode is deleted or unallocated */
|
||||
if (flags & EXT4_IGET_SPECIAL) {
|
||||
ext4_error_inode(inode, function, line, 0,
|
||||
"iget: special inode unallocated");
|
||||
ret = -EFSCORRUPTED;
|
||||
} else
|
||||
ret = -ESTALE;
|
||||
goto bad_inode;
|
||||
}
|
||||
/* The only unlinked inodes we let through here have
|
||||
|
@ -3964,10 +3964,8 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
goto end_rename;
|
||||
}
|
||||
retval = ext4_rename_dir_prepare(handle, &old);
|
||||
if (retval) {
|
||||
inode_unlock(old.inode);
|
||||
if (retval)
|
||||
goto end_rename;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* If we're renaming a file within an inline_data dir and adding or
|
||||
|
@ -381,7 +381,8 @@ static int io_submit_init_bio(struct ext4_io_submit *io,
|
||||
|
||||
static int io_submit_add_bh(struct ext4_io_submit *io,
|
||||
struct inode *inode,
|
||||
struct page *page,
|
||||
struct page *pagecache_page,
|
||||
struct page *bounce_page,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
int ret;
|
||||
@ -397,10 +398,11 @@ static int io_submit_add_bh(struct ext4_io_submit *io,
|
||||
return ret;
|
||||
io->io_bio->bi_write_hint = inode->i_write_hint;
|
||||
}
|
||||
ret = bio_add_page(io->io_bio, page, bh->b_size, bh_offset(bh));
|
||||
ret = bio_add_page(io->io_bio, bounce_page ?: pagecache_page,
|
||||
bh->b_size, bh_offset(bh));
|
||||
if (ret != bh->b_size)
|
||||
goto submit_and_retry;
|
||||
wbc_account_cgroup_owner(io->io_wbc, page, bh->b_size);
|
||||
wbc_account_cgroup_owner(io->io_wbc, pagecache_page, bh->b_size);
|
||||
io->io_next_block++;
|
||||
return 0;
|
||||
}
|
||||
@ -513,7 +515,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
|
||||
do {
|
||||
if (!buffer_async_write(bh))
|
||||
continue;
|
||||
ret = io_submit_add_bh(io, inode, bounce_page ?: page, bh);
|
||||
ret = io_submit_add_bh(io, inode, page, bounce_page, bh);
|
||||
if (ret) {
|
||||
/*
|
||||
* We only get here on ENOMEM. Not much else
|
||||
|
@ -384,6 +384,17 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
|
||||
struct inode *inode;
|
||||
int err;
|
||||
|
||||
/*
|
||||
* We have to check for this corruption early as otherwise
|
||||
* iget_locked() could wait indefinitely for the state of our
|
||||
* parent inode.
|
||||
*/
|
||||
if (parent->i_ino == ea_ino) {
|
||||
ext4_error(parent->i_sb,
|
||||
"Parent and EA inode have the same ino %lu", ea_ino);
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
|
||||
inode = ext4_iget(parent->i_sb, ea_ino, EXT4_IGET_NORMAL);
|
||||
if (IS_ERR(inode)) {
|
||||
err = PTR_ERR(inode);
|
||||
|
@ -137,19 +137,18 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
||||
struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
|
||||
struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
|
||||
pgoff_t index = pos >> PAGE_SHIFT;
|
||||
uint32_t pageofs = index << PAGE_SHIFT;
|
||||
int ret = 0;
|
||||
|
||||
jffs2_dbg(1, "%s()\n", __func__);
|
||||
|
||||
if (pageofs > inode->i_size) {
|
||||
/* Make new hole frag from old EOF to new page */
|
||||
if (pos > inode->i_size) {
|
||||
/* Make new hole frag from old EOF to new position */
|
||||
struct jffs2_raw_inode ri;
|
||||
struct jffs2_full_dnode *fn;
|
||||
uint32_t alloc_len;
|
||||
|
||||
jffs2_dbg(1, "Writing new hole frag 0x%x-0x%x between current EOF and new page\n",
|
||||
(unsigned int)inode->i_size, pageofs);
|
||||
jffs2_dbg(1, "Writing new hole frag 0x%x-0x%x between current EOF and new position\n",
|
||||
(unsigned int)inode->i_size, (uint32_t)pos);
|
||||
|
||||
ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len,
|
||||
ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
|
||||
@ -169,10 +168,10 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
||||
ri.mode = cpu_to_jemode(inode->i_mode);
|
||||
ri.uid = cpu_to_je16(i_uid_read(inode));
|
||||
ri.gid = cpu_to_je16(i_gid_read(inode));
|
||||
ri.isize = cpu_to_je32(max((uint32_t)inode->i_size, pageofs));
|
||||
ri.isize = cpu_to_je32((uint32_t)pos);
|
||||
ri.atime = ri.ctime = ri.mtime = cpu_to_je32(JFFS2_NOW());
|
||||
ri.offset = cpu_to_je32(inode->i_size);
|
||||
ri.dsize = cpu_to_je32(pageofs - inode->i_size);
|
||||
ri.dsize = cpu_to_je32((uint32_t)pos - inode->i_size);
|
||||
ri.csize = cpu_to_je32(0);
|
||||
ri.compr = JFFS2_COMPR_ZERO;
|
||||
ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8));
|
||||
@ -202,7 +201,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
||||
goto out_err;
|
||||
}
|
||||
jffs2_complete_reservation(c);
|
||||
inode->i_size = pageofs;
|
||||
inode->i_size = pos;
|
||||
mutex_unlock(&f->sem);
|
||||
}
|
||||
|
||||
|
@ -802,6 +802,7 @@ struct hid_driver {
|
||||
* @raw_request: send raw report request to device (e.g. feature report)
|
||||
* @output_report: send output report to device
|
||||
* @idle: send idle request to device
|
||||
* @max_buffer_size: over-ride maximum data buffer size (default: HID_MAX_BUFFER_SIZE)
|
||||
*/
|
||||
struct hid_ll_driver {
|
||||
int (*start)(struct hid_device *hdev);
|
||||
@ -826,6 +827,8 @@ struct hid_ll_driver {
|
||||
int (*output_report) (struct hid_device *hdev, __u8 *buf, size_t len);
|
||||
|
||||
int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype);
|
||||
|
||||
unsigned int max_buffer_size;
|
||||
};
|
||||
|
||||
extern struct hid_ll_driver i2c_hid_ll_driver;
|
||||
|
@ -259,9 +259,11 @@ struct hh_cache {
|
||||
* relationship HH alignment <= LL alignment.
|
||||
*/
|
||||
#define LL_RESERVED_SPACE(dev) \
|
||||
((((dev)->hard_header_len+(dev)->needed_headroom)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
|
||||
((((dev)->hard_header_len + READ_ONCE((dev)->needed_headroom)) \
|
||||
& ~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
|
||||
#define LL_RESERVED_SPACE_EXTRA(dev,extra) \
|
||||
((((dev)->hard_header_len+(dev)->needed_headroom+(extra))&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
|
||||
((((dev)->hard_header_len + READ_ONCE((dev)->needed_headroom) + (extra)) \
|
||||
& ~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
|
||||
|
||||
struct header_ops {
|
||||
int (*create) (struct sk_buff *skb, struct net_device *dev,
|
||||
|
@ -97,7 +97,10 @@ struct intc_hw_desc {
|
||||
unsigned int nr_subgroups;
|
||||
};
|
||||
|
||||
#define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a)
|
||||
#define _INTC_SIZEOF_OR_ZERO(a) (_Generic(a, \
|
||||
typeof(NULL): 0, \
|
||||
default: sizeof(a)))
|
||||
#define _INTC_ARRAY(a) a, _INTC_SIZEOF_OR_ZERO(a)/sizeof(*a)
|
||||
|
||||
#define INTC_HW_DESC(vectors, groups, mask_regs, \
|
||||
prio_regs, sense_regs, ack_regs) \
|
||||
|
@ -231,12 +231,11 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
|
||||
* not add unwanted padding between the beginning of the section and the
|
||||
* structure. Force alignment to the same alignment as the section start.
|
||||
*
|
||||
* When lockdep is enabled, we make sure to always do the RCU portions of
|
||||
* the tracepoint code, regardless of whether tracing is on. However,
|
||||
* don't check if the condition is false, due to interaction with idle
|
||||
* instrumentation. This lets us find RCU issues triggered with tracepoints
|
||||
* even when this tracepoint is off. This code has no purpose other than
|
||||
* poking RCU a bit.
|
||||
* When lockdep is enabled, we make sure to always test if RCU is
|
||||
* "watching" regardless if the tracepoint is enabled or not. Tracepoints
|
||||
* require RCU to be active, and it should always warn at the tracepoint
|
||||
* site if it is not watching, as it will need to be active when the
|
||||
* tracepoint is enabled.
|
||||
*/
|
||||
#define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \
|
||||
extern struct tracepoint __tracepoint_##name; \
|
||||
@ -248,9 +247,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
|
||||
TP_ARGS(data_args), \
|
||||
TP_CONDITION(cond), 0); \
|
||||
if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
|
||||
rcu_read_lock_sched_notrace(); \
|
||||
rcu_dereference_sched(__tracepoint_##name.funcs);\
|
||||
rcu_read_unlock_sched_notrace(); \
|
||||
WARN_ON_ONCE(!rcu_is_watching()); \
|
||||
} \
|
||||
} \
|
||||
__DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
|
||||
|
@ -1557,7 +1557,8 @@ unsigned long ftrace_location_range(unsigned long start, unsigned long end)
|
||||
key.flags = end; /* overload flags, as it is unsigned long */
|
||||
|
||||
for (pg = ftrace_pages_start; pg; pg = pg->next) {
|
||||
if (end < pg->records[0].ip ||
|
||||
if (pg->index == 0 ||
|
||||
end < pg->records[0].ip ||
|
||||
start >= (pg->records[pg->index - 1].ip + MCOUNT_INSN_SIZE))
|
||||
continue;
|
||||
rec = bsearch(&key, pg->records, pg->index,
|
||||
|
@ -1996,6 +1996,9 @@ static const char *hist_field_name(struct hist_field *field,
|
||||
{
|
||||
const char *field_name = "";
|
||||
|
||||
if (WARN_ON_ONCE(!field))
|
||||
return field_name;
|
||||
|
||||
if (level > 1)
|
||||
return field_name;
|
||||
|
||||
|
@ -583,6 +583,9 @@ static int rtentry_to_fib_config(struct net *net, int cmd, struct rtentry *rt,
|
||||
cfg->fc_scope = RT_SCOPE_UNIVERSE;
|
||||
}
|
||||
|
||||
if (!cfg->fc_table)
|
||||
cfg->fc_table = RT_TABLE_MAIN;
|
||||
|
||||
if (cmd == SIOCDELRT)
|
||||
return 0;
|
||||
|
||||
|
@ -620,10 +620,10 @@ void ip_md_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
}
|
||||
|
||||
headroom += LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len;
|
||||
if (headroom > dev->needed_headroom)
|
||||
dev->needed_headroom = headroom;
|
||||
if (headroom > READ_ONCE(dev->needed_headroom))
|
||||
WRITE_ONCE(dev->needed_headroom, headroom);
|
||||
|
||||
if (skb_cow_head(skb, dev->needed_headroom)) {
|
||||
if (skb_cow_head(skb, READ_ONCE(dev->needed_headroom))) {
|
||||
ip_rt_put(rt);
|
||||
goto tx_dropped;
|
||||
}
|
||||
@ -804,10 +804,10 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
max_headroom = LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr)
|
||||
+ rt->dst.header_len + ip_encap_hlen(&tunnel->encap);
|
||||
if (max_headroom > dev->needed_headroom)
|
||||
dev->needed_headroom = max_headroom;
|
||||
if (max_headroom > READ_ONCE(dev->needed_headroom))
|
||||
WRITE_ONCE(dev->needed_headroom, max_headroom);
|
||||
|
||||
if (skb_cow_head(skb, dev->needed_headroom)) {
|
||||
if (skb_cow_head(skb, READ_ONCE(dev->needed_headroom))) {
|
||||
ip_rt_put(rt);
|
||||
dev->stats.tx_dropped++;
|
||||
kfree_skb(skb);
|
||||
|
@ -3374,7 +3374,7 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
|
||||
th->window = htons(min(req->rsk_rcv_wnd, 65535U));
|
||||
tcp_options_write((__be32 *)(th + 1), NULL, &opts);
|
||||
th->doff = (tcp_header_size >> 2);
|
||||
__TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
|
||||
TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
|
||||
|
||||
#ifdef CONFIG_TCP_MD5SIG
|
||||
/* Okay, we have all we need - do the md5 hash if needed */
|
||||
|
@ -1201,8 +1201,8 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
|
||||
*/
|
||||
max_headroom = LL_RESERVED_SPACE(dst->dev) + sizeof(struct ipv6hdr)
|
||||
+ dst->header_len + t->hlen;
|
||||
if (max_headroom > dev->needed_headroom)
|
||||
dev->needed_headroom = max_headroom;
|
||||
if (max_headroom > READ_ONCE(dev->needed_headroom))
|
||||
WRITE_ONCE(dev->needed_headroom, max_headroom);
|
||||
|
||||
err = ip6_tnl_encap(skb, t, &proto, fl6);
|
||||
if (err)
|
||||
|
@ -106,7 +106,7 @@ struct iucv_irq_data {
|
||||
u16 ippathid;
|
||||
u8 ipflags1;
|
||||
u8 iptype;
|
||||
u32 res2[8];
|
||||
u32 res2[9];
|
||||
};
|
||||
|
||||
struct iucv_irq_list {
|
||||
|
@ -236,7 +236,7 @@ static struct nft_expr_type nft_redir_inet_type __read_mostly = {
|
||||
.name = "redir",
|
||||
.ops = &nft_redir_inet_ops,
|
||||
.policy = nft_redir_policy,
|
||||
.maxattr = NFTA_MASQ_MAX,
|
||||
.maxattr = NFTA_REDIR_MAX,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
|
@ -2588,9 +2588,6 @@ int __xfrm_init_state(struct xfrm_state *x, bool init_replay, bool offload)
|
||||
if (inner_mode == NULL)
|
||||
goto error;
|
||||
|
||||
if (!(inner_mode->flags & XFRM_MODE_FLAG_TUNNEL))
|
||||
goto error;
|
||||
|
||||
x->inner_mode = *inner_mode;
|
||||
|
||||
if (x->props.family == AF_INET)
|
||||
|
@ -363,10 +363,15 @@ enum {
|
||||
#define needs_eld_notify_link(chip) false
|
||||
#endif
|
||||
|
||||
#define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \
|
||||
#define CONTROLLER_IN_GPU(pci) (((pci)->vendor == 0x8086) && \
|
||||
(((pci)->device == 0x0a0c) || \
|
||||
((pci)->device == 0x0c0c) || \
|
||||
((pci)->device == 0x0d0c) || \
|
||||
((pci)->device == 0x160c))
|
||||
((pci)->device == 0x160c) || \
|
||||
((pci)->device == 0x490d) || \
|
||||
((pci)->device == 0x4f90) || \
|
||||
((pci)->device == 0x4f91) || \
|
||||
((pci)->device == 0x4f92)))
|
||||
|
||||
#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
|
||||
#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
|
||||
@ -2501,6 +2506,19 @@ static const struct pci_device_id azx_ids[] = {
|
||||
/* Tigerlake-H */
|
||||
{ PCI_DEVICE(0x8086, 0x43c8),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
/* DG1 */
|
||||
{ PCI_DEVICE(0x8086, 0x490d),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
/* DG2 */
|
||||
{ PCI_DEVICE(0x8086, 0x4f90),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
{ PCI_DEVICE(0x8086, 0x4f91),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
{ PCI_DEVICE(0x8086, 0x4f92),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
/* Alderlake-S */
|
||||
{ PCI_DEVICE(0x8086, 0x7ad0),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
/* Elkhart Lake */
|
||||
{ PCI_DEVICE(0x8086, 0x4b55),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
|
@ -4220,7 +4220,10 @@ HDA_CODEC_ENTRY(0x8086280c, "Cannonlake HDMI", patch_i915_glk_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086280d, "Geminilake HDMI", patch_i915_glk_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086280f, "Icelake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862812, "Tigerlake HDMI", patch_i915_tgl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862814, "DG1 HDMI", patch_i915_tgl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862815, "Alderlake HDMI", patch_i915_tgl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862816, "Rocketlake HDMI", patch_i915_tgl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_tgl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi),
|
||||
|
Loading…
Reference in New Issue
Block a user