This is the 4.9.126 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAluVX/YACgkQONu9yGCS aT5cHhAApha2JGf7uUZP9pVDBIWh/9il4jkA6w2Fs8pj5RFwTCDtxBe9iNMOloLV j9mPd2ToEPI4H6Je5clOiLQxkM/tZ2/MQVITLpCM+9lahWB5pOxqC9buAlEYzN0v NQ9ppUJIakeAJwJJqFxtqhb4tL+hng9BifL57+PPFykFb2xLEcmj8zMXZL5TvaCh MF+bckiRZgZ8HgoQ2HUC3Jl5x/4QqUjhNBEzCNJ2iC8+h94lE7LoBMiRoC+QF1th 5c3Uqg+vNS/s6FOYlFGEeL2/VvzPYboIqWUFTNb39lws+hGaQ/9Ba5soFpPMuHz4 wLS+fFWuUSWi3XO1Id1imHWFaVAnbAro5vFJ/qvM6j2m3feryI6NCWEyQsEJpoLH SRt+Lv4lllNgm1I9ieVfEldqyVfHsW6rtp0cV9uRBCgdVMOnOktO0ra1sN25IIA4 97JgOKmrFD/OAOzr5Yz0b3WKseZw+gD4iJwVAFClX9F2n0dWbPHqPPitmxu6iafu Z1+Pw7V2HmAT2KkaLeSFSOFBa28zbXLzkzdKSabqDr5rPS7tbz4M+Gne7D803K// sLbRfAm4YM/OirroGVDcFpugGtu4xDmqvkVVpXvjc83CNrqKkX60Jc3kJY9gweiv v2s+gfTrK0s+tiUcIyKjtBqlBa9jHPfbzkorq3g0ia9ioO8fSWI= =22ds -----END PGP SIGNATURE----- Merge 4.9.126 into android-4.9 Changes in 4.9.126 net: 6lowpan: fix reserved space for single frames net: mac802154: tx: expand tailroom if necessary 9p/net: Fix zero-copy path in the 9p virtio transport spi: davinci: fix a NULL pointer dereference spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe drm/i915/userptr: reject zero user_size libertas: fix suspend and resume for SDIO connected cards mailbox: xgene-slimpro: Fix potential NULL pointer dereference powerpc/fadump: handle crash memory ranges array index overflow powerpc/pseries: Fix endianness while restoring of r3 in MCE handler. PCI: Add wrappers for dev_printk() powerpc/powernv/pci: Work around races in PCI bridge enabling cxl: Fix wrong comparison in cxl_adapter_context_get() ib_srpt: Fix a use-after-free in srpt_close_ch() RDMA/rxe: Set wqe->status correctly if an unexpected response is received fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed 9p/virtio: fix off-by-one error in sg list bounds check net/9p/client.c: version pointer uninitialized net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree() dm thin: stop no_space_timeout worker when switching to write-mode dm cache metadata: save in-core policy_hint_size to on-disk superblock uart: fix race between uart_put_char() and uart_shutdown() iio: ad9523: Fix displayed phase iio: ad9523: Fix return value for ad952x_store() vmw_balloon: fix inflation of 64-bit GFNs vmw_balloon: do not use 2MB without batching vmw_balloon: VMCI_DOORBELL_SET does not check status vmw_balloon: fix VMCI use when balloon built into kernel rtc: omap: fix potential crash on power off tracing: Do not call start/stop() functions when tracing_on does not change tracing/blktrace: Fix to allow setting same value uprobes: Use synchronize_rcu() not synchronize_sched() mfd: hi655x: Fix regmap area declared size for hi655x 9p: fix multiple NULL-pointer-dereferences PM / sleep: wakeup: Fix build error caused by missing SRCU support KVM: VMX: fixes for vmentry_l1d_flush module parameter xtensa: limit offsets in __loop_cache_{all,page} xtensa: increase ranges in ___invalidate_{i,d}cache_all pnfs/blocklayout: off by one in bl_map_stripe() NFSv4 client live hangs after live data migration recovery ARM: tegra: Fix Tegra30 Cardhu PCA954x reset Replace magic for trusting the secondary keyring with #define Fix kexec forbidding kernels signed with keys in the secondary keyring to boot mm/tlb: Remove tlb_remove_table() non-concurrent condition iommu/vt-d: Add definitions for PFSID iommu/vt-d: Fix dev iotlb pfsid use osf_getdomainname(): use copy_to_user() sys: don't hold uts_sem while accessing userspace memory userns: move user access out of the mutex ubifs: Fix memory leak in lprobs self-check Revert "UBIFS: Fix potential integer overflow in allocation" ubifs: Check data node size before truncate ubifs: Fix synced_i_size calculation for xattr inodes pwm: tiehrpwm: Fix disabling of output of PWMs fb: fix lost console when the user unplugs a USB adapter udlfb: set optimal write delay getxattr: use correct xattr length libnvdimm: fix ars_status output length calculation printk/tracing: Do not trace printk_nmi_enter() bcache: release dc->writeback_lock properly in bch_writeback_thread() perf auxtrace: Fix queue resize crypto: vmx - Fix sleep-in-atomic bugs crypto: caam/jr - fix descriptor DMA unmapping fs/quota: Fix spectre gadget in do_quotactl Linux 4.9.126 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
a8c1ea6c63
68 changed files with 669 additions and 343 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 9
|
PATCHLEVEL = 9
|
||||||
SUBLEVEL = 125
|
SUBLEVEL = 126
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Roaring Lionus
|
NAME = Roaring Lionus
|
||||||
|
|
||||||
|
|
|
@ -526,24 +526,19 @@ SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, const char __user *, path,
|
||||||
SYSCALL_DEFINE1(osf_utsname, char __user *, name)
|
SYSCALL_DEFINE1(osf_utsname, char __user *, name)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
char tmp[5 * 32];
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
error = -EFAULT;
|
memcpy(tmp + 0 * 32, utsname()->sysname, 32);
|
||||||
if (copy_to_user(name + 0, utsname()->sysname, 32))
|
memcpy(tmp + 1 * 32, utsname()->nodename, 32);
|
||||||
goto out;
|
memcpy(tmp + 2 * 32, utsname()->release, 32);
|
||||||
if (copy_to_user(name + 32, utsname()->nodename, 32))
|
memcpy(tmp + 3 * 32, utsname()->version, 32);
|
||||||
goto out;
|
memcpy(tmp + 4 * 32, utsname()->machine, 32);
|
||||||
if (copy_to_user(name + 64, utsname()->release, 32))
|
up_read(&uts_sem);
|
||||||
goto out;
|
|
||||||
if (copy_to_user(name + 96, utsname()->version, 32))
|
|
||||||
goto out;
|
|
||||||
if (copy_to_user(name + 128, utsname()->machine, 32))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
error = 0;
|
if (copy_to_user(name, tmp, sizeof(tmp)))
|
||||||
out:
|
return -EFAULT;
|
||||||
up_read(&uts_sem);
|
return 0;
|
||||||
return error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCALL_DEFINE0(getpagesize)
|
SYSCALL_DEFINE0(getpagesize)
|
||||||
|
@ -561,24 +556,22 @@ SYSCALL_DEFINE0(getdtablesize)
|
||||||
*/
|
*/
|
||||||
SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
|
SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
|
||||||
{
|
{
|
||||||
unsigned len;
|
int len, err = 0;
|
||||||
int i;
|
char *kname;
|
||||||
|
char tmp[32];
|
||||||
|
|
||||||
if (!access_ok(VERIFY_WRITE, name, namelen))
|
if (namelen < 0 || namelen > 32)
|
||||||
return -EFAULT;
|
namelen = 32;
|
||||||
|
|
||||||
len = namelen;
|
|
||||||
if (len > 32)
|
|
||||||
len = 32;
|
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
for (i = 0; i < len; ++i) {
|
kname = utsname()->domainname;
|
||||||
__put_user(utsname()->domainname[i], name + i);
|
len = strnlen(kname, namelen);
|
||||||
if (utsname()->domainname[i] == '\0')
|
len = min(len + 1, namelen);
|
||||||
break;
|
memcpy(tmp, kname, len);
|
||||||
}
|
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
|
|
||||||
|
if (copy_to_user(name, tmp, len))
|
||||||
|
return -EFAULT;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,13 +734,14 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
|
||||||
};
|
};
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
const char *res;
|
const char *res;
|
||||||
long len, err = -EINVAL;
|
long len;
|
||||||
|
char tmp[__NEW_UTS_LEN + 1];
|
||||||
|
|
||||||
offset = command-1;
|
offset = command-1;
|
||||||
if (offset >= ARRAY_SIZE(sysinfo_table)) {
|
if (offset >= ARRAY_SIZE(sysinfo_table)) {
|
||||||
/* Digital UNIX has a few unpublished interfaces here */
|
/* Digital UNIX has a few unpublished interfaces here */
|
||||||
printk("sysinfo(%d)", command);
|
printk("sysinfo(%d)", command);
|
||||||
goto out;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
|
@ -755,13 +749,11 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
|
||||||
len = strlen(res)+1;
|
len = strlen(res)+1;
|
||||||
if ((unsigned long)len > (unsigned long)count)
|
if ((unsigned long)len > (unsigned long)count)
|
||||||
len = count;
|
len = count;
|
||||||
if (copy_to_user(buf, res, len))
|
memcpy(tmp, res, len);
|
||||||
err = -EFAULT;
|
|
||||||
else
|
|
||||||
err = 0;
|
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
out:
|
if (copy_to_user(buf, tmp, len))
|
||||||
return err;
|
return -EFAULT;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer,
|
SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer,
|
||||||
|
|
|
@ -205,6 +205,7 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <0x70>;
|
reg = <0x70>;
|
||||||
|
reset-gpio = <&gpio TEGRA_GPIO(BB, 0) GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -190,9 +190,6 @@ struct fadump_crash_info_header {
|
||||||
struct cpumask online_mask;
|
struct cpumask online_mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Crash memory ranges */
|
|
||||||
#define INIT_CRASHMEM_RANGES (INIT_MEMBLOCK_REGIONS + 2)
|
|
||||||
|
|
||||||
struct fad_crash_memory_ranges {
|
struct fad_crash_memory_ranges {
|
||||||
unsigned long long base;
|
unsigned long long base;
|
||||||
unsigned long long size;
|
unsigned long long size;
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include <linux/crash_dump.h>
|
#include <linux/crash_dump.h>
|
||||||
#include <linux/kobject.h>
|
#include <linux/kobject.h>
|
||||||
#include <linux/sysfs.h>
|
#include <linux/sysfs.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/prom.h>
|
#include <asm/prom.h>
|
||||||
|
@ -48,8 +49,10 @@ static struct fadump_mem_struct fdm;
|
||||||
static const struct fadump_mem_struct *fdm_active;
|
static const struct fadump_mem_struct *fdm_active;
|
||||||
|
|
||||||
static DEFINE_MUTEX(fadump_mutex);
|
static DEFINE_MUTEX(fadump_mutex);
|
||||||
struct fad_crash_memory_ranges crash_memory_ranges[INIT_CRASHMEM_RANGES];
|
struct fad_crash_memory_ranges *crash_memory_ranges;
|
||||||
|
int crash_memory_ranges_size;
|
||||||
int crash_mem_ranges;
|
int crash_mem_ranges;
|
||||||
|
int max_crash_mem_ranges;
|
||||||
|
|
||||||
/* Scan the Firmware Assisted dump configuration details. */
|
/* Scan the Firmware Assisted dump configuration details. */
|
||||||
int __init early_init_dt_scan_fw_dump(unsigned long node,
|
int __init early_init_dt_scan_fw_dump(unsigned long node,
|
||||||
|
@ -731,38 +734,88 @@ static int __init process_fadump(const struct fadump_mem_struct *fdm_active)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void fadump_add_crash_memory(unsigned long long base,
|
static void free_crash_memory_ranges(void)
|
||||||
unsigned long long end)
|
{
|
||||||
|
kfree(crash_memory_ranges);
|
||||||
|
crash_memory_ranges = NULL;
|
||||||
|
crash_memory_ranges_size = 0;
|
||||||
|
max_crash_mem_ranges = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allocate or reallocate crash memory ranges array in incremental units
|
||||||
|
* of PAGE_SIZE.
|
||||||
|
*/
|
||||||
|
static int allocate_crash_memory_ranges(void)
|
||||||
|
{
|
||||||
|
struct fad_crash_memory_ranges *new_array;
|
||||||
|
u64 new_size;
|
||||||
|
|
||||||
|
new_size = crash_memory_ranges_size + PAGE_SIZE;
|
||||||
|
pr_debug("Allocating %llu bytes of memory for crash memory ranges\n",
|
||||||
|
new_size);
|
||||||
|
|
||||||
|
new_array = krealloc(crash_memory_ranges, new_size, GFP_KERNEL);
|
||||||
|
if (new_array == NULL) {
|
||||||
|
pr_err("Insufficient memory for setting up crash memory ranges\n");
|
||||||
|
free_crash_memory_ranges();
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
crash_memory_ranges = new_array;
|
||||||
|
crash_memory_ranges_size = new_size;
|
||||||
|
max_crash_mem_ranges = (new_size /
|
||||||
|
sizeof(struct fad_crash_memory_ranges));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int fadump_add_crash_memory(unsigned long long base,
|
||||||
|
unsigned long long end)
|
||||||
{
|
{
|
||||||
if (base == end)
|
if (base == end)
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
|
if (crash_mem_ranges == max_crash_mem_ranges) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = allocate_crash_memory_ranges();
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
pr_debug("crash_memory_range[%d] [%#016llx-%#016llx], %#llx bytes\n",
|
pr_debug("crash_memory_range[%d] [%#016llx-%#016llx], %#llx bytes\n",
|
||||||
crash_mem_ranges, base, end - 1, (end - base));
|
crash_mem_ranges, base, end - 1, (end - base));
|
||||||
crash_memory_ranges[crash_mem_ranges].base = base;
|
crash_memory_ranges[crash_mem_ranges].base = base;
|
||||||
crash_memory_ranges[crash_mem_ranges].size = end - base;
|
crash_memory_ranges[crash_mem_ranges].size = end - base;
|
||||||
crash_mem_ranges++;
|
crash_mem_ranges++;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fadump_exclude_reserved_area(unsigned long long start,
|
static int fadump_exclude_reserved_area(unsigned long long start,
|
||||||
unsigned long long end)
|
unsigned long long end)
|
||||||
{
|
{
|
||||||
unsigned long long ra_start, ra_end;
|
unsigned long long ra_start, ra_end;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
ra_start = fw_dump.reserve_dump_area_start;
|
ra_start = fw_dump.reserve_dump_area_start;
|
||||||
ra_end = ra_start + fw_dump.reserve_dump_area_size;
|
ra_end = ra_start + fw_dump.reserve_dump_area_size;
|
||||||
|
|
||||||
if ((ra_start < end) && (ra_end > start)) {
|
if ((ra_start < end) && (ra_end > start)) {
|
||||||
if ((start < ra_start) && (end > ra_end)) {
|
if ((start < ra_start) && (end > ra_end)) {
|
||||||
fadump_add_crash_memory(start, ra_start);
|
ret = fadump_add_crash_memory(start, ra_start);
|
||||||
fadump_add_crash_memory(ra_end, end);
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = fadump_add_crash_memory(ra_end, end);
|
||||||
} else if (start < ra_start) {
|
} else if (start < ra_start) {
|
||||||
fadump_add_crash_memory(start, ra_start);
|
ret = fadump_add_crash_memory(start, ra_start);
|
||||||
} else if (ra_end < end) {
|
} else if (ra_end < end) {
|
||||||
fadump_add_crash_memory(ra_end, end);
|
ret = fadump_add_crash_memory(ra_end, end);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
fadump_add_crash_memory(start, end);
|
ret = fadump_add_crash_memory(start, end);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fadump_init_elfcore_header(char *bufp)
|
static int fadump_init_elfcore_header(char *bufp)
|
||||||
|
@ -802,10 +855,11 @@ static int fadump_init_elfcore_header(char *bufp)
|
||||||
* Traverse through memblock structure and setup crash memory ranges. These
|
* Traverse through memblock structure and setup crash memory ranges. These
|
||||||
* ranges will be used create PT_LOAD program headers in elfcore header.
|
* ranges will be used create PT_LOAD program headers in elfcore header.
|
||||||
*/
|
*/
|
||||||
static void fadump_setup_crash_memory_ranges(void)
|
static int fadump_setup_crash_memory_ranges(void)
|
||||||
{
|
{
|
||||||
struct memblock_region *reg;
|
struct memblock_region *reg;
|
||||||
unsigned long long start, end;
|
unsigned long long start, end;
|
||||||
|
int ret;
|
||||||
|
|
||||||
pr_debug("Setup crash memory ranges.\n");
|
pr_debug("Setup crash memory ranges.\n");
|
||||||
crash_mem_ranges = 0;
|
crash_mem_ranges = 0;
|
||||||
|
@ -816,7 +870,9 @@ static void fadump_setup_crash_memory_ranges(void)
|
||||||
* specified during fadump registration. We need to create a separate
|
* specified during fadump registration. We need to create a separate
|
||||||
* program header for this chunk with the correct offset.
|
* program header for this chunk with the correct offset.
|
||||||
*/
|
*/
|
||||||
fadump_add_crash_memory(RMA_START, fw_dump.boot_memory_size);
|
ret = fadump_add_crash_memory(RMA_START, fw_dump.boot_memory_size);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
for_each_memblock(memory, reg) {
|
for_each_memblock(memory, reg) {
|
||||||
start = (unsigned long long)reg->base;
|
start = (unsigned long long)reg->base;
|
||||||
|
@ -825,8 +881,12 @@ static void fadump_setup_crash_memory_ranges(void)
|
||||||
start = fw_dump.boot_memory_size;
|
start = fw_dump.boot_memory_size;
|
||||||
|
|
||||||
/* add this range excluding the reserved dump area. */
|
/* add this range excluding the reserved dump area. */
|
||||||
fadump_exclude_reserved_area(start, end);
|
ret = fadump_exclude_reserved_area(start, end);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -950,6 +1010,7 @@ static void register_fadump(void)
|
||||||
{
|
{
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
void *vaddr;
|
void *vaddr;
|
||||||
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If no memory is reserved then we can not register for firmware-
|
* If no memory is reserved then we can not register for firmware-
|
||||||
|
@ -958,7 +1019,9 @@ static void register_fadump(void)
|
||||||
if (!fw_dump.reserve_dump_area_size)
|
if (!fw_dump.reserve_dump_area_size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fadump_setup_crash_memory_ranges();
|
ret = fadump_setup_crash_memory_ranges();
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
addr = be64_to_cpu(fdm.rmr_region.destination_address) + be64_to_cpu(fdm.rmr_region.source_len);
|
addr = be64_to_cpu(fdm.rmr_region.destination_address) + be64_to_cpu(fdm.rmr_region.source_len);
|
||||||
/* Initialize fadump crash info header. */
|
/* Initialize fadump crash info header. */
|
||||||
|
@ -1036,6 +1099,7 @@ void fadump_cleanup(void)
|
||||||
} else if (fw_dump.dump_registered) {
|
} else if (fw_dump.dump_registered) {
|
||||||
/* Un-register Firmware-assisted dump if it was registered. */
|
/* Un-register Firmware-assisted dump if it was registered. */
|
||||||
fadump_unregister_dump(&fdm);
|
fadump_unregister_dump(&fdm);
|
||||||
|
free_crash_memory_ranges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3124,12 +3124,49 @@ static void pnv_pci_ioda_create_dbgfs(void)
|
||||||
#endif /* CONFIG_DEBUG_FS */
|
#endif /* CONFIG_DEBUG_FS */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void pnv_pci_enable_bridge(struct pci_bus *bus)
|
||||||
|
{
|
||||||
|
struct pci_dev *dev = bus->self;
|
||||||
|
struct pci_bus *child;
|
||||||
|
|
||||||
|
/* Empty bus ? bail */
|
||||||
|
if (list_empty(&bus->devices))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If there's a bridge associated with that bus enable it. This works
|
||||||
|
* around races in the generic code if the enabling is done during
|
||||||
|
* parallel probing. This can be removed once those races have been
|
||||||
|
* fixed.
|
||||||
|
*/
|
||||||
|
if (dev) {
|
||||||
|
int rc = pci_enable_device(dev);
|
||||||
|
if (rc)
|
||||||
|
pci_err(dev, "Error enabling bridge (%d)\n", rc);
|
||||||
|
pci_set_master(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform the same to child busses */
|
||||||
|
list_for_each_entry(child, &bus->children, node)
|
||||||
|
pnv_pci_enable_bridge(child);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void pnv_pci_enable_bridges(void)
|
||||||
|
{
|
||||||
|
struct pci_controller *hose;
|
||||||
|
|
||||||
|
list_for_each_entry(hose, &hose_list, list_node)
|
||||||
|
pnv_pci_enable_bridge(hose->bus);
|
||||||
|
}
|
||||||
|
|
||||||
static void pnv_pci_ioda_fixup(void)
|
static void pnv_pci_ioda_fixup(void)
|
||||||
{
|
{
|
||||||
pnv_pci_ioda_setup_PEs();
|
pnv_pci_ioda_setup_PEs();
|
||||||
pnv_pci_ioda_setup_iommu_api();
|
pnv_pci_ioda_setup_iommu_api();
|
||||||
pnv_pci_ioda_create_dbgfs();
|
pnv_pci_ioda_create_dbgfs();
|
||||||
|
|
||||||
|
pnv_pci_enable_bridges();
|
||||||
|
|
||||||
#ifdef CONFIG_EEH
|
#ifdef CONFIG_EEH
|
||||||
eeh_init();
|
eeh_init();
|
||||||
eeh_addr_cache_build();
|
eeh_addr_cache_build();
|
||||||
|
|
|
@ -346,7 +346,7 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)
|
||||||
}
|
}
|
||||||
|
|
||||||
savep = __va(regs->gpr[3]);
|
savep = __va(regs->gpr[3]);
|
||||||
regs->gpr[3] = savep[0]; /* restore original r3 */
|
regs->gpr[3] = be64_to_cpu(savep[0]); /* restore original r3 */
|
||||||
|
|
||||||
/* If it isn't an extended log we can use the per cpu 64bit buffer */
|
/* If it isn't an extended log we can use the per cpu 64bit buffer */
|
||||||
h = (struct rtas_error_log *)&savep[1];
|
h = (struct rtas_error_log *)&savep[1];
|
||||||
|
|
|
@ -201,23 +201,27 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig,
|
||||||
|
|
||||||
asmlinkage long sys_getdomainname(char __user *name, int len)
|
asmlinkage long sys_getdomainname(char __user *name, int len)
|
||||||
{
|
{
|
||||||
int nlen, err;
|
int nlen, err;
|
||||||
|
char tmp[__NEW_UTS_LEN + 1];
|
||||||
|
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
|
|
||||||
nlen = strlen(utsname()->domainname) + 1;
|
nlen = strlen(utsname()->domainname) + 1;
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
if (nlen > len)
|
if (nlen > len)
|
||||||
goto out;
|
goto out_unlock;
|
||||||
|
memcpy(tmp, utsname()->domainname, nlen);
|
||||||
|
|
||||||
err = -EFAULT;
|
up_read(&uts_sem);
|
||||||
if (!copy_to_user(name, utsname()->domainname, nlen))
|
|
||||||
err = 0;
|
|
||||||
|
|
||||||
out:
|
if (copy_to_user(name, tmp, nlen))
|
||||||
|
return -EFAULT;
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
out_unlock:
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -524,23 +524,27 @@ extern void check_pending(int signum);
|
||||||
|
|
||||||
SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len)
|
SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len)
|
||||||
{
|
{
|
||||||
int nlen, err;
|
int nlen, err;
|
||||||
|
char tmp[__NEW_UTS_LEN + 1];
|
||||||
|
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
|
|
||||||
nlen = strlen(utsname()->domainname) + 1;
|
nlen = strlen(utsname()->domainname) + 1;
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
if (nlen > len)
|
if (nlen > len)
|
||||||
goto out;
|
goto out_unlock;
|
||||||
|
memcpy(tmp, utsname()->domainname, nlen);
|
||||||
|
|
||||||
err = -EFAULT;
|
up_read(&uts_sem);
|
||||||
if (!copy_to_user(name, utsname()->domainname, nlen))
|
|
||||||
err = 0;
|
|
||||||
|
|
||||||
out:
|
if (copy_to_user(name, tmp, nlen))
|
||||||
|
return -EFAULT;
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
out_unlock:
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,7 +529,7 @@ static int bzImage64_cleanup(void *loader_data)
|
||||||
static int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len)
|
static int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len)
|
||||||
{
|
{
|
||||||
return verify_pefile_signature(kernel, kernel_len,
|
return verify_pefile_signature(kernel, kernel_len,
|
||||||
NULL,
|
VERIFY_USE_SECONDARY_KEYRING,
|
||||||
VERIFYING_KEXEC_PE_SIGNATURE);
|
VERIFYING_KEXEC_PE_SIGNATURE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -198,12 +198,14 @@ static enum vmx_l1d_flush_state __read_mostly vmentry_l1d_flush_param = VMENTER_
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *option;
|
const char *option;
|
||||||
enum vmx_l1d_flush_state cmd;
|
bool for_parse;
|
||||||
} vmentry_l1d_param[] = {
|
} vmentry_l1d_param[] = {
|
||||||
{"auto", VMENTER_L1D_FLUSH_AUTO},
|
[VMENTER_L1D_FLUSH_AUTO] = {"auto", true},
|
||||||
{"never", VMENTER_L1D_FLUSH_NEVER},
|
[VMENTER_L1D_FLUSH_NEVER] = {"never", true},
|
||||||
{"cond", VMENTER_L1D_FLUSH_COND},
|
[VMENTER_L1D_FLUSH_COND] = {"cond", true},
|
||||||
{"always", VMENTER_L1D_FLUSH_ALWAYS},
|
[VMENTER_L1D_FLUSH_ALWAYS] = {"always", true},
|
||||||
|
[VMENTER_L1D_FLUSH_EPT_DISABLED] = {"EPT disabled", false},
|
||||||
|
[VMENTER_L1D_FLUSH_NOT_REQUIRED] = {"not required", false},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define L1D_CACHE_ORDER 4
|
#define L1D_CACHE_ORDER 4
|
||||||
|
@ -287,8 +289,9 @@ static int vmentry_l1d_flush_parse(const char *s)
|
||||||
|
|
||||||
if (s) {
|
if (s) {
|
||||||
for (i = 0; i < ARRAY_SIZE(vmentry_l1d_param); i++) {
|
for (i = 0; i < ARRAY_SIZE(vmentry_l1d_param); i++) {
|
||||||
if (sysfs_streq(s, vmentry_l1d_param[i].option))
|
if (vmentry_l1d_param[i].for_parse &&
|
||||||
return vmentry_l1d_param[i].cmd;
|
sysfs_streq(s, vmentry_l1d_param[i].option))
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -298,13 +301,13 @@ static int vmentry_l1d_flush_set(const char *s, const struct kernel_param *kp)
|
||||||
{
|
{
|
||||||
int l1tf, ret;
|
int l1tf, ret;
|
||||||
|
|
||||||
if (!boot_cpu_has(X86_BUG_L1TF))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
l1tf = vmentry_l1d_flush_parse(s);
|
l1tf = vmentry_l1d_flush_parse(s);
|
||||||
if (l1tf < 0)
|
if (l1tf < 0)
|
||||||
return l1tf;
|
return l1tf;
|
||||||
|
|
||||||
|
if (!boot_cpu_has(X86_BUG_L1TF))
|
||||||
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Has vmx_init() run already? If not then this is the pre init
|
* Has vmx_init() run already? If not then this is the pre init
|
||||||
* parameter parsing. In that case just store the value and let
|
* parameter parsing. In that case just store the value and let
|
||||||
|
@ -324,6 +327,9 @@ static int vmentry_l1d_flush_set(const char *s, const struct kernel_param *kp)
|
||||||
|
|
||||||
static int vmentry_l1d_flush_get(char *s, const struct kernel_param *kp)
|
static int vmentry_l1d_flush_get(char *s, const struct kernel_param *kp)
|
||||||
{
|
{
|
||||||
|
if (WARN_ON_ONCE(l1tf_vmx_mitigation >= ARRAY_SIZE(vmentry_l1d_param)))
|
||||||
|
return sprintf(s, "???\n");
|
||||||
|
|
||||||
return sprintf(s, "%s\n", vmentry_l1d_param[l1tf_vmx_mitigation].option);
|
return sprintf(s, "%s\n", vmentry_l1d_param[l1tf_vmx_mitigation].option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,16 +31,32 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.macro __loop_cache_all ar at insn size line_width
|
|
||||||
|
.macro __loop_cache_unroll ar at insn size line_width max_immed
|
||||||
|
|
||||||
|
.if (1 << (\line_width)) > (\max_immed)
|
||||||
|
.set _reps, 1
|
||||||
|
.elseif (2 << (\line_width)) > (\max_immed)
|
||||||
|
.set _reps, 2
|
||||||
|
.else
|
||||||
|
.set _reps, 4
|
||||||
|
.endif
|
||||||
|
|
||||||
|
__loopi \ar, \at, \size, (_reps << (\line_width))
|
||||||
|
.set _index, 0
|
||||||
|
.rep _reps
|
||||||
|
\insn \ar, _index << (\line_width)
|
||||||
|
.set _index, _index + 1
|
||||||
|
.endr
|
||||||
|
__endla \ar, \at, _reps << (\line_width)
|
||||||
|
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
.macro __loop_cache_all ar at insn size line_width max_immed
|
||||||
|
|
||||||
movi \ar, 0
|
movi \ar, 0
|
||||||
|
__loop_cache_unroll \ar, \at, \insn, \size, \line_width, \max_immed
|
||||||
__loopi \ar, \at, \size, (4 << (\line_width))
|
|
||||||
\insn \ar, 0 << (\line_width)
|
|
||||||
\insn \ar, 1 << (\line_width)
|
|
||||||
\insn \ar, 2 << (\line_width)
|
|
||||||
\insn \ar, 3 << (\line_width)
|
|
||||||
__endla \ar, \at, 4 << (\line_width)
|
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -57,14 +73,9 @@
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|
||||||
.macro __loop_cache_page ar at insn line_width
|
.macro __loop_cache_page ar at insn line_width max_immed
|
||||||
|
|
||||||
__loopi \ar, \at, PAGE_SIZE, 4 << (\line_width)
|
__loop_cache_unroll \ar, \at, \insn, PAGE_SIZE, \line_width, \max_immed
|
||||||
\insn \ar, 0 << (\line_width)
|
|
||||||
\insn \ar, 1 << (\line_width)
|
|
||||||
\insn \ar, 2 << (\line_width)
|
|
||||||
\insn \ar, 3 << (\line_width)
|
|
||||||
__endla \ar, \at, 4 << (\line_width)
|
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -72,7 +83,8 @@
|
||||||
.macro ___unlock_dcache_all ar at
|
.macro ___unlock_dcache_all ar at
|
||||||
|
|
||||||
#if XCHAL_DCACHE_LINE_LOCKABLE && XCHAL_DCACHE_SIZE
|
#if XCHAL_DCACHE_LINE_LOCKABLE && XCHAL_DCACHE_SIZE
|
||||||
__loop_cache_all \ar \at diu XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
|
__loop_cache_all \ar \at diu XCHAL_DCACHE_SIZE \
|
||||||
|
XCHAL_DCACHE_LINEWIDTH 240
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -81,7 +93,8 @@
|
||||||
.macro ___unlock_icache_all ar at
|
.macro ___unlock_icache_all ar at
|
||||||
|
|
||||||
#if XCHAL_ICACHE_LINE_LOCKABLE && XCHAL_ICACHE_SIZE
|
#if XCHAL_ICACHE_LINE_LOCKABLE && XCHAL_ICACHE_SIZE
|
||||||
__loop_cache_all \ar \at iiu XCHAL_ICACHE_SIZE XCHAL_ICACHE_LINEWIDTH
|
__loop_cache_all \ar \at iiu XCHAL_ICACHE_SIZE \
|
||||||
|
XCHAL_ICACHE_LINEWIDTH 240
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -90,7 +103,8 @@
|
||||||
.macro ___flush_invalidate_dcache_all ar at
|
.macro ___flush_invalidate_dcache_all ar at
|
||||||
|
|
||||||
#if XCHAL_DCACHE_SIZE
|
#if XCHAL_DCACHE_SIZE
|
||||||
__loop_cache_all \ar \at diwbi XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
|
__loop_cache_all \ar \at diwbi XCHAL_DCACHE_SIZE \
|
||||||
|
XCHAL_DCACHE_LINEWIDTH 240
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -99,7 +113,8 @@
|
||||||
.macro ___flush_dcache_all ar at
|
.macro ___flush_dcache_all ar at
|
||||||
|
|
||||||
#if XCHAL_DCACHE_SIZE
|
#if XCHAL_DCACHE_SIZE
|
||||||
__loop_cache_all \ar \at diwb XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
|
__loop_cache_all \ar \at diwb XCHAL_DCACHE_SIZE \
|
||||||
|
XCHAL_DCACHE_LINEWIDTH 240
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -108,8 +123,8 @@
|
||||||
.macro ___invalidate_dcache_all ar at
|
.macro ___invalidate_dcache_all ar at
|
||||||
|
|
||||||
#if XCHAL_DCACHE_SIZE
|
#if XCHAL_DCACHE_SIZE
|
||||||
__loop_cache_all \ar \at dii __stringify(DCACHE_WAY_SIZE) \
|
__loop_cache_all \ar \at dii XCHAL_DCACHE_SIZE \
|
||||||
XCHAL_DCACHE_LINEWIDTH
|
XCHAL_DCACHE_LINEWIDTH 1020
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -118,8 +133,8 @@
|
||||||
.macro ___invalidate_icache_all ar at
|
.macro ___invalidate_icache_all ar at
|
||||||
|
|
||||||
#if XCHAL_ICACHE_SIZE
|
#if XCHAL_ICACHE_SIZE
|
||||||
__loop_cache_all \ar \at iii __stringify(ICACHE_WAY_SIZE) \
|
__loop_cache_all \ar \at iii XCHAL_ICACHE_SIZE \
|
||||||
XCHAL_ICACHE_LINEWIDTH
|
XCHAL_ICACHE_LINEWIDTH 1020
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -166,7 +181,7 @@
|
||||||
.macro ___flush_invalidate_dcache_page ar as
|
.macro ___flush_invalidate_dcache_page ar as
|
||||||
|
|
||||||
#if XCHAL_DCACHE_SIZE
|
#if XCHAL_DCACHE_SIZE
|
||||||
__loop_cache_page \ar \as dhwbi XCHAL_DCACHE_LINEWIDTH
|
__loop_cache_page \ar \as dhwbi XCHAL_DCACHE_LINEWIDTH 1020
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -175,7 +190,7 @@
|
||||||
.macro ___flush_dcache_page ar as
|
.macro ___flush_dcache_page ar as
|
||||||
|
|
||||||
#if XCHAL_DCACHE_SIZE
|
#if XCHAL_DCACHE_SIZE
|
||||||
__loop_cache_page \ar \as dhwb XCHAL_DCACHE_LINEWIDTH
|
__loop_cache_page \ar \as dhwb XCHAL_DCACHE_LINEWIDTH 1020
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -184,7 +199,7 @@
|
||||||
.macro ___invalidate_dcache_page ar as
|
.macro ___invalidate_dcache_page ar as
|
||||||
|
|
||||||
#if XCHAL_DCACHE_SIZE
|
#if XCHAL_DCACHE_SIZE
|
||||||
__loop_cache_page \ar \as dhi XCHAL_DCACHE_LINEWIDTH
|
__loop_cache_page \ar \as dhi XCHAL_DCACHE_LINEWIDTH 1020
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
@ -193,7 +208,7 @@
|
||||||
.macro ___invalidate_icache_page ar as
|
.macro ___invalidate_icache_page ar as
|
||||||
|
|
||||||
#if XCHAL_ICACHE_SIZE
|
#if XCHAL_ICACHE_SIZE
|
||||||
__loop_cache_page \ar \as ihi XCHAL_ICACHE_LINEWIDTH
|
__loop_cache_page \ar \as ihi XCHAL_ICACHE_LINEWIDTH 1020
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/cred.h>
|
#include <linux/cred.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
|
#include <linux/verification.h>
|
||||||
#include <keys/asymmetric-type.h>
|
#include <keys/asymmetric-type.h>
|
||||||
#include <keys/system_keyring.h>
|
#include <keys/system_keyring.h>
|
||||||
#include <crypto/pkcs7.h>
|
#include <crypto/pkcs7.h>
|
||||||
|
@ -207,7 +208,7 @@ int verify_pkcs7_signature(const void *data, size_t len,
|
||||||
|
|
||||||
if (!trusted_keys) {
|
if (!trusted_keys) {
|
||||||
trusted_keys = builtin_trusted_keys;
|
trusted_keys = builtin_trusted_keys;
|
||||||
} else if (trusted_keys == (void *)1UL) {
|
} else if (trusted_keys == VERIFY_USE_SECONDARY_KEYRING) {
|
||||||
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||||
trusted_keys = secondary_trusted_keys;
|
trusted_keys = secondary_trusted_keys;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -62,7 +62,7 @@ static int pkcs7_preparse(struct key_preparsed_payload *prep)
|
||||||
|
|
||||||
return verify_pkcs7_signature(NULL, 0,
|
return verify_pkcs7_signature(NULL, 0,
|
||||||
prep->data, prep->datalen,
|
prep->data, prep->datalen,
|
||||||
(void *)1UL, usage,
|
VERIFY_USE_SECONDARY_KEYRING, usage,
|
||||||
pkcs7_view_content, prep);
|
pkcs7_view_content, prep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,8 @@ static void caam_jr_dequeue(unsigned long devarg)
|
||||||
BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0);
|
BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0);
|
||||||
|
|
||||||
/* Unmap just-run descriptor so we can post-process */
|
/* Unmap just-run descriptor so we can post-process */
|
||||||
dma_unmap_single(dev, jrp->outring[hw_idx].desc,
|
dma_unmap_single(dev,
|
||||||
|
caam_dma_to_cpu(jrp->outring[hw_idx].desc),
|
||||||
jrp->entinfo[sw_idx].desc_size,
|
jrp->entinfo[sw_idx].desc_size,
|
||||||
DMA_TO_DEVICE);
|
DMA_TO_DEVICE);
|
||||||
|
|
||||||
|
|
|
@ -111,24 +111,23 @@ static int p8_aes_cbc_encrypt(struct blkcipher_desc *desc,
|
||||||
ret = crypto_blkcipher_encrypt(&fallback_desc, dst, src,
|
ret = crypto_blkcipher_encrypt(&fallback_desc, dst, src,
|
||||||
nbytes);
|
nbytes);
|
||||||
} else {
|
} else {
|
||||||
preempt_disable();
|
|
||||||
pagefault_disable();
|
|
||||||
enable_kernel_vsx();
|
|
||||||
|
|
||||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||||
ret = blkcipher_walk_virt(desc, &walk);
|
ret = blkcipher_walk_virt(desc, &walk);
|
||||||
while ((nbytes = walk.nbytes)) {
|
while ((nbytes = walk.nbytes)) {
|
||||||
|
preempt_disable();
|
||||||
|
pagefault_disable();
|
||||||
|
enable_kernel_vsx();
|
||||||
aes_p8_cbc_encrypt(walk.src.virt.addr,
|
aes_p8_cbc_encrypt(walk.src.virt.addr,
|
||||||
walk.dst.virt.addr,
|
walk.dst.virt.addr,
|
||||||
nbytes & AES_BLOCK_MASK,
|
nbytes & AES_BLOCK_MASK,
|
||||||
&ctx->enc_key, walk.iv, 1);
|
&ctx->enc_key, walk.iv, 1);
|
||||||
|
disable_kernel_vsx();
|
||||||
|
pagefault_enable();
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
nbytes &= AES_BLOCK_SIZE - 1;
|
nbytes &= AES_BLOCK_SIZE - 1;
|
||||||
ret = blkcipher_walk_done(desc, &walk, nbytes);
|
ret = blkcipher_walk_done(desc, &walk, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_kernel_vsx();
|
|
||||||
pagefault_enable();
|
|
||||||
preempt_enable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -152,24 +151,23 @@ static int p8_aes_cbc_decrypt(struct blkcipher_desc *desc,
|
||||||
ret = crypto_blkcipher_decrypt(&fallback_desc, dst, src,
|
ret = crypto_blkcipher_decrypt(&fallback_desc, dst, src,
|
||||||
nbytes);
|
nbytes);
|
||||||
} else {
|
} else {
|
||||||
preempt_disable();
|
|
||||||
pagefault_disable();
|
|
||||||
enable_kernel_vsx();
|
|
||||||
|
|
||||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||||
ret = blkcipher_walk_virt(desc, &walk);
|
ret = blkcipher_walk_virt(desc, &walk);
|
||||||
while ((nbytes = walk.nbytes)) {
|
while ((nbytes = walk.nbytes)) {
|
||||||
|
preempt_disable();
|
||||||
|
pagefault_disable();
|
||||||
|
enable_kernel_vsx();
|
||||||
aes_p8_cbc_encrypt(walk.src.virt.addr,
|
aes_p8_cbc_encrypt(walk.src.virt.addr,
|
||||||
walk.dst.virt.addr,
|
walk.dst.virt.addr,
|
||||||
nbytes & AES_BLOCK_MASK,
|
nbytes & AES_BLOCK_MASK,
|
||||||
&ctx->dec_key, walk.iv, 0);
|
&ctx->dec_key, walk.iv, 0);
|
||||||
|
disable_kernel_vsx();
|
||||||
|
pagefault_enable();
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
nbytes &= AES_BLOCK_SIZE - 1;
|
nbytes &= AES_BLOCK_SIZE - 1;
|
||||||
ret = blkcipher_walk_done(desc, &walk, nbytes);
|
ret = blkcipher_walk_done(desc, &walk, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_kernel_vsx();
|
|
||||||
pagefault_enable();
|
|
||||||
preempt_enable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -123,32 +123,39 @@ static int p8_aes_xts_crypt(struct blkcipher_desc *desc,
|
||||||
ret = enc ? crypto_blkcipher_encrypt(&fallback_desc, dst, src, nbytes) :
|
ret = enc ? crypto_blkcipher_encrypt(&fallback_desc, dst, src, nbytes) :
|
||||||
crypto_blkcipher_decrypt(&fallback_desc, dst, src, nbytes);
|
crypto_blkcipher_decrypt(&fallback_desc, dst, src, nbytes);
|
||||||
} else {
|
} else {
|
||||||
|
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||||
|
|
||||||
|
ret = blkcipher_walk_virt(desc, &walk);
|
||||||
|
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
pagefault_disable();
|
pagefault_disable();
|
||||||
enable_kernel_vsx();
|
enable_kernel_vsx();
|
||||||
|
|
||||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
|
||||||
|
|
||||||
ret = blkcipher_walk_virt(desc, &walk);
|
|
||||||
iv = walk.iv;
|
iv = walk.iv;
|
||||||
memset(tweak, 0, AES_BLOCK_SIZE);
|
memset(tweak, 0, AES_BLOCK_SIZE);
|
||||||
aes_p8_encrypt(iv, tweak, &ctx->tweak_key);
|
aes_p8_encrypt(iv, tweak, &ctx->tweak_key);
|
||||||
|
|
||||||
|
disable_kernel_vsx();
|
||||||
|
pagefault_enable();
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
while ((nbytes = walk.nbytes)) {
|
while ((nbytes = walk.nbytes)) {
|
||||||
|
preempt_disable();
|
||||||
|
pagefault_disable();
|
||||||
|
enable_kernel_vsx();
|
||||||
if (enc)
|
if (enc)
|
||||||
aes_p8_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr,
|
aes_p8_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr,
|
||||||
nbytes & AES_BLOCK_MASK, &ctx->enc_key, NULL, tweak);
|
nbytes & AES_BLOCK_MASK, &ctx->enc_key, NULL, tweak);
|
||||||
else
|
else
|
||||||
aes_p8_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr,
|
aes_p8_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr,
|
||||||
nbytes & AES_BLOCK_MASK, &ctx->dec_key, NULL, tweak);
|
nbytes & AES_BLOCK_MASK, &ctx->dec_key, NULL, tweak);
|
||||||
|
disable_kernel_vsx();
|
||||||
|
pagefault_enable();
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
nbytes &= AES_BLOCK_SIZE - 1;
|
nbytes &= AES_BLOCK_SIZE - 1;
|
||||||
ret = blkcipher_walk_done(desc, &walk, nbytes);
|
ret = blkcipher_walk_done(desc, &walk, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_kernel_vsx();
|
|
||||||
pagefault_enable();
|
|
||||||
preempt_enable();
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -778,6 +778,9 @@ i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file
|
||||||
I915_USERPTR_UNSYNCHRONIZED))
|
I915_USERPTR_UNSYNCHRONIZED))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!args->user_size)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (offset_in_page(args->user_ptr | args->user_size))
|
if (offset_in_page(args->user_ptr | args->user_size))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
|
@ -508,7 +508,7 @@ static ssize_t ad9523_store(struct device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
return 0;
|
return len;
|
||||||
|
|
||||||
mutex_lock(&indio_dev->mlock);
|
mutex_lock(&indio_dev->mlock);
|
||||||
switch ((u32)this_attr->address) {
|
switch ((u32)this_attr->address) {
|
||||||
|
@ -642,7 +642,7 @@ static int ad9523_read_raw(struct iio_dev *indio_dev,
|
||||||
code = (AD9523_CLK_DIST_DIV_PHASE_REV(ret) * 3141592) /
|
code = (AD9523_CLK_DIST_DIV_PHASE_REV(ret) * 3141592) /
|
||||||
AD9523_CLK_DIST_DIV_REV(ret);
|
AD9523_CLK_DIST_DIV_REV(ret);
|
||||||
*val = code / 1000000;
|
*val = code / 1000000;
|
||||||
*val2 = (code % 1000000) * 10;
|
*val2 = code % 1000000;
|
||||||
return IIO_VAL_INT_PLUS_MICRO;
|
return IIO_VAL_INT_PLUS_MICRO;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -273,6 +273,7 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,
|
||||||
case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE:
|
case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE:
|
||||||
if (wqe->wr.opcode != IB_WR_RDMA_READ &&
|
if (wqe->wr.opcode != IB_WR_RDMA_READ &&
|
||||||
wqe->wr.opcode != IB_WR_RDMA_READ_WITH_INV) {
|
wqe->wr.opcode != IB_WR_RDMA_READ_WITH_INV) {
|
||||||
|
wqe->status = IB_WC_FATAL_ERR;
|
||||||
return COMPST_ERROR;
|
return COMPST_ERROR;
|
||||||
}
|
}
|
||||||
reset_retry_counters(qp);
|
reset_retry_counters(qp);
|
||||||
|
|
|
@ -1701,8 +1701,7 @@ static bool srpt_close_ch(struct srpt_rdma_ch *ch)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!srpt_set_ch_state(ch, CH_DRAINING)) {
|
if (!srpt_set_ch_state(ch, CH_DRAINING)) {
|
||||||
pr_debug("%s-%d: already closed\n", ch->sess_name,
|
pr_debug("%s: already closed\n", ch->sess_name);
|
||||||
ch->qp->qp_num);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1328,8 +1328,8 @@ void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
|
||||||
qi_submit_sync(&desc, iommu);
|
qi_submit_sync(&desc, iommu);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
|
void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 pfsid,
|
||||||
u64 addr, unsigned mask)
|
u16 qdep, u64 addr, unsigned mask)
|
||||||
{
|
{
|
||||||
struct qi_desc desc;
|
struct qi_desc desc;
|
||||||
|
|
||||||
|
@ -1344,7 +1344,7 @@ void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
|
||||||
qdep = 0;
|
qdep = 0;
|
||||||
|
|
||||||
desc.low = QI_DEV_IOTLB_SID(sid) | QI_DEV_IOTLB_QDEP(qdep) |
|
desc.low = QI_DEV_IOTLB_SID(sid) | QI_DEV_IOTLB_QDEP(qdep) |
|
||||||
QI_DIOTLB_TYPE;
|
QI_DIOTLB_TYPE | QI_DEV_IOTLB_PFSID(pfsid);
|
||||||
|
|
||||||
qi_submit_sync(&desc, iommu);
|
qi_submit_sync(&desc, iommu);
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,6 +421,7 @@ struct device_domain_info {
|
||||||
struct list_head global; /* link to global list */
|
struct list_head global; /* link to global list */
|
||||||
u8 bus; /* PCI bus number */
|
u8 bus; /* PCI bus number */
|
||||||
u8 devfn; /* PCI devfn number */
|
u8 devfn; /* PCI devfn number */
|
||||||
|
u16 pfsid; /* SRIOV physical function source ID */
|
||||||
u8 pasid_supported:3;
|
u8 pasid_supported:3;
|
||||||
u8 pasid_enabled:1;
|
u8 pasid_enabled:1;
|
||||||
u8 pri_supported:1;
|
u8 pri_supported:1;
|
||||||
|
@ -1511,6 +1512,20 @@ static void iommu_enable_dev_iotlb(struct device_domain_info *info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pdev = to_pci_dev(info->dev);
|
pdev = to_pci_dev(info->dev);
|
||||||
|
/* For IOMMU that supports device IOTLB throttling (DIT), we assign
|
||||||
|
* PFSID to the invalidation desc of a VF such that IOMMU HW can gauge
|
||||||
|
* queue depth at PF level. If DIT is not set, PFSID will be treated as
|
||||||
|
* reserved, which should be set to 0.
|
||||||
|
*/
|
||||||
|
if (!ecap_dit(info->iommu->ecap))
|
||||||
|
info->pfsid = 0;
|
||||||
|
else {
|
||||||
|
struct pci_dev *pf_pdev;
|
||||||
|
|
||||||
|
/* pdev will be returned if device is not a vf */
|
||||||
|
pf_pdev = pci_physfn(pdev);
|
||||||
|
info->pfsid = PCI_DEVID(pf_pdev->bus->number, pf_pdev->devfn);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_INTEL_IOMMU_SVM
|
#ifdef CONFIG_INTEL_IOMMU_SVM
|
||||||
/* The PCIe spec, in its wisdom, declares that the behaviour of
|
/* The PCIe spec, in its wisdom, declares that the behaviour of
|
||||||
|
@ -1576,7 +1591,8 @@ static void iommu_flush_dev_iotlb(struct dmar_domain *domain,
|
||||||
|
|
||||||
sid = info->bus << 8 | info->devfn;
|
sid = info->bus << 8 | info->devfn;
|
||||||
qdep = info->ats_qdep;
|
qdep = info->ats_qdep;
|
||||||
qi_flush_dev_iotlb(info->iommu, sid, qdep, addr, mask);
|
qi_flush_dev_iotlb(info->iommu, sid, info->pfsid,
|
||||||
|
qdep, addr, mask);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&device_domain_lock, flags);
|
spin_unlock_irqrestore(&device_domain_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,9 +195,9 @@ static int slimpro_mbox_probe(struct platform_device *pdev)
|
||||||
platform_set_drvdata(pdev, ctx);
|
platform_set_drvdata(pdev, ctx);
|
||||||
|
|
||||||
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
mb_base = devm_ioremap(&pdev->dev, regs->start, resource_size(regs));
|
mb_base = devm_ioremap_resource(&pdev->dev, regs);
|
||||||
if (!mb_base)
|
if (IS_ERR(mb_base))
|
||||||
return -ENOMEM;
|
return PTR_ERR(mb_base);
|
||||||
|
|
||||||
/* Setup mailbox links */
|
/* Setup mailbox links */
|
||||||
for (i = 0; i < MBOX_CNT; i++) {
|
for (i = 0; i < MBOX_CNT; i++) {
|
||||||
|
|
|
@ -456,8 +456,10 @@ static int bch_writeback_thread(void *arg)
|
||||||
* data on cache. BCACHE_DEV_DETACHING flag is set in
|
* data on cache. BCACHE_DEV_DETACHING flag is set in
|
||||||
* bch_cached_dev_detach().
|
* bch_cached_dev_detach().
|
||||||
*/
|
*/
|
||||||
if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags))
|
if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)) {
|
||||||
|
up_write(&dc->writeback_lock);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
up_write(&dc->writeback_lock);
|
up_write(&dc->writeback_lock);
|
||||||
|
|
|
@ -344,7 +344,7 @@ static int __write_initial_superblock(struct dm_cache_metadata *cmd)
|
||||||
disk_super->version = cpu_to_le32(MAX_CACHE_VERSION);
|
disk_super->version = cpu_to_le32(MAX_CACHE_VERSION);
|
||||||
memset(disk_super->policy_name, 0, sizeof(disk_super->policy_name));
|
memset(disk_super->policy_name, 0, sizeof(disk_super->policy_name));
|
||||||
memset(disk_super->policy_version, 0, sizeof(disk_super->policy_version));
|
memset(disk_super->policy_version, 0, sizeof(disk_super->policy_version));
|
||||||
disk_super->policy_hint_size = 0;
|
disk_super->policy_hint_size = cpu_to_le32(0);
|
||||||
|
|
||||||
__copy_sm_root(cmd, disk_super);
|
__copy_sm_root(cmd, disk_super);
|
||||||
|
|
||||||
|
@ -659,6 +659,7 @@ static int __commit_transaction(struct dm_cache_metadata *cmd,
|
||||||
disk_super->policy_version[0] = cpu_to_le32(cmd->policy_version[0]);
|
disk_super->policy_version[0] = cpu_to_le32(cmd->policy_version[0]);
|
||||||
disk_super->policy_version[1] = cpu_to_le32(cmd->policy_version[1]);
|
disk_super->policy_version[1] = cpu_to_le32(cmd->policy_version[1]);
|
||||||
disk_super->policy_version[2] = cpu_to_le32(cmd->policy_version[2]);
|
disk_super->policy_version[2] = cpu_to_le32(cmd->policy_version[2]);
|
||||||
|
disk_super->policy_hint_size = cpu_to_le32(cmd->policy_hint_size);
|
||||||
|
|
||||||
disk_super->read_hits = cpu_to_le32(cmd->stats.read_hits);
|
disk_super->read_hits = cpu_to_le32(cmd->stats.read_hits);
|
||||||
disk_super->read_misses = cpu_to_le32(cmd->stats.read_misses);
|
disk_super->read_misses = cpu_to_le32(cmd->stats.read_misses);
|
||||||
|
|
|
@ -2518,6 +2518,8 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)
|
||||||
case PM_WRITE:
|
case PM_WRITE:
|
||||||
if (old_mode != new_mode)
|
if (old_mode != new_mode)
|
||||||
notify_of_pool_mode_change(pool, "write");
|
notify_of_pool_mode_change(pool, "write");
|
||||||
|
if (old_mode == PM_OUT_OF_DATA_SPACE)
|
||||||
|
cancel_delayed_work_sync(&pool->no_space_timeout);
|
||||||
pool->out_of_data_space = false;
|
pool->out_of_data_space = false;
|
||||||
pool->pf.error_if_no_space = pt->requested_pf.error_if_no_space;
|
pool->pf.error_if_no_space = pt->requested_pf.error_if_no_space;
|
||||||
dm_pool_metadata_read_write(pool->pmd);
|
dm_pool_metadata_read_write(pool->pmd);
|
||||||
|
|
|
@ -49,7 +49,7 @@ static struct regmap_config hi655x_regmap_config = {
|
||||||
.reg_bits = 32,
|
.reg_bits = 32,
|
||||||
.reg_stride = HI655X_STRIDE,
|
.reg_stride = HI655X_STRIDE,
|
||||||
.val_bits = 8,
|
.val_bits = 8,
|
||||||
.max_register = HI655X_BUS_ADDR(0xFFF),
|
.max_register = HI655X_BUS_ADDR(0x400) - HI655X_STRIDE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource pwrkey_resources[] = {
|
static struct resource pwrkey_resources[] = {
|
||||||
|
|
|
@ -293,7 +293,7 @@ int cxl_adapter_context_get(struct cxl *adapter)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = atomic_inc_unless_negative(&adapter->contexts_num);
|
rc = atomic_inc_unless_negative(&adapter->contexts_num);
|
||||||
return rc >= 0 ? 0 : -EBUSY;
|
return rc ? 0 : -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cxl_adapter_context_put(struct cxl *adapter)
|
void cxl_adapter_context_put(struct cxl *adapter)
|
||||||
|
|
|
@ -341,7 +341,13 @@ static bool vmballoon_send_start(struct vmballoon *b, unsigned long req_caps)
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b->capabilities & VMW_BALLOON_BATCHED_2M_CMDS)
|
/*
|
||||||
|
* 2MB pages are only supported with batching. If batching is for some
|
||||||
|
* reason disabled, do not use 2MB pages, since otherwise the legacy
|
||||||
|
* mechanism is used with 2MB pages, causing a failure.
|
||||||
|
*/
|
||||||
|
if ((b->capabilities & VMW_BALLOON_BATCHED_2M_CMDS) &&
|
||||||
|
(b->capabilities & VMW_BALLOON_BATCHED_CMDS))
|
||||||
b->supported_page_sizes = 2;
|
b->supported_page_sizes = 2;
|
||||||
else
|
else
|
||||||
b->supported_page_sizes = 1;
|
b->supported_page_sizes = 1;
|
||||||
|
@ -450,7 +456,7 @@ static int vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,
|
||||||
|
|
||||||
pfn32 = (u32)pfn;
|
pfn32 = (u32)pfn;
|
||||||
if (pfn32 != pfn)
|
if (pfn32 != pfn)
|
||||||
return -1;
|
return -EINVAL;
|
||||||
|
|
||||||
STATS_INC(b->stats.lock[false]);
|
STATS_INC(b->stats.lock[false]);
|
||||||
|
|
||||||
|
@ -460,7 +466,7 @@ static int vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,
|
||||||
|
|
||||||
pr_debug("%s - ppn %lx, hv returns %ld\n", __func__, pfn, status);
|
pr_debug("%s - ppn %lx, hv returns %ld\n", __func__, pfn, status);
|
||||||
STATS_INC(b->stats.lock_fail[false]);
|
STATS_INC(b->stats.lock_fail[false]);
|
||||||
return 1;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vmballoon_send_batched_lock(struct vmballoon *b,
|
static int vmballoon_send_batched_lock(struct vmballoon *b,
|
||||||
|
@ -597,11 +603,12 @@ static int vmballoon_lock_page(struct vmballoon *b, unsigned int num_pages,
|
||||||
|
|
||||||
locked = vmballoon_send_lock_page(b, page_to_pfn(page), &hv_status,
|
locked = vmballoon_send_lock_page(b, page_to_pfn(page), &hv_status,
|
||||||
target);
|
target);
|
||||||
if (locked > 0) {
|
if (locked) {
|
||||||
STATS_INC(b->stats.refused_alloc[false]);
|
STATS_INC(b->stats.refused_alloc[false]);
|
||||||
|
|
||||||
if (hv_status == VMW_BALLOON_ERROR_RESET ||
|
if (locked == -EIO &&
|
||||||
hv_status == VMW_BALLOON_ERROR_PPN_NOTNEEDED) {
|
(hv_status == VMW_BALLOON_ERROR_RESET ||
|
||||||
|
hv_status == VMW_BALLOON_ERROR_PPN_NOTNEEDED)) {
|
||||||
vmballoon_free_page(page, false);
|
vmballoon_free_page(page, false);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
@ -617,7 +624,7 @@ static int vmballoon_lock_page(struct vmballoon *b, unsigned int num_pages,
|
||||||
} else {
|
} else {
|
||||||
vmballoon_free_page(page, false);
|
vmballoon_free_page(page, false);
|
||||||
}
|
}
|
||||||
return -EIO;
|
return locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* track allocated page */
|
/* track allocated page */
|
||||||
|
@ -1029,29 +1036,30 @@ static void vmballoon_vmci_cleanup(struct vmballoon *b)
|
||||||
*/
|
*/
|
||||||
static int vmballoon_vmci_init(struct vmballoon *b)
|
static int vmballoon_vmci_init(struct vmballoon *b)
|
||||||
{
|
{
|
||||||
int error = 0;
|
unsigned long error, dummy;
|
||||||
|
|
||||||
if ((b->capabilities & VMW_BALLOON_SIGNALLED_WAKEUP_CMD) != 0) {
|
if ((b->capabilities & VMW_BALLOON_SIGNALLED_WAKEUP_CMD) == 0)
|
||||||
error = vmci_doorbell_create(&b->vmci_doorbell,
|
return 0;
|
||||||
VMCI_FLAG_DELAYED_CB,
|
|
||||||
VMCI_PRIVILEGE_FLAG_RESTRICTED,
|
|
||||||
vmballoon_doorbell, b);
|
|
||||||
|
|
||||||
if (error == VMCI_SUCCESS) {
|
error = vmci_doorbell_create(&b->vmci_doorbell, VMCI_FLAG_DELAYED_CB,
|
||||||
VMWARE_BALLOON_CMD(VMCI_DOORBELL_SET,
|
VMCI_PRIVILEGE_FLAG_RESTRICTED,
|
||||||
b->vmci_doorbell.context,
|
vmballoon_doorbell, b);
|
||||||
b->vmci_doorbell.resource, error);
|
|
||||||
STATS_INC(b->stats.doorbell_set);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error != 0) {
|
if (error != VMCI_SUCCESS)
|
||||||
vmballoon_vmci_cleanup(b);
|
goto fail;
|
||||||
|
|
||||||
return -EIO;
|
error = VMWARE_BALLOON_CMD(VMCI_DOORBELL_SET, b->vmci_doorbell.context,
|
||||||
}
|
b->vmci_doorbell.resource, dummy);
|
||||||
|
|
||||||
|
STATS_INC(b->stats.doorbell_set);
|
||||||
|
|
||||||
|
if (error != VMW_BALLOON_SUCCESS)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
fail:
|
||||||
|
vmballoon_vmci_cleanup(b);
|
||||||
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1289,7 +1297,14 @@ static int __init vmballoon_init(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
module_init(vmballoon_init);
|
|
||||||
|
/*
|
||||||
|
* Using late_initcall() instead of module_init() allows the balloon to use the
|
||||||
|
* VMCI doorbell even when the balloon is built into the kernel. Otherwise the
|
||||||
|
* VMCI is probed only after the balloon is initialized. If the balloon is used
|
||||||
|
* as a module, late_initcall() is equivalent to module_init().
|
||||||
|
*/
|
||||||
|
late_initcall(vmballoon_init);
|
||||||
|
|
||||||
static void __exit vmballoon_exit(void)
|
static void __exit vmballoon_exit(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,6 +103,7 @@ struct lbs_private {
|
||||||
u8 fw_ready;
|
u8 fw_ready;
|
||||||
u8 surpriseremoved;
|
u8 surpriseremoved;
|
||||||
u8 setup_fw_on_resume;
|
u8 setup_fw_on_resume;
|
||||||
|
u8 power_up_on_resume;
|
||||||
int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb);
|
int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb);
|
||||||
void (*reset_card) (struct lbs_private *priv);
|
void (*reset_card) (struct lbs_private *priv);
|
||||||
int (*power_save) (struct lbs_private *priv);
|
int (*power_save) (struct lbs_private *priv);
|
||||||
|
|
|
@ -1341,15 +1341,23 @@ static void if_sdio_remove(struct sdio_func *func)
|
||||||
static int if_sdio_suspend(struct device *dev)
|
static int if_sdio_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = dev_to_sdio_func(dev);
|
struct sdio_func *func = dev_to_sdio_func(dev);
|
||||||
int ret;
|
|
||||||
struct if_sdio_card *card = sdio_get_drvdata(func);
|
struct if_sdio_card *card = sdio_get_drvdata(func);
|
||||||
|
struct lbs_private *priv = card->priv;
|
||||||
|
int ret;
|
||||||
|
|
||||||
mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);
|
mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);
|
||||||
|
priv->power_up_on_resume = false;
|
||||||
|
|
||||||
/* If we're powered off anyway, just let the mmc layer remove the
|
/* If we're powered off anyway, just let the mmc layer remove the
|
||||||
* card. */
|
* card. */
|
||||||
if (!lbs_iface_active(card->priv))
|
if (!lbs_iface_active(priv)) {
|
||||||
return -ENOSYS;
|
if (priv->fw_ready) {
|
||||||
|
priv->power_up_on_resume = true;
|
||||||
|
if_sdio_power_off(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
dev_info(dev, "%s: suspend: PM flags = 0x%x\n",
|
dev_info(dev, "%s: suspend: PM flags = 0x%x\n",
|
||||||
sdio_func_id(func), flags);
|
sdio_func_id(func), flags);
|
||||||
|
@ -1357,9 +1365,14 @@ static int if_sdio_suspend(struct device *dev)
|
||||||
/* If we aren't being asked to wake on anything, we should bail out
|
/* If we aren't being asked to wake on anything, we should bail out
|
||||||
* and let the SD stack power down the card.
|
* and let the SD stack power down the card.
|
||||||
*/
|
*/
|
||||||
if (card->priv->wol_criteria == EHS_REMOVE_WAKEUP) {
|
if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
|
||||||
dev_info(dev, "Suspend without wake params -- powering down card\n");
|
dev_info(dev, "Suspend without wake params -- powering down card\n");
|
||||||
return -ENOSYS;
|
if (priv->fw_ready) {
|
||||||
|
priv->power_up_on_resume = true;
|
||||||
|
if_sdio_power_off(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & MMC_PM_KEEP_POWER)) {
|
if (!(flags & MMC_PM_KEEP_POWER)) {
|
||||||
|
@ -1372,7 +1385,7 @@ static int if_sdio_suspend(struct device *dev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = lbs_suspend(card->priv);
|
ret = lbs_suspend(priv);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -1387,6 +1400,11 @@ static int if_sdio_resume(struct device *dev)
|
||||||
|
|
||||||
dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func));
|
dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func));
|
||||||
|
|
||||||
|
if (card->priv->power_up_on_resume) {
|
||||||
|
if_sdio_power_on(card);
|
||||||
|
wait_event(card->pwron_waitq, card->priv->fw_ready);
|
||||||
|
}
|
||||||
|
|
||||||
ret = lbs_resume(card->priv);
|
ret = lbs_resume(card->priv);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -748,9 +748,9 @@ u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd,
|
||||||
* overshoots the remainder by 4 bytes, assume it was
|
* overshoots the remainder by 4 bytes, assume it was
|
||||||
* including 'status'.
|
* including 'status'.
|
||||||
*/
|
*/
|
||||||
if (out_field[1] - 8 == remainder)
|
if (out_field[1] - 4 == remainder)
|
||||||
return remainder;
|
return remainder;
|
||||||
return out_field[1] - 4;
|
return out_field[1] - 8;
|
||||||
} else if (cmd == ND_CMD_CALL) {
|
} else if (cmd == ND_CMD_CALL) {
|
||||||
struct nd_cmd_pkg *pkg = (struct nd_cmd_pkg *) in_field;
|
struct nd_cmd_pkg *pkg = (struct nd_cmd_pkg *) in_field;
|
||||||
|
|
||||||
|
|
|
@ -382,6 +382,8 @@ static void ehrpwm_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
|
||||||
aqcsfrc_mask = AQCSFRC_CSFA_MASK;
|
aqcsfrc_mask = AQCSFRC_CSFA_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Update shadow register first before modifying active register */
|
||||||
|
ehrpwm_modify(pc->mmio_base, AQCSFRC, aqcsfrc_mask, aqcsfrc_val);
|
||||||
/*
|
/*
|
||||||
* Changes to immediate action on Action Qualifier. This puts
|
* Changes to immediate action on Action Qualifier. This puts
|
||||||
* Action Qualifier control on PWM output from next TBCLK
|
* Action Qualifier control on PWM output from next TBCLK
|
||||||
|
|
|
@ -817,13 +817,6 @@ static int omap_rtc_probe(struct platform_device *pdev)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc->is_pmic_controller) {
|
|
||||||
if (!pm_power_off) {
|
|
||||||
omap_rtc_power_off_rtc = rtc;
|
|
||||||
pm_power_off = omap_rtc_power_off;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Support ext_wakeup pinconf */
|
/* Support ext_wakeup pinconf */
|
||||||
rtc_pinctrl_desc.name = dev_name(&pdev->dev);
|
rtc_pinctrl_desc.name = dev_name(&pdev->dev);
|
||||||
|
|
||||||
|
@ -833,6 +826,13 @@ static int omap_rtc_probe(struct platform_device *pdev)
|
||||||
return PTR_ERR(rtc->pctldev);
|
return PTR_ERR(rtc->pctldev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rtc->is_pmic_controller) {
|
||||||
|
if (!pm_power_off) {
|
||||||
|
omap_rtc_power_off_rtc = rtc;
|
||||||
|
pm_power_off = omap_rtc_power_off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
|
|
@ -215,7 +215,7 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
|
||||||
pdata = &dspi->pdata;
|
pdata = &dspi->pdata;
|
||||||
|
|
||||||
/* program delay transfers if tx_delay is non zero */
|
/* program delay transfers if tx_delay is non zero */
|
||||||
if (spicfg->wdelay)
|
if (spicfg && spicfg->wdelay)
|
||||||
spidat1 |= SPIDAT1_WDEL;
|
spidat1 |= SPIDAT1_WDEL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -715,21 +715,6 @@ static int dspi_probe(struct platform_device *pdev)
|
||||||
return PTR_ERR(dspi->regmap);
|
return PTR_ERR(dspi->regmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
dspi_init(dspi);
|
|
||||||
dspi->irq = platform_get_irq(pdev, 0);
|
|
||||||
if (dspi->irq < 0) {
|
|
||||||
dev_err(&pdev->dev, "can't get platform irq\n");
|
|
||||||
ret = dspi->irq;
|
|
||||||
goto out_master_put;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = devm_request_irq(&pdev->dev, dspi->irq, dspi_interrupt, 0,
|
|
||||||
pdev->name, dspi);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(&pdev->dev, "Unable to attach DSPI interrupt\n");
|
|
||||||
goto out_master_put;
|
|
||||||
}
|
|
||||||
|
|
||||||
dspi->clk = devm_clk_get(&pdev->dev, "dspi");
|
dspi->clk = devm_clk_get(&pdev->dev, "dspi");
|
||||||
if (IS_ERR(dspi->clk)) {
|
if (IS_ERR(dspi->clk)) {
|
||||||
ret = PTR_ERR(dspi->clk);
|
ret = PTR_ERR(dspi->clk);
|
||||||
|
@ -740,6 +725,21 @@ static int dspi_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_master_put;
|
goto out_master_put;
|
||||||
|
|
||||||
|
dspi_init(dspi);
|
||||||
|
dspi->irq = platform_get_irq(pdev, 0);
|
||||||
|
if (dspi->irq < 0) {
|
||||||
|
dev_err(&pdev->dev, "can't get platform irq\n");
|
||||||
|
ret = dspi->irq;
|
||||||
|
goto out_clk_put;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = devm_request_irq(&pdev->dev, dspi->irq, dspi_interrupt, 0,
|
||||||
|
pdev->name, dspi);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(&pdev->dev, "Unable to attach DSPI interrupt\n");
|
||||||
|
goto out_clk_put;
|
||||||
|
}
|
||||||
|
|
||||||
master->max_speed_hz =
|
master->max_speed_hz =
|
||||||
clk_get_rate(dspi->clk) / dspi->devtype_data->max_clock_factor;
|
clk_get_rate(dspi->clk) / dspi->devtype_data->max_clock_factor;
|
||||||
|
|
||||||
|
|
|
@ -175,6 +175,7 @@ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state,
|
||||||
{
|
{
|
||||||
struct uart_port *uport = uart_port_check(state);
|
struct uart_port *uport = uart_port_check(state);
|
||||||
unsigned long page;
|
unsigned long page;
|
||||||
|
unsigned long flags = 0;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
if (uport->type == PORT_UNKNOWN)
|
if (uport->type == PORT_UNKNOWN)
|
||||||
|
@ -189,15 +190,18 @@ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state,
|
||||||
* Initialise and allocate the transmit and temporary
|
* Initialise and allocate the transmit and temporary
|
||||||
* buffer.
|
* buffer.
|
||||||
*/
|
*/
|
||||||
if (!state->xmit.buf) {
|
page = get_zeroed_page(GFP_KERNEL);
|
||||||
/* This is protected by the per port mutex */
|
if (!page)
|
||||||
page = get_zeroed_page(GFP_KERNEL);
|
return -ENOMEM;
|
||||||
if (!page)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
|
uart_port_lock(state, flags);
|
||||||
|
if (!state->xmit.buf) {
|
||||||
state->xmit.buf = (unsigned char *) page;
|
state->xmit.buf = (unsigned char *) page;
|
||||||
uart_circ_clear(&state->xmit);
|
uart_circ_clear(&state->xmit);
|
||||||
|
} else {
|
||||||
|
free_page(page);
|
||||||
}
|
}
|
||||||
|
uart_port_unlock(uport, flags);
|
||||||
|
|
||||||
retval = uport->ops->startup(uport);
|
retval = uport->ops->startup(uport);
|
||||||
if (retval == 0) {
|
if (retval == 0) {
|
||||||
|
@ -256,6 +260,7 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
|
||||||
{
|
{
|
||||||
struct uart_port *uport = uart_port_check(state);
|
struct uart_port *uport = uart_port_check(state);
|
||||||
struct tty_port *port = &state->port;
|
struct tty_port *port = &state->port;
|
||||||
|
unsigned long flags = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the TTY IO error marker
|
* Set the TTY IO error marker
|
||||||
|
@ -288,10 +293,12 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
|
||||||
/*
|
/*
|
||||||
* Free the transmit buffer page.
|
* Free the transmit buffer page.
|
||||||
*/
|
*/
|
||||||
|
uart_port_lock(state, flags);
|
||||||
if (state->xmit.buf) {
|
if (state->xmit.buf) {
|
||||||
free_page((unsigned long)state->xmit.buf);
|
free_page((unsigned long)state->xmit.buf);
|
||||||
state->xmit.buf = NULL;
|
state->xmit.buf = NULL;
|
||||||
}
|
}
|
||||||
|
uart_port_unlock(uport, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1695,12 +1695,12 @@ static int do_register_framebuffer(struct fb_info *fb_info)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_unregister_framebuffer(struct fb_info *fb_info)
|
static int unbind_console(struct fb_info *fb_info)
|
||||||
{
|
{
|
||||||
struct fb_event event;
|
struct fb_event event;
|
||||||
int i, ret = 0;
|
int ret;
|
||||||
|
int i = fb_info->node;
|
||||||
|
|
||||||
i = fb_info->node;
|
|
||||||
if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info)
|
if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -1715,17 +1715,29 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
|
||||||
unlock_fb_info(fb_info);
|
unlock_fb_info(fb_info);
|
||||||
console_unlock();
|
console_unlock();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __unlink_framebuffer(struct fb_info *fb_info);
|
||||||
|
|
||||||
|
static int do_unregister_framebuffer(struct fb_info *fb_info)
|
||||||
|
{
|
||||||
|
struct fb_event event;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = unbind_console(fb_info);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
pm_vt_switch_unregister(fb_info->dev);
|
pm_vt_switch_unregister(fb_info->dev);
|
||||||
|
|
||||||
unlink_framebuffer(fb_info);
|
__unlink_framebuffer(fb_info);
|
||||||
if (fb_info->pixmap.addr &&
|
if (fb_info->pixmap.addr &&
|
||||||
(fb_info->pixmap.flags & FB_PIXMAP_DEFAULT))
|
(fb_info->pixmap.flags & FB_PIXMAP_DEFAULT))
|
||||||
kfree(fb_info->pixmap.addr);
|
kfree(fb_info->pixmap.addr);
|
||||||
fb_destroy_modelist(&fb_info->modelist);
|
fb_destroy_modelist(&fb_info->modelist);
|
||||||
registered_fb[i] = NULL;
|
registered_fb[fb_info->node] = NULL;
|
||||||
num_registered_fb--;
|
num_registered_fb--;
|
||||||
fb_cleanup_device(fb_info);
|
fb_cleanup_device(fb_info);
|
||||||
event.info = fb_info;
|
event.info = fb_info;
|
||||||
|
@ -1738,7 +1750,7 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int unlink_framebuffer(struct fb_info *fb_info)
|
static int __unlink_framebuffer(struct fb_info *fb_info)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -1750,6 +1762,20 @@ int unlink_framebuffer(struct fb_info *fb_info)
|
||||||
device_destroy(fb_class, MKDEV(FB_MAJOR, i));
|
device_destroy(fb_class, MKDEV(FB_MAJOR, i));
|
||||||
fb_info->dev = NULL;
|
fb_info->dev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int unlink_framebuffer(struct fb_info *fb_info)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = __unlink_framebuffer(fb_info);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
unbind_console(fb_info);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(unlink_framebuffer);
|
EXPORT_SYMBOL(unlink_framebuffer);
|
||||||
|
|
|
@ -105,7 +105,7 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name,
|
||||||
{
|
{
|
||||||
struct kvec kvec = {.iov_base = (void *)value, .iov_len = value_len};
|
struct kvec kvec = {.iov_base = (void *)value, .iov_len = value_len};
|
||||||
struct iov_iter from;
|
struct iov_iter from;
|
||||||
int retval;
|
int retval, err;
|
||||||
|
|
||||||
iov_iter_kvec(&from, WRITE | ITER_KVEC, &kvec, 1, value_len);
|
iov_iter_kvec(&from, WRITE | ITER_KVEC, &kvec, 1, value_len);
|
||||||
|
|
||||||
|
@ -126,7 +126,9 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name,
|
||||||
retval);
|
retval);
|
||||||
else
|
else
|
||||||
p9_client_write(fid, 0, &from, &retval);
|
p9_client_write(fid, 0, &from, &retval);
|
||||||
p9_client_clunk(fid);
|
err = p9_client_clunk(fid);
|
||||||
|
if (!retval && err)
|
||||||
|
retval = err;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ static bool bl_map_stripe(struct pnfs_block_dev *dev, u64 offset,
|
||||||
chunk = div_u64(offset, dev->chunk_size);
|
chunk = div_u64(offset, dev->chunk_size);
|
||||||
div_u64_rem(chunk, dev->nr_children, &chunk_idx);
|
div_u64_rem(chunk, dev->nr_children, &chunk_idx);
|
||||||
|
|
||||||
if (chunk_idx > dev->nr_children) {
|
if (chunk_idx >= dev->nr_children) {
|
||||||
dprintk("%s: invalid chunk idx %d (%lld/%lld)\n",
|
dprintk("%s: invalid chunk idx %d (%lld/%lld)\n",
|
||||||
__func__, chunk_idx, offset, dev->chunk_size);
|
__func__, chunk_idx, offset, dev->chunk_size);
|
||||||
/* error, should not happen */
|
/* error, should not happen */
|
||||||
|
|
|
@ -541,8 +541,15 @@ nfs4_async_handle_exception(struct rpc_task *task, struct nfs_server *server,
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
return ret;
|
return ret;
|
||||||
out_retry:
|
out_retry:
|
||||||
if (ret == 0)
|
if (ret == 0) {
|
||||||
exception->retry = 1;
|
exception->retry = 1;
|
||||||
|
/*
|
||||||
|
* For NFS4ERR_MOVED, the client transport will need to
|
||||||
|
* be recomputed after migration recovery has completed.
|
||||||
|
*/
|
||||||
|
if (errorcode == -NFS4ERR_MOVED)
|
||||||
|
rpc_task_release_transport(task);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <linux/quotaops.h>
|
#include <linux/quotaops.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/writeback.h>
|
#include <linux/writeback.h>
|
||||||
|
#include <linux/nospec.h>
|
||||||
|
|
||||||
static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
|
static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
|
||||||
qid_t id)
|
qid_t id)
|
||||||
|
@ -706,6 +707,7 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id,
|
||||||
|
|
||||||
if (type >= (XQM_COMMAND(cmd) ? XQM_MAXQUOTAS : MAXQUOTAS))
|
if (type >= (XQM_COMMAND(cmd) ? XQM_MAXQUOTAS : MAXQUOTAS))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
type = array_index_nospec(type, MAXQUOTAS);
|
||||||
/*
|
/*
|
||||||
* Quota not supported on this fs? Check this before s_quota_types
|
* Quota not supported on this fs? Check this before s_quota_types
|
||||||
* since they needn't be set if quota is not supported at all.
|
* since they needn't be set if quota is not supported at all.
|
||||||
|
|
|
@ -661,6 +661,11 @@ int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir,
|
||||||
spin_lock(&ui->ui_lock);
|
spin_lock(&ui->ui_lock);
|
||||||
ui->synced_i_size = ui->ui_size;
|
ui->synced_i_size = ui->ui_size;
|
||||||
spin_unlock(&ui->ui_lock);
|
spin_unlock(&ui->ui_lock);
|
||||||
|
if (xent) {
|
||||||
|
spin_lock(&host_ui->ui_lock);
|
||||||
|
host_ui->synced_i_size = host_ui->ui_size;
|
||||||
|
spin_unlock(&host_ui->ui_lock);
|
||||||
|
}
|
||||||
mark_inode_clean(c, ui);
|
mark_inode_clean(c, ui);
|
||||||
mark_inode_clean(c, host_ui);
|
mark_inode_clean(c, host_ui);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1265,7 +1270,7 @@ static int recomp_data_node(const struct ubifs_info *c,
|
||||||
int err, len, compr_type, out_len;
|
int err, len, compr_type, out_len;
|
||||||
|
|
||||||
out_len = le32_to_cpu(dn->size);
|
out_len = le32_to_cpu(dn->size);
|
||||||
buf = kmalloc_array(out_len, WORST_COMPR_FACTOR, GFP_NOFS);
|
buf = kmalloc(out_len * WORST_COMPR_FACTOR, GFP_NOFS);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -1344,7 +1349,16 @@ int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
|
||||||
else if (err)
|
else if (err)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
else {
|
else {
|
||||||
if (le32_to_cpu(dn->size) <= dlen)
|
int dn_len = le32_to_cpu(dn->size);
|
||||||
|
|
||||||
|
if (dn_len <= 0 || dn_len > UBIFS_BLOCK_SIZE) {
|
||||||
|
ubifs_err(c, "bad data node (block %u, inode %lu)",
|
||||||
|
blk, inode->i_ino);
|
||||||
|
ubifs_dump_node(c, dn);
|
||||||
|
goto out_free;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dn_len <= dlen)
|
||||||
dlen = 0; /* Nothing to do */
|
dlen = 0; /* Nothing to do */
|
||||||
else {
|
else {
|
||||||
int compr_type = le16_to_cpu(dn->compr_type);
|
int compr_type = le16_to_cpu(dn->compr_type);
|
||||||
|
|
|
@ -1091,10 +1091,6 @@ static int scan_check_cb(struct ubifs_info *c,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
|
|
||||||
if (!buf)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* After an unclean unmount, empty and freeable LEBs
|
* After an unclean unmount, empty and freeable LEBs
|
||||||
* may contain garbage - do not scan them.
|
* may contain garbage - do not scan them.
|
||||||
|
@ -1113,6 +1109,10 @@ static int scan_check_cb(struct ubifs_info *c,
|
||||||
return LPT_SCAN_CONTINUE;
|
return LPT_SCAN_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
|
||||||
|
if (!buf)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
sleb = ubifs_scan(c, lnum, 0, buf, 0);
|
sleb = ubifs_scan(c, lnum, 0, buf, 0);
|
||||||
if (IS_ERR(sleb)) {
|
if (IS_ERR(sleb)) {
|
||||||
ret = PTR_ERR(sleb);
|
ret = PTR_ERR(sleb);
|
||||||
|
|
|
@ -540,7 +540,7 @@ getxattr(struct dentry *d, const char __user *name, void __user *value,
|
||||||
if (error > 0) {
|
if (error > 0) {
|
||||||
if ((strcmp(kname, XATTR_NAME_POSIX_ACL_ACCESS) == 0) ||
|
if ((strcmp(kname, XATTR_NAME_POSIX_ACL_ACCESS) == 0) ||
|
||||||
(strcmp(kname, XATTR_NAME_POSIX_ACL_DEFAULT) == 0))
|
(strcmp(kname, XATTR_NAME_POSIX_ACL_DEFAULT) == 0))
|
||||||
posix_acl_fix_xattr_to_user(kvalue, size);
|
posix_acl_fix_xattr_to_user(kvalue, error);
|
||||||
if (size && copy_to_user(value, kvalue, error))
|
if (size && copy_to_user(value, kvalue, error))
|
||||||
error = -EFAULT;
|
error = -EFAULT;
|
||||||
} else if (error == -ERANGE && size >= XATTR_SIZE_MAX) {
|
} else if (error == -ERANGE && size >= XATTR_SIZE_MAX) {
|
||||||
|
|
|
@ -125,6 +125,7 @@ static inline void dmar_writeq(void __iomem *addr, u64 val)
|
||||||
* Extended Capability Register
|
* Extended Capability Register
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define ecap_dit(e) ((e >> 41) & 0x1)
|
||||||
#define ecap_pasid(e) ((e >> 40) & 0x1)
|
#define ecap_pasid(e) ((e >> 40) & 0x1)
|
||||||
#define ecap_pss(e) ((e >> 35) & 0x1f)
|
#define ecap_pss(e) ((e >> 35) & 0x1f)
|
||||||
#define ecap_eafs(e) ((e >> 34) & 0x1)
|
#define ecap_eafs(e) ((e >> 34) & 0x1)
|
||||||
|
@ -294,6 +295,7 @@ enum {
|
||||||
#define QI_DEV_IOTLB_SID(sid) ((u64)((sid) & 0xffff) << 32)
|
#define QI_DEV_IOTLB_SID(sid) ((u64)((sid) & 0xffff) << 32)
|
||||||
#define QI_DEV_IOTLB_QDEP(qdep) (((qdep) & 0x1f) << 16)
|
#define QI_DEV_IOTLB_QDEP(qdep) (((qdep) & 0x1f) << 16)
|
||||||
#define QI_DEV_IOTLB_ADDR(addr) ((u64)(addr) & VTD_PAGE_MASK)
|
#define QI_DEV_IOTLB_ADDR(addr) ((u64)(addr) & VTD_PAGE_MASK)
|
||||||
|
#define QI_DEV_IOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52))
|
||||||
#define QI_DEV_IOTLB_SIZE 1
|
#define QI_DEV_IOTLB_SIZE 1
|
||||||
#define QI_DEV_IOTLB_MAX_INVS 32
|
#define QI_DEV_IOTLB_MAX_INVS 32
|
||||||
|
|
||||||
|
@ -318,6 +320,7 @@ enum {
|
||||||
#define QI_DEV_EIOTLB_PASID(p) (((u64)p) << 32)
|
#define QI_DEV_EIOTLB_PASID(p) (((u64)p) << 32)
|
||||||
#define QI_DEV_EIOTLB_SID(sid) ((u64)((sid) & 0xffff) << 16)
|
#define QI_DEV_EIOTLB_SID(sid) ((u64)((sid) & 0xffff) << 16)
|
||||||
#define QI_DEV_EIOTLB_QDEP(qd) ((u64)((qd) & 0x1f) << 4)
|
#define QI_DEV_EIOTLB_QDEP(qd) ((u64)((qd) & 0x1f) << 4)
|
||||||
|
#define QI_DEV_EIOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52))
|
||||||
#define QI_DEV_EIOTLB_MAX_INVS 32
|
#define QI_DEV_EIOTLB_MAX_INVS 32
|
||||||
|
|
||||||
#define QI_PGRP_IDX(idx) (((u64)(idx)) << 55)
|
#define QI_PGRP_IDX(idx) (((u64)(idx)) << 55)
|
||||||
|
@ -463,9 +466,8 @@ extern void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid,
|
||||||
u8 fm, u64 type);
|
u8 fm, u64 type);
|
||||||
extern void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
|
extern void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
|
||||||
unsigned int size_order, u64 type);
|
unsigned int size_order, u64 type);
|
||||||
extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
|
extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 pfsid,
|
||||||
u64 addr, unsigned mask);
|
u16 qdep, u64 addr, unsigned mask);
|
||||||
|
|
||||||
extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
|
extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
|
||||||
|
|
||||||
extern int dmar_ir_support(void);
|
extern int dmar_ir_support(void);
|
||||||
|
|
|
@ -2151,4 +2151,16 @@ static inline bool pci_ari_enabled(struct pci_bus *bus)
|
||||||
/* provide the legacy pci_dma_* API */
|
/* provide the legacy pci_dma_* API */
|
||||||
#include <linux/pci-dma-compat.h>
|
#include <linux/pci-dma-compat.h>
|
||||||
|
|
||||||
|
#define pci_printk(level, pdev, fmt, arg...) \
|
||||||
|
dev_printk(level, &(pdev)->dev, fmt, ##arg)
|
||||||
|
|
||||||
|
#define pci_emerg(pdev, fmt, arg...) dev_emerg(&(pdev)->dev, fmt, ##arg)
|
||||||
|
#define pci_alert(pdev, fmt, arg...) dev_alert(&(pdev)->dev, fmt, ##arg)
|
||||||
|
#define pci_crit(pdev, fmt, arg...) dev_crit(&(pdev)->dev, fmt, ##arg)
|
||||||
|
#define pci_err(pdev, fmt, arg...) dev_err(&(pdev)->dev, fmt, ##arg)
|
||||||
|
#define pci_warn(pdev, fmt, arg...) dev_warn(&(pdev)->dev, fmt, ##arg)
|
||||||
|
#define pci_notice(pdev, fmt, arg...) dev_notice(&(pdev)->dev, fmt, ##arg)
|
||||||
|
#define pci_info(pdev, fmt, arg...) dev_info(&(pdev)->dev, fmt, ##arg)
|
||||||
|
#define pci_dbg(pdev, fmt, arg...) dev_dbg(&(pdev)->dev, fmt, ##arg)
|
||||||
|
|
||||||
#endif /* LINUX_PCI_H */
|
#endif /* LINUX_PCI_H */
|
||||||
|
|
|
@ -155,6 +155,7 @@ int rpc_switch_client_transport(struct rpc_clnt *,
|
||||||
|
|
||||||
void rpc_shutdown_client(struct rpc_clnt *);
|
void rpc_shutdown_client(struct rpc_clnt *);
|
||||||
void rpc_release_client(struct rpc_clnt *);
|
void rpc_release_client(struct rpc_clnt *);
|
||||||
|
void rpc_task_release_transport(struct rpc_task *);
|
||||||
void rpc_task_release_client(struct rpc_task *);
|
void rpc_task_release_client(struct rpc_task *);
|
||||||
|
|
||||||
int rpcb_create_local(struct net *);
|
int rpcb_create_local(struct net *);
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
#ifndef _LINUX_VERIFICATION_H
|
#ifndef _LINUX_VERIFICATION_H
|
||||||
#define _LINUX_VERIFICATION_H
|
#define _LINUX_VERIFICATION_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Indicate that both builtin trusted keys and secondary trusted keys
|
||||||
|
* should be used.
|
||||||
|
*/
|
||||||
|
#define VERIFY_USE_SECONDARY_KEYRING ((struct key *)1UL)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The use to which an asymmetric key is being put.
|
* The use to which an asymmetric key is being put.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -87,7 +87,7 @@ struct dlfb_data {
|
||||||
#define MIN_RAW_PIX_BYTES 2
|
#define MIN_RAW_PIX_BYTES 2
|
||||||
#define MIN_RAW_CMD_BYTES (RAW_HEADER_BYTES + MIN_RAW_PIX_BYTES)
|
#define MIN_RAW_CMD_BYTES (RAW_HEADER_BYTES + MIN_RAW_PIX_BYTES)
|
||||||
|
|
||||||
#define DL_DEFIO_WRITE_DELAY 5 /* fb_deferred_io.delay in jiffies */
|
#define DL_DEFIO_WRITE_DELAY msecs_to_jiffies(HZ <= 300 ? 4 : 10) /* optimal value for 720p video */
|
||||||
#define DL_DEFIO_WRITE_DISABLE (HZ*60) /* "disable" with long delay */
|
#define DL_DEFIO_WRITE_DISABLE (HZ*60) /* "disable" with long delay */
|
||||||
|
|
||||||
/* remove these once align.h patch is taken into kernel */
|
/* remove these once align.h patch is taken into kernel */
|
||||||
|
|
|
@ -106,6 +106,7 @@ config PM_SLEEP
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on SUSPEND || HIBERNATE_CALLBACKS
|
depends on SUSPEND || HIBERNATE_CALLBACKS
|
||||||
select PM
|
select PM
|
||||||
|
select SRCU
|
||||||
|
|
||||||
config PM_SLEEP_SMP
|
config PM_SLEEP_SMP
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
|
@ -260,12 +260,12 @@ void __init printk_nmi_init(void)
|
||||||
printk_nmi_flush();
|
printk_nmi_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
void printk_nmi_enter(void)
|
void notrace printk_nmi_enter(void)
|
||||||
{
|
{
|
||||||
this_cpu_write(printk_func, vprintk_nmi);
|
this_cpu_write(printk_func, vprintk_nmi);
|
||||||
}
|
}
|
||||||
|
|
||||||
void printk_nmi_exit(void)
|
void notrace printk_nmi_exit(void)
|
||||||
{
|
{
|
||||||
this_cpu_write(printk_func, vprintk_default);
|
this_cpu_write(printk_func, vprintk_default);
|
||||||
}
|
}
|
||||||
|
|
95
kernel/sys.c
95
kernel/sys.c
|
@ -1144,18 +1144,19 @@ static int override_release(char __user *release, size_t len)
|
||||||
|
|
||||||
SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
|
SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
|
||||||
{
|
{
|
||||||
int errno = 0;
|
struct new_utsname tmp;
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
if (copy_to_user(name, utsname(), sizeof *name))
|
memcpy(&tmp, utsname(), sizeof(tmp));
|
||||||
errno = -EFAULT;
|
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
|
if (copy_to_user(name, &tmp, sizeof(tmp)))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
if (!errno && override_release(name->release, sizeof(name->release)))
|
if (override_release(name->release, sizeof(name->release)))
|
||||||
errno = -EFAULT;
|
return -EFAULT;
|
||||||
if (!errno && override_architecture(name))
|
if (override_architecture(name))
|
||||||
errno = -EFAULT;
|
return -EFAULT;
|
||||||
return errno;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __ARCH_WANT_SYS_OLD_UNAME
|
#ifdef __ARCH_WANT_SYS_OLD_UNAME
|
||||||
|
@ -1164,55 +1165,46 @@ SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
|
||||||
*/
|
*/
|
||||||
SYSCALL_DEFINE1(uname, struct old_utsname __user *, name)
|
SYSCALL_DEFINE1(uname, struct old_utsname __user *, name)
|
||||||
{
|
{
|
||||||
int error = 0;
|
struct old_utsname tmp;
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
if (copy_to_user(name, utsname(), sizeof(*name)))
|
memcpy(&tmp, utsname(), sizeof(tmp));
|
||||||
error = -EFAULT;
|
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
|
if (copy_to_user(name, &tmp, sizeof(tmp)))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
if (!error && override_release(name->release, sizeof(name->release)))
|
if (override_release(name->release, sizeof(name->release)))
|
||||||
error = -EFAULT;
|
return -EFAULT;
|
||||||
if (!error && override_architecture(name))
|
if (override_architecture(name))
|
||||||
error = -EFAULT;
|
return -EFAULT;
|
||||||
return error;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
|
SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
|
||||||
{
|
{
|
||||||
int error;
|
struct oldold_utsname tmp = {};
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
|
|
||||||
return -EFAULT;
|
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
error = __copy_to_user(&name->sysname, &utsname()->sysname,
|
memcpy(&tmp.sysname, &utsname()->sysname, __OLD_UTS_LEN);
|
||||||
__OLD_UTS_LEN);
|
memcpy(&tmp.nodename, &utsname()->nodename, __OLD_UTS_LEN);
|
||||||
error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
|
memcpy(&tmp.release, &utsname()->release, __OLD_UTS_LEN);
|
||||||
error |= __copy_to_user(&name->nodename, &utsname()->nodename,
|
memcpy(&tmp.version, &utsname()->version, __OLD_UTS_LEN);
|
||||||
__OLD_UTS_LEN);
|
memcpy(&tmp.machine, &utsname()->machine, __OLD_UTS_LEN);
|
||||||
error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
|
|
||||||
error |= __copy_to_user(&name->release, &utsname()->release,
|
|
||||||
__OLD_UTS_LEN);
|
|
||||||
error |= __put_user(0, name->release + __OLD_UTS_LEN);
|
|
||||||
error |= __copy_to_user(&name->version, &utsname()->version,
|
|
||||||
__OLD_UTS_LEN);
|
|
||||||
error |= __put_user(0, name->version + __OLD_UTS_LEN);
|
|
||||||
error |= __copy_to_user(&name->machine, &utsname()->machine,
|
|
||||||
__OLD_UTS_LEN);
|
|
||||||
error |= __put_user(0, name->machine + __OLD_UTS_LEN);
|
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
|
if (copy_to_user(name, &tmp, sizeof(tmp)))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
if (!error && override_architecture(name))
|
if (override_architecture(name))
|
||||||
error = -EFAULT;
|
return -EFAULT;
|
||||||
if (!error && override_release(name->release, sizeof(name->release)))
|
if (override_release(name->release, sizeof(name->release)))
|
||||||
error = -EFAULT;
|
return -EFAULT;
|
||||||
return error ? -EFAULT : 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1226,17 +1218,18 @@ SYSCALL_DEFINE2(sethostname, char __user *, name, int, len)
|
||||||
|
|
||||||
if (len < 0 || len > __NEW_UTS_LEN)
|
if (len < 0 || len > __NEW_UTS_LEN)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
down_write(&uts_sem);
|
|
||||||
errno = -EFAULT;
|
errno = -EFAULT;
|
||||||
if (!copy_from_user(tmp, name, len)) {
|
if (!copy_from_user(tmp, name, len)) {
|
||||||
struct new_utsname *u = utsname();
|
struct new_utsname *u;
|
||||||
|
|
||||||
|
down_write(&uts_sem);
|
||||||
|
u = utsname();
|
||||||
memcpy(u->nodename, tmp, len);
|
memcpy(u->nodename, tmp, len);
|
||||||
memset(u->nodename + len, 0, sizeof(u->nodename) - len);
|
memset(u->nodename + len, 0, sizeof(u->nodename) - len);
|
||||||
errno = 0;
|
errno = 0;
|
||||||
uts_proc_notify(UTS_PROC_HOSTNAME);
|
uts_proc_notify(UTS_PROC_HOSTNAME);
|
||||||
|
up_write(&uts_sem);
|
||||||
}
|
}
|
||||||
up_write(&uts_sem);
|
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1244,8 +1237,9 @@ SYSCALL_DEFINE2(sethostname, char __user *, name, int, len)
|
||||||
|
|
||||||
SYSCALL_DEFINE2(gethostname, char __user *, name, int, len)
|
SYSCALL_DEFINE2(gethostname, char __user *, name, int, len)
|
||||||
{
|
{
|
||||||
int i, errno;
|
int i;
|
||||||
struct new_utsname *u;
|
struct new_utsname *u;
|
||||||
|
char tmp[__NEW_UTS_LEN + 1];
|
||||||
|
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1254,11 +1248,11 @@ SYSCALL_DEFINE2(gethostname, char __user *, name, int, len)
|
||||||
i = 1 + strlen(u->nodename);
|
i = 1 + strlen(u->nodename);
|
||||||
if (i > len)
|
if (i > len)
|
||||||
i = len;
|
i = len;
|
||||||
errno = 0;
|
memcpy(tmp, u->nodename, i);
|
||||||
if (copy_to_user(name, u->nodename, i))
|
|
||||||
errno = -EFAULT;
|
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
return errno;
|
if (copy_to_user(name, tmp, i))
|
||||||
|
return -EFAULT;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1277,17 +1271,18 @@ SYSCALL_DEFINE2(setdomainname, char __user *, name, int, len)
|
||||||
if (len < 0 || len > __NEW_UTS_LEN)
|
if (len < 0 || len > __NEW_UTS_LEN)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
down_write(&uts_sem);
|
|
||||||
errno = -EFAULT;
|
errno = -EFAULT;
|
||||||
if (!copy_from_user(tmp, name, len)) {
|
if (!copy_from_user(tmp, name, len)) {
|
||||||
struct new_utsname *u = utsname();
|
struct new_utsname *u;
|
||||||
|
|
||||||
|
down_write(&uts_sem);
|
||||||
|
u = utsname();
|
||||||
memcpy(u->domainname, tmp, len);
|
memcpy(u->domainname, tmp, len);
|
||||||
memset(u->domainname + len, 0, sizeof(u->domainname) - len);
|
memset(u->domainname + len, 0, sizeof(u->domainname) - len);
|
||||||
errno = 0;
|
errno = 0;
|
||||||
uts_proc_notify(UTS_PROC_DOMAINNAME);
|
uts_proc_notify(UTS_PROC_DOMAINNAME);
|
||||||
|
up_write(&uts_sem);
|
||||||
}
|
}
|
||||||
up_write(&uts_sem);
|
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1720,6 +1720,10 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev,
|
||||||
mutex_lock(&bdev->bd_mutex);
|
mutex_lock(&bdev->bd_mutex);
|
||||||
|
|
||||||
if (attr == &dev_attr_enable) {
|
if (attr == &dev_attr_enable) {
|
||||||
|
if (!!value == !!q->blk_trace) {
|
||||||
|
ret = 0;
|
||||||
|
goto out_unlock_bdev;
|
||||||
|
}
|
||||||
if (value)
|
if (value)
|
||||||
ret = blk_trace_setup_queue(q, bdev);
|
ret = blk_trace_setup_queue(q, bdev);
|
||||||
else
|
else
|
||||||
|
|
|
@ -7072,7 +7072,9 @@ rb_simple_write(struct file *filp, const char __user *ubuf,
|
||||||
|
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
mutex_lock(&trace_types_lock);
|
mutex_lock(&trace_types_lock);
|
||||||
if (val) {
|
if (!!val == tracer_tracing_is_on(tr)) {
|
||||||
|
val = 0; /* do nothing */
|
||||||
|
} else if (val) {
|
||||||
tracer_tracing_on(tr);
|
tracer_tracing_on(tr);
|
||||||
if (tr->current_trace->start)
|
if (tr->current_trace->start)
|
||||||
tr->current_trace->start(tr);
|
tr->current_trace->start(tr);
|
||||||
|
|
|
@ -969,7 +969,7 @@ probe_event_disable(struct trace_uprobe *tu, struct trace_event_file *file)
|
||||||
|
|
||||||
list_del_rcu(&link->list);
|
list_del_rcu(&link->list);
|
||||||
/* synchronize with u{,ret}probe_trace_func */
|
/* synchronize with u{,ret}probe_trace_func */
|
||||||
synchronize_sched();
|
synchronize_rcu();
|
||||||
kfree(link);
|
kfree(link);
|
||||||
|
|
||||||
if (!list_empty(&tu->tp.files))
|
if (!list_empty(&tu->tp.files))
|
||||||
|
|
|
@ -649,7 +649,16 @@ static ssize_t map_write(struct file *file, const char __user *buf,
|
||||||
unsigned idx;
|
unsigned idx;
|
||||||
struct uid_gid_extent *extent = NULL;
|
struct uid_gid_extent *extent = NULL;
|
||||||
char *kbuf = NULL, *pos, *next_line;
|
char *kbuf = NULL, *pos, *next_line;
|
||||||
ssize_t ret = -EINVAL;
|
ssize_t ret;
|
||||||
|
|
||||||
|
/* Only allow < page size writes at the beginning of the file */
|
||||||
|
if ((*ppos != 0) || (count >= PAGE_SIZE))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
/* Slurp in the user data */
|
||||||
|
kbuf = memdup_user_nul(buf, count);
|
||||||
|
if (IS_ERR(kbuf))
|
||||||
|
return PTR_ERR(kbuf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The userns_state_mutex serializes all writes to any given map.
|
* The userns_state_mutex serializes all writes to any given map.
|
||||||
|
@ -683,19 +692,6 @@ static ssize_t map_write(struct file *file, const char __user *buf,
|
||||||
if (cap_valid(cap_setid) && !file_ns_capable(file, ns, CAP_SYS_ADMIN))
|
if (cap_valid(cap_setid) && !file_ns_capable(file, ns, CAP_SYS_ADMIN))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Only allow < page size writes at the beginning of the file */
|
|
||||||
ret = -EINVAL;
|
|
||||||
if ((*ppos != 0) || (count >= PAGE_SIZE))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* Slurp in the user data */
|
|
||||||
kbuf = memdup_user_nul(buf, count);
|
|
||||||
if (IS_ERR(kbuf)) {
|
|
||||||
ret = PTR_ERR(kbuf);
|
|
||||||
kbuf = NULL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Parse the user data */
|
/* Parse the user data */
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
pos = kbuf;
|
pos = kbuf;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_SYSCTL
|
#ifdef CONFIG_PROC_SYSCTL
|
||||||
|
|
||||||
static void *get_uts(struct ctl_table *table, int write)
|
static void *get_uts(struct ctl_table *table)
|
||||||
{
|
{
|
||||||
char *which = table->data;
|
char *which = table->data;
|
||||||
struct uts_namespace *uts_ns;
|
struct uts_namespace *uts_ns;
|
||||||
|
@ -25,21 +25,9 @@ static void *get_uts(struct ctl_table *table, int write)
|
||||||
uts_ns = current->nsproxy->uts_ns;
|
uts_ns = current->nsproxy->uts_ns;
|
||||||
which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
|
which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
|
||||||
|
|
||||||
if (!write)
|
|
||||||
down_read(&uts_sem);
|
|
||||||
else
|
|
||||||
down_write(&uts_sem);
|
|
||||||
return which;
|
return which;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void put_uts(struct ctl_table *table, int write, void *which)
|
|
||||||
{
|
|
||||||
if (!write)
|
|
||||||
up_read(&uts_sem);
|
|
||||||
else
|
|
||||||
up_write(&uts_sem);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Special case of dostring for the UTS structure. This has locks
|
* Special case of dostring for the UTS structure. This has locks
|
||||||
* to observe. Should this be in kernel/sys.c ????
|
* to observe. Should this be in kernel/sys.c ????
|
||||||
|
@ -49,13 +37,34 @@ static int proc_do_uts_string(struct ctl_table *table, int write,
|
||||||
{
|
{
|
||||||
struct ctl_table uts_table;
|
struct ctl_table uts_table;
|
||||||
int r;
|
int r;
|
||||||
memcpy(&uts_table, table, sizeof(uts_table));
|
char tmp_data[__NEW_UTS_LEN + 1];
|
||||||
uts_table.data = get_uts(table, write);
|
|
||||||
r = proc_dostring(&uts_table, write, buffer, lenp, ppos);
|
|
||||||
put_uts(table, write, uts_table.data);
|
|
||||||
|
|
||||||
if (write)
|
memcpy(&uts_table, table, sizeof(uts_table));
|
||||||
|
uts_table.data = tmp_data;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Buffer the value in tmp_data so that proc_dostring() can be called
|
||||||
|
* without holding any locks.
|
||||||
|
* We also need to read the original value in the write==1 case to
|
||||||
|
* support partial writes.
|
||||||
|
*/
|
||||||
|
down_read(&uts_sem);
|
||||||
|
memcpy(tmp_data, get_uts(table), sizeof(tmp_data));
|
||||||
|
up_read(&uts_sem);
|
||||||
|
r = proc_dostring(&uts_table, write, buffer, lenp, ppos);
|
||||||
|
|
||||||
|
if (write) {
|
||||||
|
/*
|
||||||
|
* Write back the new value.
|
||||||
|
* Note that, since we dropped uts_sem, the result can
|
||||||
|
* theoretically be incorrect if there are two parallel writes
|
||||||
|
* at non-zero offsets to the same sysctl.
|
||||||
|
*/
|
||||||
|
down_write(&uts_sem);
|
||||||
|
memcpy(get_uts(table), tmp_data, sizeof(tmp_data));
|
||||||
|
up_write(&uts_sem);
|
||||||
proc_sys_poll_notify(table->poll);
|
proc_sys_poll_notify(table->poll);
|
||||||
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,15 +373,6 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table)
|
||||||
{
|
{
|
||||||
struct mmu_table_batch **batch = &tlb->batch;
|
struct mmu_table_batch **batch = &tlb->batch;
|
||||||
|
|
||||||
/*
|
|
||||||
* When there's less then two users of this mm there cannot be a
|
|
||||||
* concurrent page-table walk.
|
|
||||||
*/
|
|
||||||
if (atomic_read(&tlb->mm->mm_users) < 2) {
|
|
||||||
__tlb_remove_table(table);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*batch == NULL) {
|
if (*batch == NULL) {
|
||||||
*batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
|
*batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
|
||||||
if (*batch == NULL) {
|
if (*batch == NULL) {
|
||||||
|
|
|
@ -931,7 +931,7 @@ static int p9_client_version(struct p9_client *c)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
struct p9_req_t *req;
|
struct p9_req_t *req;
|
||||||
char *version;
|
char *version = NULL;
|
||||||
int msize;
|
int msize;
|
||||||
|
|
||||||
p9_debug(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n",
|
p9_debug(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n",
|
||||||
|
|
|
@ -181,6 +181,8 @@ static void p9_mux_poll_stop(struct p9_conn *m)
|
||||||
spin_lock_irqsave(&p9_poll_lock, flags);
|
spin_lock_irqsave(&p9_poll_lock, flags);
|
||||||
list_del_init(&m->poll_pending_link);
|
list_del_init(&m->poll_pending_link);
|
||||||
spin_unlock_irqrestore(&p9_poll_lock, flags);
|
spin_unlock_irqrestore(&p9_poll_lock, flags);
|
||||||
|
|
||||||
|
flush_work(&p9_poll_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -937,7 +939,7 @@ p9_fd_create_tcp(struct p9_client *client, const char *addr, char *args)
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (valid_ipaddr4(addr) < 0)
|
if (addr == NULL || valid_ipaddr4(addr) < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
csocket = NULL;
|
csocket = NULL;
|
||||||
|
@ -985,6 +987,9 @@ p9_fd_create_unix(struct p9_client *client, const char *addr, char *args)
|
||||||
|
|
||||||
csocket = NULL;
|
csocket = NULL;
|
||||||
|
|
||||||
|
if (addr == NULL)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (strlen(addr) >= UNIX_PATH_MAX) {
|
if (strlen(addr) >= UNIX_PATH_MAX) {
|
||||||
pr_err("%s (%d): address too long: %s\n",
|
pr_err("%s (%d): address too long: %s\n",
|
||||||
__func__, task_pid_nr(current), addr);
|
__func__, task_pid_nr(current), addr);
|
||||||
|
|
|
@ -622,6 +622,9 @@ rdma_create_trans(struct p9_client *client, const char *addr, char *args)
|
||||||
struct rdma_conn_param conn_param;
|
struct rdma_conn_param conn_param;
|
||||||
struct ib_qp_init_attr qp_attr;
|
struct ib_qp_init_attr qp_attr;
|
||||||
|
|
||||||
|
if (addr == NULL)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* Parse the transport specific mount options */
|
/* Parse the transport specific mount options */
|
||||||
err = parse_opts(args, &opts);
|
err = parse_opts(args, &opts);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
|
|
@ -189,7 +189,7 @@ static int pack_sg_list(struct scatterlist *sg, int start,
|
||||||
s = rest_of_page(data);
|
s = rest_of_page(data);
|
||||||
if (s > count)
|
if (s > count)
|
||||||
s = count;
|
s = count;
|
||||||
BUG_ON(index > limit);
|
BUG_ON(index >= limit);
|
||||||
/* Make sure we don't terminate early. */
|
/* Make sure we don't terminate early. */
|
||||||
sg_unmark_end(&sg[index]);
|
sg_unmark_end(&sg[index]);
|
||||||
sg_set_buf(&sg[index++], data, s);
|
sg_set_buf(&sg[index++], data, s);
|
||||||
|
@ -234,6 +234,7 @@ pack_sg_list_p(struct scatterlist *sg, int start, int limit,
|
||||||
s = PAGE_SIZE - data_off;
|
s = PAGE_SIZE - data_off;
|
||||||
if (s > count)
|
if (s > count)
|
||||||
s = count;
|
s = count;
|
||||||
|
BUG_ON(index >= limit);
|
||||||
/* Make sure we don't terminate early. */
|
/* Make sure we don't terminate early. */
|
||||||
sg_unmark_end(&sg[index]);
|
sg_unmark_end(&sg[index]);
|
||||||
sg_set_page(&sg[index++], pdata[i++], s, data_off);
|
sg_set_page(&sg[index++], pdata[i++], s, data_off);
|
||||||
|
@ -406,6 +407,7 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,
|
||||||
p9_debug(P9_DEBUG_TRANS, "virtio request\n");
|
p9_debug(P9_DEBUG_TRANS, "virtio request\n");
|
||||||
|
|
||||||
if (uodata) {
|
if (uodata) {
|
||||||
|
__le32 sz;
|
||||||
int n = p9_get_mapped_pages(chan, &out_pages, uodata,
|
int n = p9_get_mapped_pages(chan, &out_pages, uodata,
|
||||||
outlen, &offs, &need_drop);
|
outlen, &offs, &need_drop);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
|
@ -416,6 +418,12 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,
|
||||||
memcpy(&req->tc->sdata[req->tc->size - 4], &v, 4);
|
memcpy(&req->tc->sdata[req->tc->size - 4], &v, 4);
|
||||||
outlen = n;
|
outlen = n;
|
||||||
}
|
}
|
||||||
|
/* The size field of the message must include the length of the
|
||||||
|
* header and the length of the data. We didn't actually know
|
||||||
|
* the length of the data until this point so add it in now.
|
||||||
|
*/
|
||||||
|
sz = cpu_to_le32(req->tc->size + outlen);
|
||||||
|
memcpy(&req->tc->sdata[0], &sz, sizeof(sz));
|
||||||
} else if (uidata) {
|
} else if (uidata) {
|
||||||
int n = p9_get_mapped_pages(chan, &in_pages, uidata,
|
int n = p9_get_mapped_pages(chan, &in_pages, uidata,
|
||||||
inlen, &offs, &need_drop);
|
inlen, &offs, &need_drop);
|
||||||
|
@ -643,6 +651,9 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args)
|
||||||
int ret = -ENOENT;
|
int ret = -ENOENT;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
|
||||||
|
if (devname == NULL)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
mutex_lock(&virtio_9p_lock);
|
mutex_lock(&virtio_9p_lock);
|
||||||
list_for_each_entry(chan, &virtio_chan_list, chan_list) {
|
list_for_each_entry(chan, &virtio_chan_list, chan_list) {
|
||||||
if (!strncmp(devname, chan->tag, chan->tag_len) &&
|
if (!strncmp(devname, chan->tag, chan->tag_len) &&
|
||||||
|
|
|
@ -266,9 +266,24 @@ netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *ldev)
|
||||||
/* We must take a copy of the skb before we modify/replace the ipv6
|
/* We must take a copy of the skb before we modify/replace the ipv6
|
||||||
* header as the header could be used elsewhere
|
* header as the header could be used elsewhere
|
||||||
*/
|
*/
|
||||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
if (unlikely(skb_headroom(skb) < ldev->needed_headroom ||
|
||||||
if (!skb)
|
skb_tailroom(skb) < ldev->needed_tailroom)) {
|
||||||
return NET_XMIT_DROP;
|
struct sk_buff *nskb;
|
||||||
|
|
||||||
|
nskb = skb_copy_expand(skb, ldev->needed_headroom,
|
||||||
|
ldev->needed_tailroom, GFP_ATOMIC);
|
||||||
|
if (likely(nskb)) {
|
||||||
|
consume_skb(skb);
|
||||||
|
skb = nskb;
|
||||||
|
} else {
|
||||||
|
kfree_skb(skb);
|
||||||
|
return NET_XMIT_DROP;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||||
|
if (!skb)
|
||||||
|
return NET_XMIT_DROP;
|
||||||
|
}
|
||||||
|
|
||||||
ret = lowpan_header(skb, ldev, &dgram_size, &dgram_offset);
|
ret = lowpan_header(skb, ldev, &dgram_size, &dgram_offset);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
|
@ -63,8 +63,21 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!(local->hw.flags & IEEE802154_HW_TX_OMIT_CKSUM)) {
|
if (!(local->hw.flags & IEEE802154_HW_TX_OMIT_CKSUM)) {
|
||||||
u16 crc = crc_ccitt(0, skb->data, skb->len);
|
struct sk_buff *nskb;
|
||||||
|
u16 crc;
|
||||||
|
|
||||||
|
if (unlikely(skb_tailroom(skb) < IEEE802154_FCS_LEN)) {
|
||||||
|
nskb = skb_copy_expand(skb, 0, IEEE802154_FCS_LEN,
|
||||||
|
GFP_ATOMIC);
|
||||||
|
if (likely(nskb)) {
|
||||||
|
consume_skb(skb);
|
||||||
|
skb = nskb;
|
||||||
|
} else {
|
||||||
|
goto err_tx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
crc = crc_ccitt(0, skb->data, skb->len);
|
||||||
put_unaligned_le16(crc, skb_put(skb, 2));
|
put_unaligned_le16(crc, skb_put(skb, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -965,10 +965,20 @@ out:
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rpc_bind_new_program);
|
EXPORT_SYMBOL_GPL(rpc_bind_new_program);
|
||||||
|
|
||||||
|
void rpc_task_release_transport(struct rpc_task *task)
|
||||||
|
{
|
||||||
|
struct rpc_xprt *xprt = task->tk_xprt;
|
||||||
|
|
||||||
|
if (xprt) {
|
||||||
|
task->tk_xprt = NULL;
|
||||||
|
xprt_put(xprt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(rpc_task_release_transport);
|
||||||
|
|
||||||
void rpc_task_release_client(struct rpc_task *task)
|
void rpc_task_release_client(struct rpc_task *task)
|
||||||
{
|
{
|
||||||
struct rpc_clnt *clnt = task->tk_client;
|
struct rpc_clnt *clnt = task->tk_client;
|
||||||
struct rpc_xprt *xprt = task->tk_xprt;
|
|
||||||
|
|
||||||
if (clnt != NULL) {
|
if (clnt != NULL) {
|
||||||
/* Remove from client task list */
|
/* Remove from client task list */
|
||||||
|
@ -979,12 +989,14 @@ void rpc_task_release_client(struct rpc_task *task)
|
||||||
|
|
||||||
rpc_release_client(clnt);
|
rpc_release_client(clnt);
|
||||||
}
|
}
|
||||||
|
rpc_task_release_transport(task);
|
||||||
|
}
|
||||||
|
|
||||||
if (xprt != NULL) {
|
static
|
||||||
task->tk_xprt = NULL;
|
void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt)
|
||||||
|
{
|
||||||
xprt_put(xprt);
|
if (!task->tk_xprt)
|
||||||
}
|
task->tk_xprt = xprt_iter_get_next(&clnt->cl_xpi);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -992,8 +1004,7 @@ void rpc_task_set_client(struct rpc_task *task, struct rpc_clnt *clnt)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (clnt != NULL) {
|
if (clnt != NULL) {
|
||||||
if (task->tk_xprt == NULL)
|
rpc_task_set_transport(task, clnt);
|
||||||
task->tk_xprt = xprt_iter_get_next(&clnt->cl_xpi);
|
|
||||||
task->tk_client = clnt;
|
task->tk_client = clnt;
|
||||||
atomic_inc(&clnt->cl_count);
|
atomic_inc(&clnt->cl_count);
|
||||||
if (clnt->cl_softrtry)
|
if (clnt->cl_softrtry)
|
||||||
|
@ -1550,6 +1561,7 @@ call_start(struct rpc_task *task)
|
||||||
task->tk_msg.rpc_proc->p_count++;
|
task->tk_msg.rpc_proc->p_count++;
|
||||||
clnt->cl_stats->rpccnt++;
|
clnt->cl_stats->rpccnt++;
|
||||||
task->tk_action = call_reserve;
|
task->tk_action = call_reserve;
|
||||||
|
rpc_task_set_transport(task, clnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -195,6 +195,9 @@ static int auxtrace_queues__grow(struct auxtrace_queues *queues,
|
||||||
for (i = 0; i < queues->nr_queues; i++) {
|
for (i = 0; i < queues->nr_queues; i++) {
|
||||||
list_splice_tail(&queues->queue_array[i].head,
|
list_splice_tail(&queues->queue_array[i].head,
|
||||||
&queue_array[i].head);
|
&queue_array[i].head);
|
||||||
|
queue_array[i].tid = queues->queue_array[i].tid;
|
||||||
|
queue_array[i].cpu = queues->queue_array[i].cpu;
|
||||||
|
queue_array[i].set = queues->queue_array[i].set;
|
||||||
queue_array[i].priv = queues->queue_array[i].priv;
|
queue_array[i].priv = queues->queue_array[i].priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue