This is the 4.4.190 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl1iTHIACgkQONu9yGCS aT6r1RAAizAiIopvXWZ6Z7BAWj0MyalChPY+DhkGgS9egBs9TIqRJ4QCffTeIbHC 2PYXf//eoWRP1fT7AesMwD1s4lSaT0BuEoFwZn3bwFhR4Xf9HzVEl8bCXIgj4bq2 WCjE8u/W8ALFZOZ5yJJjRtVOEpTt512u5OzkaF3h+iXh4/g3UYHh1QPNSHA9l7fx UbX+PsI9jYl3Ge4zqMIcuzPkgCIuF+g+EirzNRKijfYxOfoVgad83UXPFAMI2isF +ftDAbIR+Tc7sBug/30ATdhQjFWDfM9Gzz0rBl9Pw1SpCH+h33e2cEMzLJC42DI2 mLpTABI7TMt+tygNAxceHCunPma80z22oobxgkGoZJRKH7MfQg/FD9N05bR+8C11 AlOcix4p1oaWRJssv4myrLjJq4Yt5Ura+/MvWSp1FLhodUbA+F7lfB1L1nW2LtXu /edinaBKNMYUVxAmkJOWm3HT79OsonzbC6KqPDLsTTEfYISS6S5i99WnrLdjNoim ozXkPUG3ymT9oRcgndRwEDGRGe0lAhI5SwdXujvxf1J26f90r8e8sHnAiDeO63ne H+Uxd76b6BxAVpOnluKMTouHI+nxhRyvnp0rUYC523rOtFo9mYluWzte5BOCQ/Ss hFgUKSe1F9+Vzm1bIdt1LicrooKGIeoYOqhk8A3jTum67jnUaQA= =Kv4T -----END PGP SIGNATURE----- Merge 4.4.190 into android-4.4-p Changes in 4.4.190 usb: iowarrior: fix deadlock on disconnect sound: fix a memory leak bug x86/mm: Check for pfn instead of page in vmalloc_sync_one() x86/mm: Sync also unmappings in vmalloc_sync_all() mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy() perf db-export: Fix thread__exec_comm() usb: yurex: Fix use-after-free in yurex_delete can: peak_usb: fix potential double kfree_skb() netfilter: nfnetlink: avoid deadlock due to synchronous request_module iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND mac80211: don't warn about CW params when not using them hwmon: (nct6775) Fix register address and added missed tolerance for nct6106 cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init() s390/qdio: add sanity checks to the fast-requeue path ALSA: compress: Fix regression on compressed capture streams ALSA: compress: Prevent bypasses of set_params ALSA: compress: Be more restrictive about when a drain is allowed perf probe: Avoid calling freeing routine multiple times for same pointer ARM: davinci: fix sleep.S build error on ARMv4 scsi: megaraid_sas: fix panic on loading firmware crashdump scsi: ibmvfc: fix WARN_ON during event pool release tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop perf/core: Fix creating kernel counters for PMUs that override event->cpu can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices hwmon: (nct7802) Fix wrong detection of in4 presence ALSA: firewire: fix a memory leak bug mac80211: don't WARN on short WMM parameters from AP SMB3: Fix deadlock in validate negotiate hits reconnect smb3: send CAP_DFS capability during session setup mwifiex: fix 802.11n/WPA detection scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA sh: kernel: hw_breakpoint: Fix missing break in switch statement usb: gadget: f_midi: fail if set_alt fails to allocate requests USB: gadget: f_midi: fixing a possible double-free in f_midi mm/memcontrol.c: fix use after free in mem_cgroup_iter() ALSA: hda - Fix a memory leak bug HID: holtek: test for sanity of intfdata HID: hiddev: avoid opening a disconnected device HID: hiddev: do cleanup in failure of opening a device Input: kbtab - sanity check for endpoint type Input: iforce - add sanity checks net: usb: pegasus: fix improper read if get_registers() fail xen/pciback: remove set but not used variable 'old_state' irqchip/irq-imx-gpcv2: Forward irq type to parent perf header: Fix divide by zero error if f_header.attr_size==0 perf header: Fix use of unitialized value warning libata: zpodd: Fix small read overflow in zpodd_get_mech_type() scsi: hpsa: correct scsi command status issue after reset ata: libahci: do not complain in case of deferred probe kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules IB/core: Add mitigation for Spectre V1 ocfs2: remove set but not used variable 'last_hash' asm-generic: fix -Wtype-limits compiler warnings staging: comedi: dt3000: Fix signed integer overflow 'divider * base' staging: comedi: dt3000: Fix rounding up of timer divisor USB: core: Fix races in character device registration and deregistraion usb: cdc-acm: make sure a refcount is taken early enough USB: serial: option: add D-Link DWM-222 device ID USB: serial: option: Add support for ZTE MF871A USB: serial: option: add the BroadMobi BM818 card USB: serial: option: Add Motorola modem UARTs Backport minimal compiler_attributes.h to support GCC 9 include/linux/module.h: copy __init/__exit attrs to init/cleanup_module arm64: compat: Allow single-byte watchpoints on all addresses Input: psmouse - fix build error of multiple definition asm-generic: default BUG_ON(x) to if(x)BUG() scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure RDMA: Directly cast the sockaddr union to sockaddr IB/mlx5: Make coding style more consistent x86/vdso: Remove direct HPET access through the vDSO iommu/amd: Move iommu_init_pci() to .init section x86/boot: Disable the address-of-packed-member compiler warning net/packet: fix race in tpacket_snd() xen/netback: Reset nr_frags before freeing skb net/mlx5e: Only support tx/rx pause setting for port owner sctp: fix the transport error_count check bonding: Add vlan tx offload to hw_enc_features Linux 4.4.190 Change-Id: Ic4094fbac2f9b8f6d4a9b4397e82471f40424332 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
dfd52e7009
78 changed files with 387 additions and 223 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 189
|
||||
SUBLEVEL = 190
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#define DEEPSLEEP_SLEEPENABLE_BIT BIT(31)
|
||||
|
||||
.text
|
||||
.arch armv5te
|
||||
/*
|
||||
* Move DaVinci into deep sleep state
|
||||
*
|
||||
|
|
|
@ -544,13 +544,14 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)
|
|||
/* Aligned */
|
||||
break;
|
||||
case 1:
|
||||
/* Allow single byte watchpoint. */
|
||||
if (info->ctrl.len == ARM_BREAKPOINT_LEN_1)
|
||||
break;
|
||||
case 2:
|
||||
/* Allow halfword watchpoints and breakpoints. */
|
||||
if (info->ctrl.len == ARM_BREAKPOINT_LEN_2)
|
||||
break;
|
||||
case 3:
|
||||
/* Allow single byte watchpoint. */
|
||||
if (info->ctrl.len == ARM_BREAKPOINT_LEN_1)
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -160,6 +160,7 @@ int arch_bp_generic_fields(int sh_len, int sh_type,
|
|||
switch (sh_type) {
|
||||
case SH_BREAKPOINT_READ:
|
||||
*gen_type = HW_BREAKPOINT_R;
|
||||
break;
|
||||
case SH_BREAKPOINT_WRITE:
|
||||
*gen_type = HW_BREAKPOINT_W;
|
||||
break;
|
||||
|
|
|
@ -33,6 +33,7 @@ KBUILD_CFLAGS += $(cflags-y)
|
|||
KBUILD_CFLAGS += -mno-mmx -mno-sse
|
||||
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
||||
|
||||
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
|
||||
GCOV_PROFILE := n
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <uapi/linux/time.h>
|
||||
#include <asm/vgtod.h>
|
||||
#include <asm/hpet.h>
|
||||
#include <asm/vvar.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/msr.h>
|
||||
|
@ -26,16 +25,6 @@ extern int __vdso_clock_gettime(clockid_t clock, struct timespec *ts);
|
|||
extern int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
extern time_t __vdso_time(time_t *t);
|
||||
|
||||
#ifdef CONFIG_HPET_TIMER
|
||||
extern u8 hpet_page
|
||||
__attribute__((visibility("hidden")));
|
||||
|
||||
static notrace cycle_t vread_hpet(void)
|
||||
{
|
||||
return *(const volatile u32 *)(&hpet_page + HPET_COUNTER);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PARAVIRT_CLOCK
|
||||
extern u8 pvclock_page
|
||||
__attribute__((visibility("hidden")));
|
||||
|
@ -209,10 +198,6 @@ notrace static inline u64 vgetsns(int *mode)
|
|||
|
||||
if (gtod->vclock_mode == VCLOCK_TSC)
|
||||
cycles = vread_tsc();
|
||||
#ifdef CONFIG_HPET_TIMER
|
||||
else if (gtod->vclock_mode == VCLOCK_HPET)
|
||||
cycles = vread_hpet();
|
||||
#endif
|
||||
#ifdef CONFIG_PARAVIRT_CLOCK
|
||||
else if (gtod->vclock_mode == VCLOCK_PVCLOCK)
|
||||
cycles = vread_pvclock(mode);
|
||||
|
|
|
@ -25,7 +25,7 @@ SECTIONS
|
|||
* segment.
|
||||
*/
|
||||
|
||||
vvar_start = . - 3 * PAGE_SIZE;
|
||||
vvar_start = . - 2 * PAGE_SIZE;
|
||||
vvar_page = vvar_start;
|
||||
|
||||
/* Place all vvars at the offsets in asm/vvar.h. */
|
||||
|
@ -35,8 +35,7 @@ SECTIONS
|
|||
#undef __VVAR_KERNEL_LDS
|
||||
#undef EMIT_VVAR
|
||||
|
||||
hpet_page = vvar_start + PAGE_SIZE;
|
||||
pvclock_page = vvar_start + 2 * PAGE_SIZE;
|
||||
pvclock_page = vvar_start + PAGE_SIZE;
|
||||
|
||||
. = SIZEOF_HEADERS;
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
#define VCLOCK_NONE 0 /* No vDSO clock available. */
|
||||
#define VCLOCK_TSC 1 /* vDSO should use vread_tsc. */
|
||||
#define VCLOCK_HPET 2 /* vDSO should use vread_hpet. */
|
||||
#define VCLOCK_PVCLOCK 3 /* vDSO should use vread_pvclock. */
|
||||
#define VCLOCK_PVCLOCK 2 /* vDSO should use vread_pvclock. */
|
||||
|
||||
struct arch_clocksource_data {
|
||||
int vclock_mode;
|
||||
|
|
|
@ -774,7 +774,6 @@ static struct clocksource clocksource_hpet = {
|
|||
.mask = HPET_MASK,
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
.resume = hpet_resume_counter,
|
||||
.archdata = { .vclock_mode = VCLOCK_HPET },
|
||||
};
|
||||
|
||||
static int hpet_clocksource_register(void)
|
||||
|
|
|
@ -809,8 +809,7 @@ TRACE_EVENT(kvm_write_tsc_offset,
|
|||
|
||||
#define host_clocks \
|
||||
{VCLOCK_NONE, "none"}, \
|
||||
{VCLOCK_TSC, "tsc"}, \
|
||||
{VCLOCK_HPET, "hpet"} \
|
||||
{VCLOCK_TSC, "tsc"} \
|
||||
|
||||
TRACE_EVENT(kvm_update_master_clock,
|
||||
TP_PROTO(bool use_master_clock, unsigned int host_clock, bool offset_matched),
|
||||
|
|
|
@ -216,13 +216,14 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
|
|||
|
||||
pmd = pmd_offset(pud, address);
|
||||
pmd_k = pmd_offset(pud_k, address);
|
||||
|
||||
if (pmd_present(*pmd) != pmd_present(*pmd_k))
|
||||
set_pmd(pmd, *pmd_k);
|
||||
|
||||
if (!pmd_present(*pmd_k))
|
||||
return NULL;
|
||||
|
||||
if (!pmd_present(*pmd))
|
||||
set_pmd(pmd, *pmd_k);
|
||||
else
|
||||
BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
|
||||
BUG_ON(pmd_pfn(*pmd) != pmd_pfn(*pmd_k));
|
||||
|
||||
return pmd_k;
|
||||
}
|
||||
|
@ -242,17 +243,13 @@ void vmalloc_sync_all(void)
|
|||
spin_lock(&pgd_lock);
|
||||
list_for_each_entry(page, &pgd_list, lru) {
|
||||
spinlock_t *pgt_lock;
|
||||
pmd_t *ret;
|
||||
|
||||
/* the pgt_lock only for Xen */
|
||||
pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
|
||||
|
||||
spin_lock(pgt_lock);
|
||||
ret = vmalloc_sync_one(page_address(page), address);
|
||||
vmalloc_sync_one(page_address(page), address);
|
||||
spin_unlock(pgt_lock);
|
||||
|
||||
if (!ret)
|
||||
break;
|
||||
}
|
||||
spin_unlock(&pgd_lock);
|
||||
}
|
||||
|
|
|
@ -300,6 +300,9 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port,
|
|||
hpriv->phys[port] = NULL;
|
||||
rc = 0;
|
||||
break;
|
||||
case -EPROBE_DEFER:
|
||||
/* Do not complain yet */
|
||||
break;
|
||||
|
||||
default:
|
||||
dev_err(dev,
|
||||
|
|
|
@ -55,7 +55,7 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
|
|||
unsigned int ret;
|
||||
struct rm_feature_desc *desc;
|
||||
struct ata_taskfile tf;
|
||||
static const char cdb[] = { GPCMD_GET_CONFIGURATION,
|
||||
static const char cdb[ATAPI_CDB_LEN] = { GPCMD_GET_CONFIGURATION,
|
||||
2, /* only 1 feature descriptor requested */
|
||||
0, 3, /* 3, removable medium feature */
|
||||
0, 0, 0,/* reserved */
|
||||
|
|
|
@ -145,11 +145,19 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||
int err = -ENODEV;
|
||||
|
||||
cpu = of_get_cpu_node(policy->cpu, NULL);
|
||||
|
||||
of_node_put(cpu);
|
||||
if (!cpu)
|
||||
goto out;
|
||||
|
||||
max_freqp = of_get_property(cpu, "clock-frequency", NULL);
|
||||
of_node_put(cpu);
|
||||
if (!max_freqp) {
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* we need the freq in kHz */
|
||||
max_freq = *max_freqp / 1000;
|
||||
|
||||
dn = of_find_compatible_node(NULL, NULL, "1682m-sdc");
|
||||
if (!dn)
|
||||
dn = of_find_compatible_node(NULL, NULL,
|
||||
|
@ -185,16 +193,6 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||
}
|
||||
|
||||
pr_debug("init cpufreq on CPU %d\n", policy->cpu);
|
||||
|
||||
max_freqp = of_get_property(cpu, "clock-frequency", NULL);
|
||||
if (!max_freqp) {
|
||||
err = -EINVAL;
|
||||
goto out_unmap_sdcpwr;
|
||||
}
|
||||
|
||||
/* we need the freq in kHz */
|
||||
max_freq = *max_freqp / 1000;
|
||||
|
||||
pr_debug("max clock-frequency is at %u kHz\n", max_freq);
|
||||
pr_debug("initializing frequency table\n");
|
||||
|
||||
|
@ -212,9 +210,6 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||
|
||||
return cpufreq_generic_init(policy, pas_freqs, get_gizmo_latency());
|
||||
|
||||
out_unmap_sdcpwr:
|
||||
iounmap(sdcpwr_mapbase);
|
||||
|
||||
out_unmap_sdcasr:
|
||||
iounmap(sdcasr_mapbase);
|
||||
out:
|
||||
|
|
|
@ -135,7 +135,7 @@ config DMI_SCAN_MACHINE_NON_EFI_FALLBACK
|
|||
|
||||
config ISCSI_IBFT_FIND
|
||||
bool "iSCSI Boot Firmware Table Attributes"
|
||||
depends on X86 && ACPI
|
||||
depends on X86 && ISCSI_IBFT
|
||||
default n
|
||||
help
|
||||
This option enables the kernel to find the region of memory
|
||||
|
@ -146,7 +146,8 @@ config ISCSI_IBFT_FIND
|
|||
config ISCSI_IBFT
|
||||
tristate "iSCSI Boot Firmware Table Attributes module"
|
||||
select ISCSI_BOOT_SYSFS
|
||||
depends on ISCSI_IBFT_FIND && SCSI && SCSI_LOWLEVEL
|
||||
select ISCSI_IBFT_FIND if X86
|
||||
depends on ACPI && SCSI && SCSI_LOWLEVEL
|
||||
default n
|
||||
help
|
||||
This option enables support for detection and exposing of iSCSI
|
||||
|
|
|
@ -93,6 +93,10 @@ MODULE_DESCRIPTION("sysfs interface to BIOS iBFT information");
|
|||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(IBFT_ISCSI_VERSION);
|
||||
|
||||
#ifndef CONFIG_ISCSI_IBFT_FIND
|
||||
struct acpi_table_ibft *ibft_addr;
|
||||
#endif
|
||||
|
||||
struct ibft_hdr {
|
||||
u8 id;
|
||||
u8 version;
|
||||
|
|
|
@ -126,9 +126,14 @@ static int holtek_kbd_input_event(struct input_dev *dev, unsigned int type,
|
|||
|
||||
/* Locate the boot interface, to receive the LED change events */
|
||||
struct usb_interface *boot_interface = usb_ifnum_to_if(usb_dev, 0);
|
||||
struct hid_device *boot_hid;
|
||||
struct hid_input *boot_hid_input;
|
||||
|
||||
struct hid_device *boot_hid = usb_get_intfdata(boot_interface);
|
||||
struct hid_input *boot_hid_input = list_first_entry(&boot_hid->inputs,
|
||||
if (unlikely(boot_interface == NULL))
|
||||
return -ENODEV;
|
||||
|
||||
boot_hid = usb_get_intfdata(boot_interface);
|
||||
boot_hid_input = list_first_entry(&boot_hid->inputs,
|
||||
struct hid_input, list);
|
||||
|
||||
return boot_hid_input->input->event(boot_hid_input->input, type, code,
|
||||
|
|
|
@ -308,6 +308,14 @@ static int hiddev_open(struct inode *inode, struct file *file)
|
|||
spin_unlock_irq(&list->hiddev->list_lock);
|
||||
|
||||
mutex_lock(&hiddev->existancelock);
|
||||
/*
|
||||
* recheck exist with existance lock held to
|
||||
* avoid opening a disconnected device
|
||||
*/
|
||||
if (!list->hiddev->exist) {
|
||||
res = -ENODEV;
|
||||
goto bail_unlock;
|
||||
}
|
||||
if (!list->hiddev->open++)
|
||||
if (list->hiddev->exist) {
|
||||
struct hid_device *hid = hiddev->hid;
|
||||
|
@ -322,6 +330,10 @@ static int hiddev_open(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
bail_unlock:
|
||||
mutex_unlock(&hiddev->existancelock);
|
||||
|
||||
spin_lock_irq(&list->hiddev->list_lock);
|
||||
list_del(&list->node);
|
||||
spin_unlock_irq(&list->hiddev->list_lock);
|
||||
bail:
|
||||
file->private_data = NULL;
|
||||
vfree(list);
|
||||
|
|
|
@ -696,7 +696,7 @@ static const u16 NCT6106_REG_TARGET[] = { 0x111, 0x121, 0x131 };
|
|||
static const u16 NCT6106_REG_WEIGHT_TEMP_SEL[] = { 0x168, 0x178, 0x188 };
|
||||
static const u16 NCT6106_REG_WEIGHT_TEMP_STEP[] = { 0x169, 0x179, 0x189 };
|
||||
static const u16 NCT6106_REG_WEIGHT_TEMP_STEP_TOL[] = { 0x16a, 0x17a, 0x18a };
|
||||
static const u16 NCT6106_REG_WEIGHT_DUTY_STEP[] = { 0x16b, 0x17b, 0x17c };
|
||||
static const u16 NCT6106_REG_WEIGHT_DUTY_STEP[] = { 0x16b, 0x17b, 0x18b };
|
||||
static const u16 NCT6106_REG_WEIGHT_TEMP_BASE[] = { 0x16c, 0x17c, 0x18c };
|
||||
static const u16 NCT6106_REG_WEIGHT_DUTY_BASE[] = { 0x16d, 0x17d, 0x18d };
|
||||
|
||||
|
@ -3478,6 +3478,7 @@ static int nct6775_probe(struct platform_device *pdev)
|
|||
data->REG_FAN_TIME[0] = NCT6106_REG_FAN_STOP_TIME;
|
||||
data->REG_FAN_TIME[1] = NCT6106_REG_FAN_STEP_UP_TIME;
|
||||
data->REG_FAN_TIME[2] = NCT6106_REG_FAN_STEP_DOWN_TIME;
|
||||
data->REG_TOLERANCE_H = NCT6106_REG_TOLERANCE_H;
|
||||
data->REG_PWM[0] = NCT6106_REG_PWM;
|
||||
data->REG_PWM[1] = NCT6106_REG_FAN_START_OUTPUT;
|
||||
data->REG_PWM[2] = NCT6106_REG_FAN_STOP_OUTPUT;
|
||||
|
|
|
@ -768,7 +768,7 @@ static struct attribute *nct7802_in_attrs[] = {
|
|||
&sensor_dev_attr_in3_alarm.dev_attr.attr,
|
||||
&sensor_dev_attr_in3_beep.dev_attr.attr,
|
||||
|
||||
&sensor_dev_attr_in4_input.dev_attr.attr, /* 17 */
|
||||
&sensor_dev_attr_in4_input.dev_attr.attr, /* 16 */
|
||||
&sensor_dev_attr_in4_min.dev_attr.attr,
|
||||
&sensor_dev_attr_in4_max.dev_attr.attr,
|
||||
&sensor_dev_attr_in4_alarm.dev_attr.attr,
|
||||
|
@ -794,9 +794,9 @@ static umode_t nct7802_in_is_visible(struct kobject *kobj,
|
|||
|
||||
if (index >= 6 && index < 11 && (reg & 0x03) != 0x03) /* VSEN1 */
|
||||
return 0;
|
||||
if (index >= 11 && index < 17 && (reg & 0x0c) != 0x0c) /* VSEN2 */
|
||||
if (index >= 11 && index < 16 && (reg & 0x0c) != 0x0c) /* VSEN2 */
|
||||
return 0;
|
||||
if (index >= 17 && (reg & 0x30) != 0x30) /* VSEN3 */
|
||||
if (index >= 16 && (reg & 0x30) != 0x30) /* VSEN3 */
|
||||
return 0;
|
||||
|
||||
return attr->mode;
|
||||
|
|
|
@ -481,14 +481,13 @@ int rdma_addr_find_dmac_by_grh(const union ib_gid *sgid, const union ib_gid *dgi
|
|||
struct net_device *dev;
|
||||
|
||||
union {
|
||||
struct sockaddr _sockaddr;
|
||||
struct sockaddr_in _sockaddr_in;
|
||||
struct sockaddr_in6 _sockaddr_in6;
|
||||
} sgid_addr, dgid_addr;
|
||||
|
||||
|
||||
rdma_gid2ip(&sgid_addr._sockaddr, sgid);
|
||||
rdma_gid2ip(&dgid_addr._sockaddr, dgid);
|
||||
rdma_gid2ip((struct sockaddr *)&sgid_addr, sgid);
|
||||
rdma_gid2ip((struct sockaddr *)&dgid_addr, dgid);
|
||||
|
||||
memset(&dev_addr, 0, sizeof(dev_addr));
|
||||
dev_addr.bound_dev_if = if_index;
|
||||
|
@ -496,8 +495,9 @@ int rdma_addr_find_dmac_by_grh(const union ib_gid *sgid, const union ib_gid *dgi
|
|||
|
||||
ctx.addr = &dev_addr;
|
||||
init_completion(&ctx.comp);
|
||||
ret = rdma_resolve_ip(&self, &sgid_addr._sockaddr, &dgid_addr._sockaddr,
|
||||
&dev_addr, 1000, resolve_cb, &ctx);
|
||||
ret = rdma_resolve_ip(&self, (struct sockaddr *)&sgid_addr,
|
||||
(struct sockaddr *)&dgid_addr, &dev_addr, 1000,
|
||||
resolve_cb, &ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -519,16 +519,15 @@ int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id)
|
|||
int ret = 0;
|
||||
struct rdma_dev_addr dev_addr;
|
||||
union {
|
||||
struct sockaddr _sockaddr;
|
||||
struct sockaddr_in _sockaddr_in;
|
||||
struct sockaddr_in6 _sockaddr_in6;
|
||||
} gid_addr;
|
||||
|
||||
rdma_gid2ip(&gid_addr._sockaddr, sgid);
|
||||
rdma_gid2ip((struct sockaddr *)&gid_addr, sgid);
|
||||
|
||||
memset(&dev_addr, 0, sizeof(dev_addr));
|
||||
dev_addr.net = &init_net;
|
||||
ret = rdma_translate_ip(&gid_addr._sockaddr, &dev_addr, vlan_id);
|
||||
ret = rdma_translate_ip((struct sockaddr *)&gid_addr, &dev_addr, vlan_id);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
|
@ -842,11 +843,14 @@ static int ib_umad_unreg_agent(struct ib_umad_file *file, u32 __user *arg)
|
|||
|
||||
if (get_user(id, arg))
|
||||
return -EFAULT;
|
||||
if (id >= IB_UMAD_MAX_AGENTS)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&file->port->file_mutex);
|
||||
mutex_lock(&file->mutex);
|
||||
|
||||
if (id >= IB_UMAD_MAX_AGENTS || !__get_agent(file, id)) {
|
||||
id = array_index_nospec(id, IB_UMAD_MAX_AGENTS);
|
||||
if (!__get_agent(file, id)) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -792,7 +792,7 @@ static struct mlx5_ib_mr *reg_umr(struct ib_pd *pd, struct ib_umem *umem,
|
|||
struct device *ddev = dev->ib_dev.dma_device;
|
||||
struct umr_common *umrc = &dev->umrc;
|
||||
struct mlx5_ib_umr_context umr_context;
|
||||
struct mlx5_umr_wr umrwr;
|
||||
struct mlx5_umr_wr umrwr = {};
|
||||
struct ib_send_wr *bad;
|
||||
struct mlx5_ib_mr *mr;
|
||||
struct ib_sge sg;
|
||||
|
@ -839,7 +839,6 @@ static struct mlx5_ib_mr *reg_umr(struct ib_pd *pd, struct ib_umem *umem,
|
|||
goto free_pas;
|
||||
}
|
||||
|
||||
memset(&umrwr, 0, sizeof(umrwr));
|
||||
umrwr.wr.wr_id = (u64)(unsigned long)&umr_context;
|
||||
prep_umr_reg_wqe(pd, &umrwr.wr, &sg, dma, npages, mr->mmr.key,
|
||||
page_shift, virt_addr, len, access_flags);
|
||||
|
@ -1163,11 +1162,10 @@ static int unreg_umr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)
|
|||
{
|
||||
struct umr_common *umrc = &dev->umrc;
|
||||
struct mlx5_ib_umr_context umr_context;
|
||||
struct mlx5_umr_wr umrwr;
|
||||
struct mlx5_umr_wr umrwr = {};
|
||||
struct ib_send_wr *bad;
|
||||
int err;
|
||||
|
||||
memset(&umrwr.wr, 0, sizeof(umrwr));
|
||||
umrwr.wr.wr_id = (u64)(unsigned long)&umr_context;
|
||||
prep_umr_unreg_wqe(dev, &umrwr.wr, mr->mmr.key);
|
||||
|
||||
|
|
|
@ -145,7 +145,12 @@ static int iforce_usb_probe(struct usb_interface *intf,
|
|||
return -ENODEV;
|
||||
|
||||
epirq = &interface->endpoint[0].desc;
|
||||
if (!usb_endpoint_is_int_in(epirq))
|
||||
return -ENODEV;
|
||||
|
||||
epout = &interface->endpoint[1].desc;
|
||||
if (!usb_endpoint_is_int_out(epout))
|
||||
return -ENODEV;
|
||||
|
||||
if (!(iforce = kzalloc(sizeof(struct iforce) + 32, GFP_KERNEL)))
|
||||
goto fail;
|
||||
|
|
|
@ -153,7 +153,8 @@ struct trackpoint_data
|
|||
#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
|
||||
int trackpoint_detect(struct psmouse *psmouse, bool set_properties);
|
||||
#else
|
||||
inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
|
||||
static inline int trackpoint_detect(struct psmouse *psmouse,
|
||||
bool set_properties)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
|
|
@ -125,6 +125,10 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
|
|||
if (intf->cur_altsetting->desc.bNumEndpoints < 1)
|
||||
return -ENODEV;
|
||||
|
||||
endpoint = &intf->cur_altsetting->endpoint[0].desc;
|
||||
if (!usb_endpoint_is_int_in(endpoint))
|
||||
return -ENODEV;
|
||||
|
||||
kbtab = kzalloc(sizeof(struct kbtab), GFP_KERNEL);
|
||||
input_dev = input_allocate_device();
|
||||
if (!kbtab || !input_dev)
|
||||
|
@ -164,8 +168,6 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
|
|||
input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0);
|
||||
input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0);
|
||||
|
||||
endpoint = &intf->cur_altsetting->endpoint[0].desc;
|
||||
|
||||
usb_fill_int_urb(kbtab->irq, dev,
|
||||
usb_rcvintpipe(dev, endpoint->bEndpointAddress),
|
||||
kbtab->data, 8,
|
||||
|
|
|
@ -1223,7 +1223,7 @@ static const struct attribute_group *amd_iommu_groups[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
static int iommu_init_pci(struct amd_iommu *iommu)
|
||||
static int __init iommu_init_pci(struct amd_iommu *iommu)
|
||||
{
|
||||
int cap_ptr = iommu->cap_ptr;
|
||||
u32 range, misc, low, high;
|
||||
|
|
|
@ -145,6 +145,7 @@ static struct irq_chip gpcv2_irqchip_data_chip = {
|
|||
.irq_unmask = imx_gpcv2_irq_unmask,
|
||||
.irq_set_wake = imx_gpcv2_irq_set_wake,
|
||||
.irq_retrigger = irq_chip_retrigger_hierarchy,
|
||||
.irq_set_type = irq_chip_set_type_parent,
|
||||
#ifdef CONFIG_SMP
|
||||
.irq_set_affinity = irq_chip_set_affinity_parent,
|
||||
#endif
|
||||
|
|
|
@ -1111,7 +1111,9 @@ static void bond_compute_features(struct bonding *bond)
|
|||
|
||||
done:
|
||||
bond_dev->vlan_features = vlan_features;
|
||||
bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL;
|
||||
bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
|
||||
NETIF_F_HW_VLAN_CTAG_TX |
|
||||
NETIF_F_HW_VLAN_STAG_TX;
|
||||
bond_dev->gso_max_segs = gso_max_segs;
|
||||
netif_set_gso_max_size(bond_dev, gso_max_size);
|
||||
|
||||
|
|
|
@ -592,16 +592,16 @@ static int peak_usb_ndo_stop(struct net_device *netdev)
|
|||
dev->state &= ~PCAN_USB_STATE_STARTED;
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
close_candev(netdev);
|
||||
|
||||
dev->can.state = CAN_STATE_STOPPED;
|
||||
|
||||
/* unlink all pending urbs and free used memory */
|
||||
peak_usb_unlink_all_urbs(dev);
|
||||
|
||||
if (dev->adapter->dev_stop)
|
||||
dev->adapter->dev_stop(dev);
|
||||
|
||||
close_candev(netdev);
|
||||
|
||||
dev->can.state = CAN_STATE_STOPPED;
|
||||
|
||||
/* can set bus off now */
|
||||
if (dev->adapter->dev_set_bus) {
|
||||
int err = dev->adapter->dev_set_bus(dev, 0);
|
||||
|
|
|
@ -851,7 +851,7 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev)
|
|||
goto err_out;
|
||||
|
||||
/* allocate command buffer once for all for the interface */
|
||||
pdev->cmd_buffer_addr = kmalloc(PCAN_UFD_CMD_BUFFER_SIZE,
|
||||
pdev->cmd_buffer_addr = kzalloc(PCAN_UFD_CMD_BUFFER_SIZE,
|
||||
GFP_KERNEL);
|
||||
if (!pdev->cmd_buffer_addr)
|
||||
goto err_out_1;
|
||||
|
|
|
@ -500,7 +500,7 @@ static int pcan_usb_pro_drv_loaded(struct peak_usb_device *dev, int loaded)
|
|||
u8 *buffer;
|
||||
int err;
|
||||
|
||||
buffer = kmalloc(PCAN_USBPRO_FCT_DRVLD_REQ_LEN, GFP_KERNEL);
|
||||
buffer = kzalloc(PCAN_USBPRO_FCT_DRVLD_REQ_LEN, GFP_KERNEL);
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -855,6 +855,9 @@ static int mlx5e_set_pauseparam(struct net_device *netdev,
|
|||
struct mlx5_core_dev *mdev = priv->mdev;
|
||||
int err;
|
||||
|
||||
if (!MLX5_CAP_GEN(mdev, vport_group_manager))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (pauseparam->autoneg)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int val)
|
|||
static int read_eprom_word(pegasus_t *pegasus, __u8 index, __u16 *retdata)
|
||||
{
|
||||
int i;
|
||||
__u8 tmp;
|
||||
__u8 tmp = 0;
|
||||
__le16 retdatai;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ enum {
|
|||
|
||||
#define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S)
|
||||
|
||||
#define WPA_GTK_OUI_OFFSET 2
|
||||
#define RSN_GTK_OUI_OFFSET 2
|
||||
|
||||
#define MWIFIEX_OUI_NOT_PRESENT 0
|
||||
|
|
|
@ -151,7 +151,8 @@ mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher)
|
|||
if (((bss_desc->bcn_wpa_ie) &&
|
||||
((*(bss_desc->bcn_wpa_ie)).vend_hdr.element_id ==
|
||||
WLAN_EID_VENDOR_SPECIFIC))) {
|
||||
iebody = (struct ie_body *) bss_desc->bcn_wpa_ie->data;
|
||||
iebody = (struct ie_body *)((u8 *)bss_desc->bcn_wpa_ie->data +
|
||||
WPA_GTK_OUI_OFFSET);
|
||||
oui = &mwifiex_wpa_oui[cipher][0];
|
||||
ret = mwifiex_search_oui_in_ie(iebody, oui);
|
||||
if (ret)
|
||||
|
|
|
@ -1421,6 +1421,7 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
|
|||
skb_shinfo(skb)->nr_frags = MAX_SKB_FRAGS;
|
||||
nskb = xenvif_alloc_skb(0);
|
||||
if (unlikely(nskb == NULL)) {
|
||||
skb_shinfo(skb)->nr_frags = 0;
|
||||
kfree_skb(skb);
|
||||
xenvif_tx_err(queue, &txreq, idx);
|
||||
if (net_ratelimit())
|
||||
|
@ -1436,6 +1437,7 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
|
|||
|
||||
if (xenvif_set_skb_gso(queue->vif, skb, gso)) {
|
||||
/* Failure in xenvif_set_skb_gso is fatal. */
|
||||
skb_shinfo(skb)->nr_frags = 0;
|
||||
kfree_skb(skb);
|
||||
kfree_skb(nskb);
|
||||
break;
|
||||
|
|
|
@ -1576,13 +1576,13 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags,
|
|||
rc = qdio_kick_outbound_q(q, phys_aob);
|
||||
} else if (need_siga_sync(q)) {
|
||||
rc = qdio_siga_sync_q(q);
|
||||
} else if (count < QDIO_MAX_BUFFERS_PER_Q &&
|
||||
get_buf_state(q, prev_buf(bufnr), &state, 0) > 0 &&
|
||||
state == SLSB_CU_OUTPUT_PRIMED) {
|
||||
/* The previous buffer is not processed yet, tack on. */
|
||||
qperf_inc(q, fast_requeue);
|
||||
} else {
|
||||
/* try to fast requeue buffers */
|
||||
get_buf_state(q, prev_buf(bufnr), &state, 0);
|
||||
if (state != SLSB_CU_OUTPUT_PRIMED)
|
||||
rc = qdio_kick_outbound_q(q, 0);
|
||||
else
|
||||
qperf_inc(q, fast_requeue);
|
||||
rc = qdio_kick_outbound_q(q, 0);
|
||||
}
|
||||
|
||||
/* in case of SIGA errors we must process the error immediately */
|
||||
|
|
|
@ -1973,7 +1973,7 @@ EXPORT_SYMBOL_GPL(fcoe_wwn_from_mac);
|
|||
*/
|
||||
static inline struct fcoe_rport *fcoe_ctlr_rport(struct fc_rport_priv *rdata)
|
||||
{
|
||||
return (struct fcoe_rport *)(rdata + 1);
|
||||
return container_of(rdata, struct fcoe_rport, rdata);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2233,7 +2233,7 @@ static void fcoe_ctlr_vn_start(struct fcoe_ctlr *fip)
|
|||
*/
|
||||
static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip,
|
||||
struct sk_buff *skb,
|
||||
struct fc_rport_priv *rdata)
|
||||
struct fcoe_rport *frport)
|
||||
{
|
||||
struct fip_header *fiph;
|
||||
struct fip_desc *desc = NULL;
|
||||
|
@ -2241,16 +2241,12 @@ static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip,
|
|||
struct fip_wwn_desc *wwn = NULL;
|
||||
struct fip_vn_desc *vn = NULL;
|
||||
struct fip_size_desc *size = NULL;
|
||||
struct fcoe_rport *frport;
|
||||
size_t rlen;
|
||||
size_t dlen;
|
||||
u32 desc_mask = 0;
|
||||
u32 dtype;
|
||||
u8 sub;
|
||||
|
||||
memset(rdata, 0, sizeof(*rdata) + sizeof(*frport));
|
||||
frport = fcoe_ctlr_rport(rdata);
|
||||
|
||||
fiph = (struct fip_header *)skb->data;
|
||||
frport->flags = ntohs(fiph->fip_flags);
|
||||
|
||||
|
@ -2313,15 +2309,17 @@ static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip,
|
|||
if (dlen != sizeof(struct fip_wwn_desc))
|
||||
goto len_err;
|
||||
wwn = (struct fip_wwn_desc *)desc;
|
||||
rdata->ids.node_name = get_unaligned_be64(&wwn->fd_wwn);
|
||||
frport->rdata.ids.node_name =
|
||||
get_unaligned_be64(&wwn->fd_wwn);
|
||||
break;
|
||||
case FIP_DT_VN_ID:
|
||||
if (dlen != sizeof(struct fip_vn_desc))
|
||||
goto len_err;
|
||||
vn = (struct fip_vn_desc *)desc;
|
||||
memcpy(frport->vn_mac, vn->fd_mac, ETH_ALEN);
|
||||
rdata->ids.port_id = ntoh24(vn->fd_fc_id);
|
||||
rdata->ids.port_name = get_unaligned_be64(&vn->fd_wwpn);
|
||||
frport->rdata.ids.port_id = ntoh24(vn->fd_fc_id);
|
||||
frport->rdata.ids.port_name =
|
||||
get_unaligned_be64(&vn->fd_wwpn);
|
||||
break;
|
||||
case FIP_DT_FC4F:
|
||||
if (dlen != sizeof(struct fip_fc4_feat))
|
||||
|
@ -2664,16 +2662,13 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
|
|||
{
|
||||
struct fip_header *fiph;
|
||||
enum fip_vn2vn_subcode sub;
|
||||
struct {
|
||||
struct fc_rport_priv rdata;
|
||||
struct fcoe_rport frport;
|
||||
} buf;
|
||||
struct fcoe_rport frport = { };
|
||||
int rc;
|
||||
|
||||
fiph = (struct fip_header *)skb->data;
|
||||
sub = fiph->fip_subcode;
|
||||
|
||||
rc = fcoe_ctlr_vn_parse(fip, skb, &buf.rdata);
|
||||
rc = fcoe_ctlr_vn_parse(fip, skb, &frport);
|
||||
if (rc) {
|
||||
LIBFCOE_FIP_DBG(fip, "vn_recv vn_parse error %d\n", rc);
|
||||
goto drop;
|
||||
|
@ -2682,19 +2677,19 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
|
|||
mutex_lock(&fip->ctlr_mutex);
|
||||
switch (sub) {
|
||||
case FIP_SC_VN_PROBE_REQ:
|
||||
fcoe_ctlr_vn_probe_req(fip, &buf.rdata);
|
||||
fcoe_ctlr_vn_probe_req(fip, &frport.rdata);
|
||||
break;
|
||||
case FIP_SC_VN_PROBE_REP:
|
||||
fcoe_ctlr_vn_probe_reply(fip, &buf.rdata);
|
||||
fcoe_ctlr_vn_probe_reply(fip, &frport.rdata);
|
||||
break;
|
||||
case FIP_SC_VN_CLAIM_NOTIFY:
|
||||
fcoe_ctlr_vn_claim_notify(fip, &buf.rdata);
|
||||
fcoe_ctlr_vn_claim_notify(fip, &frport.rdata);
|
||||
break;
|
||||
case FIP_SC_VN_CLAIM_REP:
|
||||
fcoe_ctlr_vn_claim_resp(fip, &buf.rdata);
|
||||
fcoe_ctlr_vn_claim_resp(fip, &frport.rdata);
|
||||
break;
|
||||
case FIP_SC_VN_BEACON:
|
||||
fcoe_ctlr_vn_beacon(fip, &buf.rdata);
|
||||
fcoe_ctlr_vn_beacon(fip, &frport.rdata);
|
||||
break;
|
||||
default:
|
||||
LIBFCOE_FIP_DBG(fip, "vn_recv unknown subcode %d\n", sub);
|
||||
|
|
|
@ -2153,6 +2153,8 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h,
|
|||
case IOACCEL2_SERV_RESPONSE_COMPLETE:
|
||||
switch (c2->error_data.status) {
|
||||
case IOACCEL2_STATUS_SR_TASK_COMP_GOOD:
|
||||
if (cmd)
|
||||
cmd->result = 0;
|
||||
break;
|
||||
case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND:
|
||||
cmd->result |= SAM_STAT_CHECK_CONDITION;
|
||||
|
@ -2320,8 +2322,10 @@ static void process_ioaccel2_completion(struct ctlr_info *h,
|
|||
|
||||
/* check for good status */
|
||||
if (likely(c2->error_data.serv_response == 0 &&
|
||||
c2->error_data.status == 0))
|
||||
c2->error_data.status == 0)) {
|
||||
cmd->result = 0;
|
||||
return hpsa_cmd_free_and_done(h, c, cmd);
|
||||
}
|
||||
|
||||
/*
|
||||
* Any RAID offload error results in retry which will use
|
||||
|
@ -5236,6 +5240,12 @@ static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
|
|||
}
|
||||
c = cmd_tagged_alloc(h, cmd);
|
||||
|
||||
/*
|
||||
* This is necessary because the SML doesn't zero out this field during
|
||||
* error recovery.
|
||||
*/
|
||||
cmd->result = 0;
|
||||
|
||||
/*
|
||||
* Call alternate submit routine for I/O accelerated commands.
|
||||
* Retries always go down the normal I/O path.
|
||||
|
|
|
@ -4869,8 +4869,8 @@ static int ibmvfc_remove(struct vio_dev *vdev)
|
|||
|
||||
spin_lock_irqsave(vhost->host->host_lock, flags);
|
||||
ibmvfc_purge_requests(vhost, DID_ERROR);
|
||||
ibmvfc_free_event_pool(vhost);
|
||||
spin_unlock_irqrestore(vhost->host->host_lock, flags);
|
||||
ibmvfc_free_event_pool(vhost);
|
||||
|
||||
ibmvfc_free_mem(vhost);
|
||||
spin_lock(&ibmvfc_driver_lock);
|
||||
|
|
|
@ -121,12 +121,15 @@ static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport,
|
|||
u32 port_id)
|
||||
{
|
||||
struct fc_rport_priv *rdata;
|
||||
size_t rport_priv_size = sizeof(*rdata);
|
||||
|
||||
rdata = lport->tt.rport_lookup(lport, port_id);
|
||||
if (rdata)
|
||||
return rdata;
|
||||
|
||||
rdata = kzalloc(sizeof(*rdata) + lport->rport_priv_size, GFP_KERNEL);
|
||||
if (lport->rport_priv_size > 0)
|
||||
rport_priv_size = lport->rport_priv_size;
|
||||
rdata = kzalloc(rport_priv_size, GFP_KERNEL);
|
||||
if (!rdata)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -2752,6 +2752,7 @@ megasas_fw_crash_buffer_show(struct device *cdev,
|
|||
u32 size;
|
||||
unsigned long buff_addr;
|
||||
unsigned long dmachunk = CRASH_DMA_BUF_SIZE;
|
||||
unsigned long chunk_left_bytes;
|
||||
unsigned long src_addr;
|
||||
unsigned long flags;
|
||||
u32 buff_offset;
|
||||
|
@ -2777,6 +2778,8 @@ megasas_fw_crash_buffer_show(struct device *cdev,
|
|||
}
|
||||
|
||||
size = (instance->fw_crash_buffer_size * dmachunk) - buff_offset;
|
||||
chunk_left_bytes = dmachunk - (buff_offset % dmachunk);
|
||||
size = (size > chunk_left_bytes) ? chunk_left_bytes : size;
|
||||
size = (size >= PAGE_SIZE) ? (PAGE_SIZE - 1) : size;
|
||||
|
||||
src_addr = (unsigned long)instance->crash_buf[buff_offset / dmachunk] +
|
||||
|
|
|
@ -1686,9 +1686,11 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)
|
|||
{
|
||||
struct sysinfo s;
|
||||
u64 consistent_dma_mask;
|
||||
/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
|
||||
int dma_mask = (ioc->hba_mpi_version_belonged > MPI2_VERSION) ? 63 : 64;
|
||||
|
||||
if (ioc->dma_mask)
|
||||
consistent_dma_mask = DMA_BIT_MASK(64);
|
||||
consistent_dma_mask = DMA_BIT_MASK(dma_mask);
|
||||
else
|
||||
consistent_dma_mask = DMA_BIT_MASK(32);
|
||||
|
||||
|
@ -1696,11 +1698,11 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)
|
|||
const uint64_t required_mask =
|
||||
dma_get_required_mask(&pdev->dev);
|
||||
if ((required_mask > DMA_BIT_MASK(32)) &&
|
||||
!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
|
||||
!pci_set_dma_mask(pdev, DMA_BIT_MASK(dma_mask)) &&
|
||||
!pci_set_consistent_dma_mask(pdev, consistent_dma_mask)) {
|
||||
ioc->base_add_sg_single = &_base_add_sg_single_64;
|
||||
ioc->sge_size = sizeof(Mpi2SGESimple64_t);
|
||||
ioc->dma_mask = 64;
|
||||
ioc->dma_mask = dma_mask;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
@ -1726,7 +1728,7 @@ static int
|
|||
_base_change_consistent_dma_mask(struct MPT3SAS_ADAPTER *ioc,
|
||||
struct pci_dev *pdev)
|
||||
{
|
||||
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
|
||||
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(ioc->dma_mask))) {
|
||||
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -3325,7 +3327,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
|
|||
total_sz += sz;
|
||||
} while (ioc->rdpq_array_enable && (++i < ioc->reply_queue_count));
|
||||
|
||||
if (ioc->dma_mask == 64) {
|
||||
if (ioc->dma_mask > 32) {
|
||||
if (_base_change_consistent_dma_mask(ioc, ioc->pdev) != 0) {
|
||||
pr_warn(MPT3SAS_FMT
|
||||
"no suitable consistent DMA mask for %s\n",
|
||||
|
|
|
@ -351,9 +351,9 @@ static irqreturn_t dt3k_interrupt(int irq, void *d)
|
|||
static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
|
||||
unsigned int flags)
|
||||
{
|
||||
int divider, base, prescale;
|
||||
unsigned int divider, base, prescale;
|
||||
|
||||
/* This function needs improvment */
|
||||
/* This function needs improvement */
|
||||
/* Don't know if divider==0 works. */
|
||||
|
||||
for (prescale = 0; prescale < 16; prescale++) {
|
||||
|
@ -367,7 +367,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
|
|||
divider = (*nanosec) / base;
|
||||
break;
|
||||
case CMDF_ROUND_UP:
|
||||
divider = (*nanosec) / base;
|
||||
divider = DIV_ROUND_UP(*nanosec, base);
|
||||
break;
|
||||
}
|
||||
if (divider < 65536) {
|
||||
|
@ -377,7 +377,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
|
|||
}
|
||||
|
||||
prescale = 15;
|
||||
base = timer_base * (1 << prescale);
|
||||
base = timer_base * (prescale + 1);
|
||||
divider = 65535;
|
||||
*nanosec = divider * base;
|
||||
return (prescale << 16) | (divider);
|
||||
|
|
|
@ -137,8 +137,7 @@ static void __ldsem_wake_readers(struct ld_semaphore *sem)
|
|||
|
||||
list_for_each_entry_safe(waiter, next, &sem->read_wait, list) {
|
||||
tsk = waiter->task;
|
||||
smp_mb();
|
||||
waiter->task = NULL;
|
||||
smp_store_release(&waiter->task, NULL);
|
||||
wake_up_process(tsk);
|
||||
put_task_struct(tsk);
|
||||
}
|
||||
|
@ -234,7 +233,7 @@ down_read_failed(struct ld_semaphore *sem, long count, long timeout)
|
|||
for (;;) {
|
||||
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
|
||||
|
||||
if (!waiter.task)
|
||||
if (!smp_load_acquire(&waiter.task))
|
||||
break;
|
||||
if (!timeout)
|
||||
break;
|
||||
|
|
|
@ -1319,13 +1319,6 @@ made_compressed_probe:
|
|||
if (acm == NULL)
|
||||
goto alloc_fail;
|
||||
|
||||
minor = acm_alloc_minor(acm);
|
||||
if (minor < 0) {
|
||||
dev_err(&intf->dev, "no more free acm devices\n");
|
||||
kfree(acm);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ctrlsize = usb_endpoint_maxp(epctrl);
|
||||
readsize = usb_endpoint_maxp(epread) *
|
||||
(quirks == SINGLE_RX_URB ? 1 : 2);
|
||||
|
@ -1333,6 +1326,16 @@ made_compressed_probe:
|
|||
acm->writesize = usb_endpoint_maxp(epwrite) * 20;
|
||||
acm->control = control_interface;
|
||||
acm->data = data_interface;
|
||||
|
||||
usb_get_intf(acm->control); /* undone in destruct() */
|
||||
|
||||
minor = acm_alloc_minor(acm);
|
||||
if (minor < 0) {
|
||||
dev_err(&intf->dev, "no more free acm devices\n");
|
||||
kfree(acm);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
acm->minor = minor;
|
||||
acm->dev = usb_dev;
|
||||
acm->ctrl_caps = ac_management_function;
|
||||
|
@ -1474,7 +1477,6 @@ skip_countries:
|
|||
usb_driver_claim_interface(&acm_driver, data_interface, acm);
|
||||
usb_set_intfdata(data_interface, acm);
|
||||
|
||||
usb_get_intf(control_interface);
|
||||
tty_dev = tty_port_register_device(&acm->port, acm_tty_driver, minor,
|
||||
&control_interface->dev);
|
||||
if (IS_ERR(tty_dev)) {
|
||||
|
|
|
@ -191,9 +191,10 @@ int usb_register_dev(struct usb_interface *intf,
|
|||
intf->minor = minor;
|
||||
break;
|
||||
}
|
||||
up_write(&minor_rwsem);
|
||||
if (intf->minor < 0)
|
||||
if (intf->minor < 0) {
|
||||
up_write(&minor_rwsem);
|
||||
return -EXFULL;
|
||||
}
|
||||
|
||||
/* create a usb class device for this usb interface */
|
||||
snprintf(name, sizeof(name), class_driver->name, minor - minor_base);
|
||||
|
@ -206,12 +207,11 @@ int usb_register_dev(struct usb_interface *intf,
|
|||
MKDEV(USB_MAJOR, minor), class_driver,
|
||||
"%s", temp);
|
||||
if (IS_ERR(intf->usb_dev)) {
|
||||
down_write(&minor_rwsem);
|
||||
usb_minors[minor] = NULL;
|
||||
intf->minor = -1;
|
||||
up_write(&minor_rwsem);
|
||||
retval = PTR_ERR(intf->usb_dev);
|
||||
}
|
||||
up_write(&minor_rwsem);
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_register_dev);
|
||||
|
@ -237,12 +237,12 @@ void usb_deregister_dev(struct usb_interface *intf,
|
|||
return;
|
||||
|
||||
dev_dbg(&intf->dev, "removing %d minor\n", intf->minor);
|
||||
device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
|
||||
|
||||
down_write(&minor_rwsem);
|
||||
usb_minors[intf->minor] = NULL;
|
||||
up_write(&minor_rwsem);
|
||||
|
||||
device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
|
||||
intf->usb_dev = NULL;
|
||||
intf->minor = -1;
|
||||
destroy_usb_class();
|
||||
|
|
|
@ -364,9 +364,11 @@ static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
|
|||
req->complete = f_midi_complete;
|
||||
err = usb_ep_queue(midi->out_ep, req, GFP_ATOMIC);
|
||||
if (err) {
|
||||
ERROR(midi, "%s queue req: %d\n",
|
||||
ERROR(midi, "%s: couldn't enqueue request: %d\n",
|
||||
midi->out_ep->name, err);
|
||||
free_ep_req(midi->out_ep, req);
|
||||
if (req->buf != NULL)
|
||||
free_ep_req(midi->out_ep, req);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,9 @@ struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int default_len)
|
|||
/* Frees a usb_request previously allocated by alloc_ep_req() */
|
||||
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req)
|
||||
{
|
||||
WARN_ON(req->buf == NULL);
|
||||
kfree(req->buf);
|
||||
req->buf = NULL;
|
||||
usb_ep_free_request(ep, req);
|
||||
}
|
||||
|
||||
|
|
|
@ -898,19 +898,20 @@ static void iowarrior_disconnect(struct usb_interface *interface)
|
|||
dev = usb_get_intfdata(interface);
|
||||
mutex_lock(&iowarrior_open_disc_lock);
|
||||
usb_set_intfdata(interface, NULL);
|
||||
/* prevent device read, write and ioctl */
|
||||
dev->present = 0;
|
||||
|
||||
minor = dev->minor;
|
||||
mutex_unlock(&iowarrior_open_disc_lock);
|
||||
/* give back our minor - this will call close() locks need to be dropped at this point*/
|
||||
|
||||
/* give back our minor */
|
||||
usb_deregister_dev(interface, &iowarrior_class);
|
||||
|
||||
mutex_lock(&dev->mutex);
|
||||
|
||||
/* prevent device read, write and ioctl */
|
||||
dev->present = 0;
|
||||
|
||||
mutex_unlock(&dev->mutex);
|
||||
mutex_unlock(&iowarrior_open_disc_lock);
|
||||
|
||||
if (dev->opened) {
|
||||
/* There is a process that holds a filedescriptor to the device ,
|
||||
|
|
|
@ -96,7 +96,6 @@ static void yurex_delete(struct kref *kref)
|
|||
|
||||
dev_dbg(&dev->interface->dev, "%s\n", __func__);
|
||||
|
||||
usb_put_dev(dev->udev);
|
||||
if (dev->cntl_urb) {
|
||||
usb_kill_urb(dev->cntl_urb);
|
||||
kfree(dev->cntl_req);
|
||||
|
@ -112,6 +111,7 @@ static void yurex_delete(struct kref *kref)
|
|||
dev->int_buffer, dev->urb->transfer_dma);
|
||||
usb_free_urb(dev->urb);
|
||||
}
|
||||
usb_put_dev(dev->udev);
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -967,6 +967,11 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) },
|
||||
|
||||
/* Motorola devices */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2a70, 0xff, 0xff, 0xff) }, /* mdm6600 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2e0a, 0xff, 0xff, 0xff) }, /* mdm9600 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x4281, 0x0a, 0x00, 0xfc) }, /* mdm ram dl */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x900e, 0xff, 0xff, 0xff) }, /* mdm qc dl */
|
||||
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) },
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) },
|
||||
|
@ -1544,6 +1549,7 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G v2 */
|
||||
.driver_info = RSVD(2) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) }, /* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0x00, 0x00) }, /* ZTE MF871A */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
|
||||
|
@ -1949,11 +1955,15 @@ static const struct usb_device_id option_ids[] = {
|
|||
.driver_info = RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */
|
||||
.driver_info = RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e3d, 0xff), /* D-Link DWM-222 A2 */
|
||||
.driver_info = RSVD(4) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2031, 0xff), /* Olicard 600 */
|
||||
.driver_info = RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2060, 0xff), /* BroadMobi BM818 */
|
||||
.driver_info = RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */
|
||||
{ USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) },
|
||||
{ USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
|
||||
|
|
|
@ -115,13 +115,12 @@ static int pm_ctrl_write(struct pci_dev *dev, int offset, u16 new_value,
|
|||
{
|
||||
int err;
|
||||
u16 old_value;
|
||||
pci_power_t new_state, old_state;
|
||||
pci_power_t new_state;
|
||||
|
||||
err = pci_read_config_word(dev, offset, &old_value);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
old_state = (pci_power_t)(old_value & PCI_PM_CTRL_STATE_MASK);
|
||||
new_state = (pci_power_t)(new_value & PCI_PM_CTRL_STATE_MASK);
|
||||
|
||||
new_value &= PM_OK_BITS;
|
||||
|
|
|
@ -171,7 +171,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon)
|
|||
if (tcon == NULL)
|
||||
return 0;
|
||||
|
||||
if (smb2_command == SMB2_TREE_CONNECT)
|
||||
if (smb2_command == SMB2_TREE_CONNECT || smb2_command == SMB2_IOCTL)
|
||||
return 0;
|
||||
|
||||
if (tcon->tidStatus == CifsExiting) {
|
||||
|
@ -677,7 +677,12 @@ ssetup_ntlmssp_authenticate:
|
|||
else
|
||||
req->SecurityMode = 0;
|
||||
|
||||
#ifdef CONFIG_CIFS_DFS_UPCALL
|
||||
req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
|
||||
#else
|
||||
req->Capabilities = 0;
|
||||
#endif /* DFS_UPCALL */
|
||||
|
||||
req->Channel = 0; /* MBZ */
|
||||
|
||||
iov[0].iov_base = (char *)req;
|
||||
|
|
|
@ -3808,7 +3808,6 @@ static int ocfs2_xattr_bucket_find(struct inode *inode,
|
|||
u16 blk_per_bucket = ocfs2_blocks_per_xattr_bucket(inode->i_sb);
|
||||
int low_bucket = 0, bucket, high_bucket;
|
||||
struct ocfs2_xattr_bucket *search;
|
||||
u32 last_hash;
|
||||
u64 blkno, lower_blkno = 0;
|
||||
|
||||
search = ocfs2_xattr_bucket_new(inode);
|
||||
|
@ -3852,8 +3851,6 @@ static int ocfs2_xattr_bucket_find(struct inode *inode,
|
|||
if (xh->xh_count)
|
||||
xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1];
|
||||
|
||||
last_hash = le32_to_cpu(xe->xe_name_hash);
|
||||
|
||||
/* record lower_blkno which may be the insert place. */
|
||||
lower_blkno = blkno;
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ extern void warn_slowpath_null(const char *file, const int line);
|
|||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_BUG_ON
|
||||
#define BUG_ON(condition) do { if (condition) ; } while (0)
|
||||
#define BUG_ON(condition) do { if (condition) BUG(); } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_WARN_ON
|
||||
|
|
|
@ -6,24 +6,6 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/log2.h>
|
||||
|
||||
/*
|
||||
* Runtime evaluation of get_order()
|
||||
*/
|
||||
static inline __attribute_const__
|
||||
int __get_order(unsigned long size)
|
||||
{
|
||||
int order;
|
||||
|
||||
size--;
|
||||
size >>= PAGE_SHIFT;
|
||||
#if BITS_PER_LONG == 32
|
||||
order = fls(size);
|
||||
#else
|
||||
order = fls64(size);
|
||||
#endif
|
||||
return order;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_order - Determine the allocation order of a memory size
|
||||
* @size: The size for which to get the order
|
||||
|
@ -42,19 +24,27 @@ int __get_order(unsigned long size)
|
|||
* to hold an object of the specified size.
|
||||
*
|
||||
* The result is undefined if the size is 0.
|
||||
*
|
||||
* This function may be used to initialise variables with compile time
|
||||
* evaluations of constants.
|
||||
*/
|
||||
#define get_order(n) \
|
||||
( \
|
||||
__builtin_constant_p(n) ? ( \
|
||||
((n) == 0UL) ? BITS_PER_LONG - PAGE_SHIFT : \
|
||||
(((n) < (1UL << PAGE_SHIFT)) ? 0 : \
|
||||
ilog2((n) - 1) - PAGE_SHIFT + 1) \
|
||||
) : \
|
||||
__get_order(n) \
|
||||
)
|
||||
static inline __attribute_const__ int get_order(unsigned long size)
|
||||
{
|
||||
if (__builtin_constant_p(size)) {
|
||||
if (!size)
|
||||
return BITS_PER_LONG - PAGE_SHIFT;
|
||||
|
||||
if (size < (1UL << PAGE_SHIFT))
|
||||
return 0;
|
||||
|
||||
return ilog2((size) - 1) - PAGE_SHIFT + 1;
|
||||
}
|
||||
|
||||
size--;
|
||||
size >>= PAGE_SHIFT;
|
||||
#if BITS_PER_LONG == 32
|
||||
return fls(size);
|
||||
#else
|
||||
return fls64(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
|
|
@ -52,6 +52,22 @@ extern void __chk_io_ptr(const volatile void __iomem *);
|
|||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* Minimal backport of compiler_attributes.h to add support for __copy
|
||||
* to v4.9.y so that we can use it in init/exit_module to avoid
|
||||
* -Werror=missing-attributes errors on GCC 9.
|
||||
*/
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) __GCC4_has_attribute_##x
|
||||
# define __GCC4_has_attribute___copy__ 0
|
||||
#endif
|
||||
|
||||
#if __has_attribute(__copy__)
|
||||
# define __copy(symbol) __attribute__((__copy__(symbol)))
|
||||
#else
|
||||
# define __copy(symbol)
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <linux/compiler-gcc.h>
|
||||
#endif
|
||||
|
|
|
@ -127,13 +127,13 @@ extern void cleanup_module(void);
|
|||
#define module_init(initfn) \
|
||||
static inline initcall_t __maybe_unused __inittest(void) \
|
||||
{ return initfn; } \
|
||||
int init_module(void) __attribute__((alias(#initfn)));
|
||||
int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
|
||||
|
||||
/* This is only required if you want to be unloadable. */
|
||||
#define module_exit(exitfn) \
|
||||
static inline exitcall_t __maybe_unused __exittest(void) \
|
||||
{ return exitfn; } \
|
||||
void cleanup_module(void) __attribute__((alias(#exitfn)));
|
||||
void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -236,6 +236,7 @@ struct fcoe_fcf {
|
|||
* @vn_mac: VN_Node assigned MAC address for data
|
||||
*/
|
||||
struct fcoe_rport {
|
||||
struct fc_rport_priv rdata;
|
||||
unsigned long time;
|
||||
u16 fcoe_len;
|
||||
u16 flags;
|
||||
|
|
|
@ -178,10 +178,7 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)
|
|||
if (snd_BUG_ON(!stream))
|
||||
return;
|
||||
|
||||
if (stream->direction == SND_COMPRESS_PLAYBACK)
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
else
|
||||
stream->runtime->state = SNDRV_PCM_STATE_PREPARED;
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
|
||||
wake_up(&stream->runtime->sleep);
|
||||
}
|
||||
|
|
|
@ -8765,7 +8765,7 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
|
|||
goto err_free;
|
||||
}
|
||||
|
||||
perf_install_in_context(ctx, event, cpu);
|
||||
perf_install_in_context(ctx, event, event->cpu);
|
||||
perf_unpin_context(ctx);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
|
||||
|
|
|
@ -988,28 +988,47 @@ void mem_cgroup_iter_break(struct mem_cgroup *root,
|
|||
css_put(&prev->css);
|
||||
}
|
||||
|
||||
static void invalidate_reclaim_iterators(struct mem_cgroup *dead_memcg)
|
||||
static void __invalidate_reclaim_iterators(struct mem_cgroup *from,
|
||||
struct mem_cgroup *dead_memcg)
|
||||
{
|
||||
struct mem_cgroup *memcg = dead_memcg;
|
||||
struct mem_cgroup_reclaim_iter *iter;
|
||||
struct mem_cgroup_per_zone *mz;
|
||||
int nid, zid;
|
||||
int i;
|
||||
|
||||
for (; memcg; memcg = parent_mem_cgroup(memcg)) {
|
||||
for_each_node(nid) {
|
||||
for (zid = 0; zid < MAX_NR_ZONES; zid++) {
|
||||
mz = &memcg->nodeinfo[nid]->zoneinfo[zid];
|
||||
for (i = 0; i <= DEF_PRIORITY; i++) {
|
||||
iter = &mz->iter[i];
|
||||
cmpxchg(&iter->position,
|
||||
dead_memcg, NULL);
|
||||
}
|
||||
for_each_node(nid) {
|
||||
for (zid = 0; zid < MAX_NR_ZONES; zid++) {
|
||||
mz = &from->nodeinfo[nid]->zoneinfo[zid];
|
||||
for (i = 0; i <= DEF_PRIORITY; i++) {
|
||||
iter = &mz->iter[i];
|
||||
cmpxchg(&iter->position,
|
||||
dead_memcg, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void invalidate_reclaim_iterators(struct mem_cgroup *dead_memcg)
|
||||
{
|
||||
struct mem_cgroup *memcg = dead_memcg;
|
||||
struct mem_cgroup *last;
|
||||
|
||||
do {
|
||||
__invalidate_reclaim_iterators(memcg, dead_memcg);
|
||||
last = memcg;
|
||||
} while ((memcg = parent_mem_cgroup(memcg)));
|
||||
|
||||
/*
|
||||
* When cgruop1 non-hierarchy mode is used,
|
||||
* parent_mem_cgroup() does not walk all the way up to the
|
||||
* cgroup root (root_mem_cgroup). So we have to handle
|
||||
* dead_memcg from cgroup root separately.
|
||||
*/
|
||||
if (last != root_mem_cgroup)
|
||||
__invalidate_reclaim_iterators(root_mem_cgroup,
|
||||
dead_memcg);
|
||||
}
|
||||
|
||||
/*
|
||||
* Iteration constructs for visiting all cgroups (under a tree). If
|
||||
* loops are exited prematurely (break), mem_cgroup_iter_break() must
|
||||
|
|
|
@ -1677,6 +1677,12 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
|
|||
if (!addr)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* First make sure the mappings are removed from all page-tables
|
||||
* before they are freed.
|
||||
*/
|
||||
vmalloc_sync_all();
|
||||
|
||||
/*
|
||||
* In this function, newly allocated vm_struct has VM_UNINITIALIZED
|
||||
* flag. It means that vm_struct is not fully initialized.
|
||||
|
@ -2214,6 +2220,9 @@ EXPORT_SYMBOL(remap_vmalloc_range);
|
|||
/*
|
||||
* Implement a stub for vmalloc_sync_all() if the architecture chose not to
|
||||
* have one.
|
||||
*
|
||||
* The purpose of this function is to make sure the vmalloc area
|
||||
* mappings are identical in all page-tables in the system.
|
||||
*/
|
||||
void __weak vmalloc_sync_all(void)
|
||||
{
|
||||
|
|
|
@ -169,11 +169,16 @@ int drv_conf_tx(struct ieee80211_local *local,
|
|||
if (!check_sdata_in_driver(sdata))
|
||||
return -EIO;
|
||||
|
||||
if (WARN_ONCE(params->cw_min == 0 ||
|
||||
params->cw_min > params->cw_max,
|
||||
"%s: invalid CW_min/CW_max: %d/%d\n",
|
||||
sdata->name, params->cw_min, params->cw_max))
|
||||
if (params->cw_min == 0 || params->cw_min > params->cw_max) {
|
||||
/*
|
||||
* If we can't configure hardware anyway, don't warn. We may
|
||||
* never have initialized the CW parameters.
|
||||
*/
|
||||
WARN_ONCE(local->ops->conf_tx,
|
||||
"%s: invalid CW_min/CW_max: %d/%d\n",
|
||||
sdata->name, params->cw_min, params->cw_max);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
trace_drv_conf_tx(local, sdata, ac, params);
|
||||
if (local->ops->conf_tx)
|
||||
|
|
|
@ -1892,6 +1892,16 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
|
|||
}
|
||||
}
|
||||
|
||||
/* WMM specification requires all 4 ACIs. */
|
||||
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
|
||||
if (params[ac].cw_min == 0) {
|
||||
sdata_info(sdata,
|
||||
"AP has invalid WMM params (missing AC %d), using defaults\n",
|
||||
ac);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
|
||||
mlme_dbg(sdata,
|
||||
"WMM AC=%d acm=%d aifs=%d cWmin=%d cWmax=%d txop=%d uapsd=%d, downgraded=%d\n",
|
||||
|
|
|
@ -495,7 +495,7 @@ static int nfnetlink_bind(struct net *net, int group)
|
|||
ss = nfnetlink_get_subsys(type << 8);
|
||||
rcu_read_unlock();
|
||||
if (!ss)
|
||||
request_module("nfnetlink-subsys-%d", type);
|
||||
request_module_nowait("nfnetlink-subsys-%d", type);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2498,6 +2498,13 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg)
|
|||
|
||||
mutex_lock(&po->pg_vec_lock);
|
||||
|
||||
/* packet_sendmsg() check on tx_ring.pg_vec was lockless,
|
||||
* we need to confirm it under protection of pg_vec_lock.
|
||||
*/
|
||||
if (unlikely(!po->tx_ring.pg_vec)) {
|
||||
err = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
if (likely(saddr == NULL)) {
|
||||
dev = packet_cached_dev_get(po);
|
||||
proto = po->num;
|
||||
|
|
|
@ -504,7 +504,7 @@ static void sctp_do_8_2_transport_strike(sctp_cmd_seq_t *commands,
|
|||
* see SCTP Quick Failover Draft, section 5.1
|
||||
*/
|
||||
if ((transport->state == SCTP_ACTIVE) &&
|
||||
(asoc->pf_retrans < transport->pathmaxrxt) &&
|
||||
(transport->error_count < transport->pathmaxrxt) &&
|
||||
(transport->error_count > asoc->pf_retrans)) {
|
||||
|
||||
sctp_assoc_control_transport(asoc, transport,
|
||||
|
|
|
@ -74,7 +74,7 @@ modpost = scripts/mod/modpost \
|
|||
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
|
||||
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
|
||||
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
|
||||
$(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
|
||||
$(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \
|
||||
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
|
||||
$(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
|
||||
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
|
||||
|
|
|
@ -551,10 +551,7 @@ snd_compr_set_params(struct snd_compr_stream *stream, unsigned long arg)
|
|||
stream->metadata_set = false;
|
||||
stream->next_track = false;
|
||||
|
||||
if (stream->direction == SND_COMPRESS_PLAYBACK)
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
else
|
||||
stream->runtime->state = SNDRV_PCM_STATE_PREPARED;
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
} else {
|
||||
return -EPERM;
|
||||
}
|
||||
|
@ -670,8 +667,17 @@ static int snd_compr_start(struct snd_compr_stream *stream)
|
|||
{
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->state != SNDRV_PCM_STATE_PREPARED)
|
||||
switch (stream->runtime->state) {
|
||||
case SNDRV_PCM_STATE_SETUP:
|
||||
if (stream->direction != SND_COMPRESS_CAPTURE)
|
||||
return -EPERM;
|
||||
break;
|
||||
case SNDRV_PCM_STATE_PREPARED:
|
||||
break;
|
||||
default:
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_START);
|
||||
if (!retval)
|
||||
stream->runtime->state = SNDRV_PCM_STATE_RUNNING;
|
||||
|
@ -682,9 +688,15 @@ static int snd_compr_stop(struct snd_compr_stream *stream)
|
|||
{
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->state == SNDRV_PCM_STATE_PREPARED ||
|
||||
stream->runtime->state == SNDRV_PCM_STATE_SETUP)
|
||||
switch (stream->runtime->state) {
|
||||
case SNDRV_PCM_STATE_OPEN:
|
||||
case SNDRV_PCM_STATE_SETUP:
|
||||
case SNDRV_PCM_STATE_PREPARED:
|
||||
return -EPERM;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_STOP);
|
||||
if (!retval) {
|
||||
snd_compr_drain_notify(stream);
|
||||
|
@ -733,9 +745,17 @@ static int snd_compr_drain(struct snd_compr_stream *stream)
|
|||
{
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->state == SNDRV_PCM_STATE_PREPARED ||
|
||||
stream->runtime->state == SNDRV_PCM_STATE_SETUP)
|
||||
switch (stream->runtime->state) {
|
||||
case SNDRV_PCM_STATE_OPEN:
|
||||
case SNDRV_PCM_STATE_SETUP:
|
||||
case SNDRV_PCM_STATE_PREPARED:
|
||||
case SNDRV_PCM_STATE_PAUSED:
|
||||
return -EPERM;
|
||||
case SNDRV_PCM_STATE_XRUN:
|
||||
return -EPIPE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_DRAIN);
|
||||
if (retval) {
|
||||
|
@ -772,9 +792,19 @@ static int snd_compr_next_track(struct snd_compr_stream *stream)
|
|||
static int snd_compr_partial_drain(struct snd_compr_stream *stream)
|
||||
{
|
||||
int retval;
|
||||
if (stream->runtime->state == SNDRV_PCM_STATE_PREPARED ||
|
||||
stream->runtime->state == SNDRV_PCM_STATE_SETUP)
|
||||
|
||||
switch (stream->runtime->state) {
|
||||
case SNDRV_PCM_STATE_OPEN:
|
||||
case SNDRV_PCM_STATE_SETUP:
|
||||
case SNDRV_PCM_STATE_PREPARED:
|
||||
case SNDRV_PCM_STATE_PAUSED:
|
||||
return -EPERM;
|
||||
case SNDRV_PCM_STATE_XRUN:
|
||||
return -EPIPE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* stream can be drained only when next track has been signalled */
|
||||
if (stream->next_track == false)
|
||||
return -EPERM;
|
||||
|
|
|
@ -37,7 +37,7 @@ int iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit,
|
|||
packets_per_page = PAGE_SIZE / packet_size;
|
||||
if (WARN_ON(!packets_per_page)) {
|
||||
err = -EINVAL;
|
||||
goto error;
|
||||
goto err_packets;
|
||||
}
|
||||
pages = DIV_ROUND_UP(count, packets_per_page);
|
||||
|
||||
|
|
|
@ -5917,7 +5917,7 @@ static int snd_hda_parse_generic_codec(struct hda_codec *codec)
|
|||
|
||||
err = snd_hda_parse_pin_defcfg(codec, &spec->autocfg, NULL, 0);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
err = snd_hda_gen_parse_auto_config(codec, &spec->autocfg);
|
||||
if (err < 0)
|
||||
|
|
|
@ -287,7 +287,8 @@ retry:
|
|||
goto retry;
|
||||
}
|
||||
spin_unlock(&sound_loader_lock);
|
||||
return -EBUSY;
|
||||
r = -EBUSY;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -613,6 +613,16 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
|
|||
|
||||
ret = perf_add_probe_events(params.events, params.nevents);
|
||||
if (ret < 0) {
|
||||
|
||||
/*
|
||||
* When perf_add_probe_events() fails it calls
|
||||
* cleanup_perf_probe_events(pevs, npevs), i.e.
|
||||
* cleanup_perf_probe_events(params.events, params.nevents), which
|
||||
* will call clear_perf_probe_event(), so set nevents to zero
|
||||
* to avoid cleanup_params() to call clear_perf_probe_event() again
|
||||
* on the same pevs.
|
||||
*/
|
||||
params.nevents = 0;
|
||||
pr_err_with_code(" Error: Failed to add events.", ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -2591,6 +2591,13 @@ int perf_session__read_header(struct perf_session *session)
|
|||
file->path);
|
||||
}
|
||||
|
||||
if (f_header.attr_size == 0) {
|
||||
pr_err("ERROR: The %s file's attr size field is 0 which is unexpected.\n"
|
||||
"Was the 'perf record' command properly terminated?\n",
|
||||
file->path);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
nr_attrs = f_header.attrs.size / f_header.attr_size;
|
||||
lseek(fd, f_header.attrs.offset, SEEK_SET);
|
||||
|
||||
|
@ -2673,7 +2680,7 @@ int perf_event__synthesize_attr(struct perf_tool *tool,
|
|||
size += sizeof(struct perf_event_header);
|
||||
size += ids * sizeof(u64);
|
||||
|
||||
ev = malloc(size);
|
||||
ev = zalloc(size);
|
||||
|
||||
if (ev == NULL)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -110,14 +110,24 @@ struct comm *thread__comm(const struct thread *thread)
|
|||
|
||||
struct comm *thread__exec_comm(const struct thread *thread)
|
||||
{
|
||||
struct comm *comm, *last = NULL;
|
||||
struct comm *comm, *last = NULL, *second_last = NULL;
|
||||
|
||||
list_for_each_entry(comm, &thread->comm_list, list) {
|
||||
if (comm->exec)
|
||||
return comm;
|
||||
second_last = last;
|
||||
last = comm;
|
||||
}
|
||||
|
||||
/*
|
||||
* 'last' with no start time might be the parent's comm of a synthesized
|
||||
* thread (created by processing a synthesized fork event). For a main
|
||||
* thread, that is very probably wrong. Prefer a later comm to avoid
|
||||
* that case.
|
||||
*/
|
||||
if (second_last && !last->start && thread->pid_ == thread->tid)
|
||||
return second_last;
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue