mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
This is the 4.14.217 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmAMN2QACgkQONu9yGCS aT66CBAAnQV9ZKn5eCftFwOTm/B/W171665glkAwt92QtvrsJz+sFLMzBPkKXAAk A/hsMrpKwNVdLB1mPfgZYg4KBTF9193dUx12hSR8CqN1JzjERkGxbJflWKg7r4qS ttYx5i7ydNLCoOLZfuMujgMngDpT95iICtCesTimms3Oyq2rmpAP5TkySwsXAaHC bCjJyg4mNyblDiYbDzgmY4H821qOuO8jHGgriVY5/IcEKX8v3SAYleuMeDBf7pN7 iGk0fd0pTpL+dYE6dBo7TWzubV0q6/P4T+QyZ8ZPcw/DkhsG6eSHlDpDvMmxdESG uCHKZG0w0/TSXX4NDa0VXNYDxbDkfgB8+grSl97y4Tc+dA/1wZXH63JfMiQ1kCHM fnJz/gfbAwPJgVq9hsR8SxZkxzsdmX3uTT2B5AxI1jtXJRSLDYMT+yY/fpgePFY9 NyN+Qrc0UX9ZVaYFO474GfkUV5xIoC/9X2RFdgPBDt4dP8ywNW6EGHoI3fPKM528 0bBgqcNBBka6aelQTwgzPoZ3OuPelgla8UzxQf9jKnwjoUuN24wX4yf18HVfFtJa CRjgX+ljawS54J++xk++XymyLm3oRFPp7eRFpaAwiNA/ADoMBbtwWUu9lVQktssw 8l5BoN6W/VIy1bys4UWkuSKl09kvJw7TrLgSigTvh+YEXHPOqKk= =KSLy -----END PGP SIGNATURE----- Merge 4.14.217 into android-4.14-stable Changes in 4.14.217 ASoC: dapm: remove widget from dirty list on free MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB MIPS: relocatable: fix possible boot hangup with KASLR enabled ACPI: scan: Harden acpi_device_add() against device ID overflows mm/hugetlb: fix potential missing huge page size info dm snapshot: flush merged data before committing metadata r8152: Add Lenovo Powered USB-C Travel Hub ext4: fix bug for rename with RENAME_WHITEOUT ARC: build: remove non-existing bootpImage from KBUILD_IMAGE ARC: build: add uImage.lzma to the top-level target ARC: build: add boot_targets to PHONY btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC misdn: dsp: select CONFIG_BITREVERSE net: ethernet: fs_enet: Add missing MODULE_LICENSE ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI ARM: picoxcell: fix missing interrupt-parent properties dump_common_audit_data(): fix racy accesses to ->d_name ASoC: Intel: fix error code cnl_set_dsp_D0() NFS4: Fix use-after-free in trace_event_raw_event_nfs4_set_lock pNFS: Mark layout for return if return-on-close was not sent NFS: nfs_igrab_and_active must first reference the superblock ext4: fix superblock checksum failure when setting password salt RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp mm, slub: consider rest of partial list if acquire_slab() fails net: sunrpc: interpret the return value of kstrtou32 correctly dm: eliminate potential source of excessive kernel log noise ALSA: firewire-tascam: Fix integer overflow in midi_port_work() ALSA: fireface: Fix integer overflow in transmit_midi_msg() netfilter: conntrack: fix reading nf_conntrack_buckets usb: ohci: Make distrust_firmware param default to false nfsd4: readdirplus shouldn't return parent of export netxen_nic: fix MSI/MSI-x interrupts rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request esp: avoid unneeded kmap_atomic call net: dcb: Validate netlink message in DCB handler net: dcb: Accept RTM_GETDCB messages carrying set-like DCB commands net: stmmac: Fixed mtu channged by cache aligned net: sit: unregister_netdevice on newlink's error path net: avoid 32 x truesize under-estimation for tiny skbs rxrpc: Fix handling of an unsupported token type in rxrpc_read() tipc: fix NULL deref in tipc_link_xmit() net: use skb_list_del_init() to remove from RX sublists net: introduce skb_list_walk_safe for skb segment walking net: skbuff: disambiguate argument and member for skb_list_walk_safe helper net: ipv6: Validate GSO SKB before finish IPv6 processing spi: cadence: cache reference clock rate during probe Linux 4.14.217 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I8dde475d93da7cdd6f8b5d7f0fed37ac80c24003
This commit is contained in:
commit
564b130202
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 216
|
||||
SUBLEVEL = 217
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
@ -99,14 +99,9 @@ libs-y += arch/arc/lib/ $(LIBGCC)
|
||||
|
||||
boot := arch/arc/boot
|
||||
|
||||
#default target for make without any arguments.
|
||||
KBUILD_IMAGE := $(boot)/bootpImage
|
||||
|
||||
all: bootpImage
|
||||
bootpImage: vmlinux
|
||||
|
||||
boot_targets += uImage uImage.bin uImage.gz
|
||||
boot_targets := uImage uImage.bin uImage.gz uImage.lzma
|
||||
|
||||
PHONY += $(boot_targets)
|
||||
$(boot_targets): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define clear_page(paddr) memset((paddr), 0, PAGE_SIZE)
|
||||
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
|
||||
#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
|
||||
|
||||
struct vm_area_struct;
|
||||
|
@ -54,18 +54,21 @@
|
||||
emac: gem@30000 {
|
||||
compatible = "cadence,gem";
|
||||
reg = <0x30000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <31>;
|
||||
};
|
||||
|
||||
dmac1: dmac@40000 {
|
||||
compatible = "snps,dw-dmac";
|
||||
reg = <0x40000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <25>;
|
||||
};
|
||||
|
||||
dmac2: dmac@50000 {
|
||||
compatible = "snps,dw-dmac";
|
||||
reg = <0x50000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <26>;
|
||||
};
|
||||
|
||||
@ -243,6 +246,7 @@
|
||||
axi2pico@c0000000 {
|
||||
compatible = "picochip,axi2pico-pc3x2";
|
||||
reg = <0xc0000000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <13 14 15 16 17 18 19 20 21>;
|
||||
};
|
||||
};
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <linux/libfdt.h>
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
/*
|
||||
* These two variables specify the free mem region
|
||||
@ -124,7 +125,7 @@ void decompress_kernel(unsigned long boot_heap_start)
|
||||
dtb_size = fdt_totalsize((void *)&__appended_dtb);
|
||||
|
||||
/* last four bytes is always image size in little endian */
|
||||
image_size = le32_to_cpup((void *)&__image_end - 4);
|
||||
image_size = get_unaligned_le32((void *)&__image_end - 4);
|
||||
|
||||
/* copy dtb to where the booted kernel will expect it */
|
||||
memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,
|
||||
|
@ -187,8 +187,14 @@ static int __init relocate_exception_table(long offset)
|
||||
static inline __init unsigned long rotate_xor(unsigned long hash,
|
||||
const void *area, size_t size)
|
||||
{
|
||||
size_t i;
|
||||
unsigned long *ptr = (unsigned long *)area;
|
||||
const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash));
|
||||
size_t diff, i;
|
||||
|
||||
diff = (void *)ptr - area;
|
||||
if (unlikely(size < diff + sizeof(hash)))
|
||||
return hash;
|
||||
|
||||
size = ALIGN_DOWN(size - diff, sizeof(hash));
|
||||
|
||||
for (i = 0; i < size / sizeof(hash); i++) {
|
||||
/* Rotate by odd number of bits and XOR. */
|
||||
|
@ -98,7 +98,7 @@ void acpi_scan_table_handler(u32 event, void *table, void *context);
|
||||
extern struct list_head acpi_bus_id_list;
|
||||
|
||||
struct acpi_device_bus_id {
|
||||
char bus_id[15];
|
||||
const char *bus_id;
|
||||
unsigned int instance_no;
|
||||
struct list_head node;
|
||||
};
|
||||
|
@ -485,6 +485,7 @@ static void acpi_device_del(struct acpi_device *device)
|
||||
acpi_device_bus_id->instance_no--;
|
||||
else {
|
||||
list_del(&acpi_device_bus_id->node);
|
||||
kfree_const(acpi_device_bus_id->bus_id);
|
||||
kfree(acpi_device_bus_id);
|
||||
}
|
||||
break;
|
||||
@ -673,7 +674,14 @@ int acpi_device_add(struct acpi_device *device,
|
||||
}
|
||||
if (!found) {
|
||||
acpi_device_bus_id = new_bus_id;
|
||||
strcpy(acpi_device_bus_id->bus_id, acpi_device_hid(device));
|
||||
acpi_device_bus_id->bus_id =
|
||||
kstrdup_const(acpi_device_hid(device), GFP_KERNEL);
|
||||
if (!acpi_device_bus_id->bus_id) {
|
||||
pr_err(PREFIX "Memory allocation error for bus id\n");
|
||||
result = -ENOMEM;
|
||||
goto err_free_new_bus_id;
|
||||
}
|
||||
|
||||
acpi_device_bus_id->instance_no = 0;
|
||||
list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list);
|
||||
}
|
||||
@ -708,6 +716,11 @@ int acpi_device_add(struct acpi_device *device,
|
||||
if (device->parent)
|
||||
list_del(&device->node);
|
||||
list_del(&device->wakeup_list);
|
||||
|
||||
err_free_new_bus_id:
|
||||
if (!found)
|
||||
kfree(new_bus_id);
|
||||
|
||||
mutex_unlock(&acpi_device_lock);
|
||||
|
||||
err_detach:
|
||||
|
@ -188,6 +188,7 @@ find_free_vf_and_create_qp_grp(struct usnic_ib_dev *us_ibdev,
|
||||
|
||||
}
|
||||
usnic_uiom_free_dev_list(dev_list);
|
||||
dev_list = NULL;
|
||||
}
|
||||
|
||||
/* Try to find resources on an unused vf */
|
||||
@ -212,6 +213,8 @@ find_free_vf_and_create_qp_grp(struct usnic_ib_dev *us_ibdev,
|
||||
qp_grp_check:
|
||||
if (IS_ERR_OR_NULL(qp_grp)) {
|
||||
usnic_err("Failed to allocate qp_grp\n");
|
||||
if (usnic_ib_share_vf)
|
||||
usnic_uiom_free_dev_list(dev_list);
|
||||
return ERR_PTR(qp_grp ? PTR_ERR(qp_grp) : -ENOMEM);
|
||||
}
|
||||
return qp_grp;
|
||||
|
@ -12,6 +12,7 @@ if MISDN != n
|
||||
config MISDN_DSP
|
||||
tristate "Digital Audio Processing of transparent data"
|
||||
depends on MISDN
|
||||
select BITREVERSE
|
||||
help
|
||||
Enable support for digital audio processing capability.
|
||||
|
||||
|
@ -137,6 +137,11 @@ struct dm_snapshot {
|
||||
* for them to be committed.
|
||||
*/
|
||||
struct bio_list bios_queued_during_merge;
|
||||
|
||||
/*
|
||||
* Flush data after merge.
|
||||
*/
|
||||
struct bio flush_bio;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1060,6 +1065,17 @@ shut:
|
||||
|
||||
static void error_bios(struct bio *bio);
|
||||
|
||||
static int flush_data(struct dm_snapshot *s)
|
||||
{
|
||||
struct bio *flush_bio = &s->flush_bio;
|
||||
|
||||
bio_reset(flush_bio);
|
||||
bio_set_dev(flush_bio, s->origin->bdev);
|
||||
flush_bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
||||
|
||||
return submit_bio_wait(flush_bio);
|
||||
}
|
||||
|
||||
static void merge_callback(int read_err, unsigned long write_err, void *context)
|
||||
{
|
||||
struct dm_snapshot *s = context;
|
||||
@ -1073,6 +1089,11 @@ static void merge_callback(int read_err, unsigned long write_err, void *context)
|
||||
goto shut;
|
||||
}
|
||||
|
||||
if (flush_data(s) < 0) {
|
||||
DMERR("Flush after merge failed: shutting down merge");
|
||||
goto shut;
|
||||
}
|
||||
|
||||
if (s->store->type->commit_merge(s->store,
|
||||
s->num_merging_chunks) < 0) {
|
||||
DMERR("Write error in exception store: shutting down merge");
|
||||
@ -1197,6 +1218,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||
s->first_merging_chunk = 0;
|
||||
s->num_merging_chunks = 0;
|
||||
bio_list_init(&s->bios_queued_during_merge);
|
||||
bio_init(&s->flush_bio, NULL, 0);
|
||||
|
||||
/* Allocate hash table for COW data */
|
||||
if (init_hash_tables(s)) {
|
||||
@ -1391,6 +1413,8 @@ static void snapshot_dtr(struct dm_target *ti)
|
||||
|
||||
mutex_destroy(&s->lock);
|
||||
|
||||
bio_uninit(&s->flush_bio);
|
||||
|
||||
dm_put_device(ti, s->cow);
|
||||
|
||||
dm_put_device(ti, s->origin);
|
||||
|
@ -474,7 +474,7 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
* subset of the parent bdev; require extra privileges.
|
||||
*/
|
||||
if (!capable(CAP_SYS_RAWIO)) {
|
||||
DMWARN_LIMIT(
|
||||
DMDEBUG_LIMIT(
|
||||
"%s: sending ioctl %x to DM device without required privilege.",
|
||||
current->comm, cmd);
|
||||
r = -ENOIOCTLCMD;
|
||||
|
@ -223,3 +223,4 @@ static struct platform_driver fs_enet_bb_mdio_driver = {
|
||||
};
|
||||
|
||||
module_platform_driver(fs_enet_bb_mdio_driver);
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -224,3 +224,4 @@ static struct platform_driver fs_enet_fec_mdio_driver = {
|
||||
};
|
||||
|
||||
module_platform_driver(fs_enet_fec_mdio_driver);
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -580,7 +580,14 @@ struct ucc_geth_tx_global_pram {
|
||||
u32 vtagtable[0x8]; /* 8 4-byte VLAN tags */
|
||||
u32 tqptr; /* a base pointer to the Tx Queues Memory
|
||||
Region */
|
||||
u8 res2[0x80 - 0x74];
|
||||
u8 res2[0x78 - 0x74];
|
||||
u64 snums_en;
|
||||
u32 l2l3baseptr; /* top byte consists of a few other bit fields */
|
||||
|
||||
u16 mtu[8];
|
||||
u8 res3[0xa8 - 0x94];
|
||||
u32 wrrtablebase; /* top byte is reserved */
|
||||
u8 res4[0xc0 - 0xac];
|
||||
} __packed;
|
||||
|
||||
/* structure representing Extended Filtering Global Parameters in PRAM */
|
||||
|
@ -586,11 +586,6 @@ static const struct net_device_ops netxen_netdev_ops = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline bool netxen_function_zero(struct pci_dev *pdev)
|
||||
{
|
||||
return (PCI_FUNC(pdev->devfn) == 0) ? true : false;
|
||||
}
|
||||
|
||||
static inline void netxen_set_interrupt_mode(struct netxen_adapter *adapter,
|
||||
u32 mode)
|
||||
{
|
||||
@ -686,7 +681,7 @@ static int netxen_setup_intr(struct netxen_adapter *adapter)
|
||||
netxen_initialize_interrupt_registers(adapter);
|
||||
netxen_set_msix_bit(pdev, 0);
|
||||
|
||||
if (netxen_function_zero(pdev)) {
|
||||
if (adapter->portnum == 0) {
|
||||
if (!netxen_setup_msi_interrupts(adapter, num_msix))
|
||||
netxen_set_interrupt_mode(adapter, NETXEN_MSI_MODE);
|
||||
else
|
||||
|
@ -3613,6 +3613,7 @@ static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
int txfifosz = priv->plat->tx_fifo_size;
|
||||
const int mtu = new_mtu;
|
||||
|
||||
if (txfifosz == 0)
|
||||
txfifosz = priv->dma_cap.tx_fifo_size;
|
||||
@ -3630,7 +3631,7 @@ static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
|
||||
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
||||
return -EINVAL;
|
||||
|
||||
dev->mtu = new_mtu;
|
||||
dev->mtu = mtu;
|
||||
|
||||
netdev_update_features(dev);
|
||||
|
||||
|
@ -800,6 +800,13 @@ static const struct usb_device_id products[] = {
|
||||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/* Lenovo Powered USB-C Travel Hub (4X90S92381, based on Realtek RTL8153) */
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(LENOVO_VENDOR_ID, 0x721e, USB_CLASS_COMM,
|
||||
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
|
||||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/* ThinkPad USB-C Dock Gen 2 (based on Realtek RTL8153) */
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(LENOVO_VENDOR_ID, 0xa387, USB_CLASS_COMM,
|
||||
|
@ -5337,6 +5337,7 @@ static const struct usb_device_id rtl8152_table[] = {
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7205)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x720c)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7214)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x721e)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0xa387)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff)},
|
||||
|
@ -399,7 +399,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
|
||||
reply_len = sizeof *phym;
|
||||
retval = rndis_query(dev, intf, u.buf,
|
||||
RNDIS_OID_GEN_PHYSICAL_MEDIUM,
|
||||
0, (void **) &phym, &reply_len);
|
||||
reply_len, (void **)&phym, &reply_len);
|
||||
if (retval != 0 || !phym) {
|
||||
/* OID is optional so don't fail here. */
|
||||
phym_unspec = cpu_to_le32(RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED);
|
||||
|
@ -119,6 +119,7 @@ struct cdns_spi {
|
||||
void __iomem *regs;
|
||||
struct clk *ref_clk;
|
||||
struct clk *pclk;
|
||||
unsigned int clk_rate;
|
||||
u32 speed_hz;
|
||||
const u8 *txbuf;
|
||||
u8 *rxbuf;
|
||||
@ -258,7 +259,7 @@ static void cdns_spi_config_clock_freq(struct spi_device *spi,
|
||||
u32 ctrl_reg, baud_rate_val;
|
||||
unsigned long frequency;
|
||||
|
||||
frequency = clk_get_rate(xspi->ref_clk);
|
||||
frequency = xspi->clk_rate;
|
||||
|
||||
ctrl_reg = cdns_spi_read(xspi, CDNS_SPI_CR);
|
||||
|
||||
@ -628,8 +629,9 @@ static int cdns_spi_probe(struct platform_device *pdev)
|
||||
master->auto_runtime_pm = true;
|
||||
master->mode_bits = SPI_CPOL | SPI_CPHA;
|
||||
|
||||
xspi->clk_rate = clk_get_rate(xspi->ref_clk);
|
||||
/* Set to default valid value */
|
||||
master->max_speed_hz = clk_get_rate(xspi->ref_clk) / 4;
|
||||
master->max_speed_hz = xspi->clk_rate / 4;
|
||||
xspi->speed_hz = master->max_speed_hz;
|
||||
|
||||
master->bits_per_word_mask = SPI_BPW_MASK(8);
|
||||
|
@ -100,7 +100,7 @@ static void io_watchdog_func(unsigned long _ohci);
|
||||
|
||||
|
||||
/* Some boards misreport power switching/overcurrent */
|
||||
static bool distrust_firmware = true;
|
||||
static bool distrust_firmware;
|
||||
module_param (distrust_firmware, bool, 0);
|
||||
MODULE_PARM_DESC (distrust_firmware,
|
||||
"true to distrust firmware power/overcurrent setup");
|
||||
|
@ -2614,6 +2614,12 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool rescan_should_stop(struct btrfs_fs_info *fs_info)
|
||||
{
|
||||
return btrfs_fs_closing(fs_info) ||
|
||||
test_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state);
|
||||
}
|
||||
|
||||
static void btrfs_qgroup_rescan_worker(struct btrfs_work *work)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = container_of(work, struct btrfs_fs_info,
|
||||
@ -2622,13 +2628,14 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work)
|
||||
struct btrfs_trans_handle *trans = NULL;
|
||||
int err = -ENOMEM;
|
||||
int ret = 0;
|
||||
bool stopped = false;
|
||||
|
||||
path = btrfs_alloc_path();
|
||||
if (!path)
|
||||
goto out;
|
||||
|
||||
err = 0;
|
||||
while (!err && !btrfs_fs_closing(fs_info)) {
|
||||
while (!err && !(stopped = rescan_should_stop(fs_info))) {
|
||||
trans = btrfs_start_transaction(fs_info->fs_root, 0);
|
||||
if (IS_ERR(trans)) {
|
||||
err = PTR_ERR(trans);
|
||||
@ -2671,7 +2678,7 @@ out:
|
||||
}
|
||||
|
||||
mutex_lock(&fs_info->qgroup_rescan_lock);
|
||||
if (!btrfs_fs_closing(fs_info))
|
||||
if (!stopped)
|
||||
fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_RESCAN;
|
||||
if (trans) {
|
||||
ret = update_qgroup_status_item(trans);
|
||||
@ -2690,7 +2697,7 @@ out:
|
||||
|
||||
btrfs_end_transaction(trans);
|
||||
|
||||
if (btrfs_fs_closing(fs_info)) {
|
||||
if (stopped) {
|
||||
btrfs_info(fs_info, "qgroup scan paused");
|
||||
} else if (err >= 0) {
|
||||
btrfs_info(fs_info, "qgroup scan completed%s",
|
||||
|
@ -1784,6 +1784,14 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
|
||||
btrfs_scrub_cancel(fs_info);
|
||||
btrfs_pause_balance(fs_info);
|
||||
|
||||
/*
|
||||
* Pause the qgroup rescan worker if it is running. We don't want
|
||||
* it to be still running after we are in RO mode, as after that,
|
||||
* by the time we unmount, it might have left a transaction open,
|
||||
* so we would leak the transaction and/or crash.
|
||||
*/
|
||||
btrfs_qgroup_wait_for_completion(fs_info, false);
|
||||
|
||||
ret = btrfs_commit_super(fs_info);
|
||||
if (ret)
|
||||
goto restore;
|
||||
|
@ -1050,7 +1050,10 @@ resizefs_out:
|
||||
err = ext4_journal_get_write_access(handle, sbi->s_sbh);
|
||||
if (err)
|
||||
goto pwsalt_err_journal;
|
||||
lock_buffer(sbi->s_sbh);
|
||||
generate_random_uuid(sbi->s_es->s_encrypt_pw_salt);
|
||||
ext4_superblock_csum_set(sb);
|
||||
unlock_buffer(sbi->s_sbh);
|
||||
err = ext4_handle_dirty_metadata(handle, NULL,
|
||||
sbi->s_sbh);
|
||||
pwsalt_err_journal:
|
||||
|
@ -3669,8 +3669,6 @@ static int ext4_setent(handle_t *handle, struct ext4_renament *ent,
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
brelse(ent->bh);
|
||||
ent->bh = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -3873,6 +3871,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
}
|
||||
}
|
||||
|
||||
old_file_type = old.de->file_type;
|
||||
if (IS_DIRSYNC(old.dir) || IS_DIRSYNC(new.dir))
|
||||
ext4_handle_sync(handle);
|
||||
|
||||
@ -3900,7 +3899,6 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
force_reread = (new.dir->i_ino == old.dir->i_ino &&
|
||||
ext4_test_inode_flag(new.dir, EXT4_INODE_INLINE_DATA));
|
||||
|
||||
old_file_type = old.de->file_type;
|
||||
if (whiteout) {
|
||||
/*
|
||||
* Do this before adding a new entry, so the old entry is sure
|
||||
@ -3972,15 +3970,19 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
retval = 0;
|
||||
|
||||
end_rename:
|
||||
if (whiteout) {
|
||||
if (retval) {
|
||||
ext4_setent(handle, &old,
|
||||
old.inode->i_ino, old_file_type);
|
||||
drop_nlink(whiteout);
|
||||
}
|
||||
unlock_new_inode(whiteout);
|
||||
iput(whiteout);
|
||||
|
||||
}
|
||||
brelse(old.dir_bh);
|
||||
brelse(old.bh);
|
||||
brelse(new.bh);
|
||||
if (whiteout) {
|
||||
if (retval)
|
||||
drop_nlink(whiteout);
|
||||
unlock_new_inode(whiteout);
|
||||
iput(whiteout);
|
||||
}
|
||||
if (handle)
|
||||
ext4_journal_stop(handle);
|
||||
return retval;
|
||||
|
@ -575,12 +575,14 @@ extern int nfs4_test_session_trunk(struct rpc_clnt *,
|
||||
|
||||
static inline struct inode *nfs_igrab_and_active(struct inode *inode)
|
||||
{
|
||||
inode = igrab(inode);
|
||||
if (inode != NULL && !nfs_sb_active(inode->i_sb)) {
|
||||
iput(inode);
|
||||
inode = NULL;
|
||||
struct super_block *sb = inode->i_sb;
|
||||
|
||||
if (sb && nfs_sb_active(sb)) {
|
||||
if (igrab(inode))
|
||||
return inode;
|
||||
nfs_sb_deactive(sb);
|
||||
}
|
||||
return inode;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void nfs_iput_and_deactive(struct inode *inode)
|
||||
|
@ -6395,9 +6395,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f
|
||||
data->arg.new_lock_owner, ret);
|
||||
} else
|
||||
data->cancelled = true;
|
||||
trace_nfs4_set_lock(fl, state, &data->res.stateid, cmd, ret);
|
||||
rpc_put_task(task);
|
||||
dprintk("%s: done, ret = %d!\n", __func__, ret);
|
||||
trace_nfs4_set_lock(fl, state, &data->res.stateid, cmd, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1328,12 +1328,18 @@ void pnfs_roc_release(struct nfs4_layoutreturn_args *args,
|
||||
int ret)
|
||||
{
|
||||
struct pnfs_layout_hdr *lo = args->layout;
|
||||
struct inode *inode = args->inode;
|
||||
const nfs4_stateid *arg_stateid = NULL;
|
||||
const nfs4_stateid *res_stateid = NULL;
|
||||
struct nfs4_xdr_opaque_data *ld_private = args->ld_private;
|
||||
|
||||
switch (ret) {
|
||||
case -NFS4ERR_NOMATCHING_LAYOUT:
|
||||
spin_lock(&inode->i_lock);
|
||||
if (pnfs_layout_is_valid(lo) &&
|
||||
nfs4_stateid_match_other(&args->stateid, &lo->plh_stateid))
|
||||
pnfs_set_plh_return_info(lo, args->range.iomode, 0);
|
||||
spin_unlock(&inode->i_lock);
|
||||
break;
|
||||
case 0:
|
||||
if (res->lrs_present)
|
||||
|
@ -845,9 +845,14 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
|
||||
if (isdotent(name, namlen)) {
|
||||
if (namlen == 2) {
|
||||
dchild = dget_parent(dparent);
|
||||
/* filesystem root - cannot return filehandle for ".." */
|
||||
/*
|
||||
* Don't return filehandle for ".." if we're at
|
||||
* the filesystem or export root:
|
||||
*/
|
||||
if (dchild == dparent)
|
||||
goto out;
|
||||
if (dparent == exp->ex_path.dentry)
|
||||
goto out;
|
||||
} else
|
||||
dchild = dget(dparent);
|
||||
} else
|
||||
|
@ -787,6 +787,13 @@ static inline int acpi_device_modalias(struct device *dev,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline struct platform_device *
|
||||
acpi_create_platform_device(struct acpi_device *adev,
|
||||
struct property_entry *properties)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline bool acpi_dma_supported(struct acpi_device *adev)
|
||||
{
|
||||
return false;
|
||||
|
@ -1335,6 +1335,22 @@ static inline void skb_zcopy_abort(struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void skb_mark_not_on_list(struct sk_buff *skb)
|
||||
{
|
||||
skb->next = NULL;
|
||||
}
|
||||
|
||||
/* Iterate through singly-linked GSO fragments of an skb. */
|
||||
#define skb_list_walk_safe(first, skb, next_skb) \
|
||||
for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb); \
|
||||
(skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL)
|
||||
|
||||
static inline void skb_list_del_init(struct sk_buff *skb)
|
||||
{
|
||||
__list_del_entry(&skb->list);
|
||||
skb_mark_not_on_list(skb);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_queue_empty - check if a queue is empty
|
||||
* @list: queue head
|
||||
|
@ -3797,7 +3797,7 @@ retry:
|
||||
* So we need to block hugepage fault by PG_hwpoison bit check.
|
||||
*/
|
||||
if (unlikely(PageHWPoison(page))) {
|
||||
ret = VM_FAULT_HWPOISON |
|
||||
ret = VM_FAULT_HWPOISON_LARGE |
|
||||
VM_FAULT_SET_HINDEX(hstate_index(h));
|
||||
goto backout_unlocked;
|
||||
}
|
||||
|
@ -1888,7 +1888,7 @@ static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n,
|
||||
|
||||
t = acquire_slab(s, n, page, object == NULL, &objects);
|
||||
if (!t)
|
||||
break;
|
||||
continue; /* cmpxchg raced */
|
||||
|
||||
available += objects;
|
||||
if (!object) {
|
||||
|
@ -459,13 +459,17 @@ EXPORT_SYMBOL(__netdev_alloc_skb);
|
||||
struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, unsigned int len,
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
|
||||
struct napi_alloc_cache *nc;
|
||||
struct sk_buff *skb;
|
||||
void *data;
|
||||
|
||||
len += NET_SKB_PAD + NET_IP_ALIGN;
|
||||
|
||||
if ((len > SKB_WITH_OVERHEAD(PAGE_SIZE)) ||
|
||||
/* If requested length is either too small or too big,
|
||||
* we use kmalloc() for skb->head allocation.
|
||||
*/
|
||||
if (len <= SKB_WITH_OVERHEAD(1024) ||
|
||||
len > SKB_WITH_OVERHEAD(PAGE_SIZE) ||
|
||||
(gfp_mask & (__GFP_DIRECT_RECLAIM | GFP_DMA))) {
|
||||
skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE);
|
||||
if (!skb)
|
||||
@ -473,6 +477,7 @@ struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, unsigned int len,
|
||||
goto skb_success;
|
||||
}
|
||||
|
||||
nc = this_cpu_ptr(&napi_alloc_cache);
|
||||
len += SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
len = SKB_DATA_ALIGN(len);
|
||||
|
||||
|
@ -1727,6 +1727,8 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
fn = &reply_funcs[dcb->cmd];
|
||||
if (!fn->cb)
|
||||
return -EOPNOTSUPP;
|
||||
if (fn->type == RTM_SETDCB && !netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!tb[DCB_ATTR_IFNAME])
|
||||
return -EINVAL;
|
||||
|
@ -252,7 +252,6 @@ static int esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, struc
|
||||
int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
||||
{
|
||||
u8 *tail;
|
||||
u8 *vaddr;
|
||||
int nfrags;
|
||||
int esph_offset;
|
||||
struct page *page;
|
||||
@ -294,14 +293,10 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
||||
page = pfrag->page;
|
||||
get_page(page);
|
||||
|
||||
vaddr = kmap_atomic(page);
|
||||
|
||||
tail = vaddr + pfrag->offset;
|
||||
tail = page_address(page) + pfrag->offset;
|
||||
|
||||
esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto);
|
||||
|
||||
kunmap_atomic(vaddr);
|
||||
|
||||
nfrags = skb_shinfo(skb)->nr_frags;
|
||||
|
||||
__skb_fill_page_desc(skb, nfrags, page, pfrag->offset,
|
||||
|
@ -219,7 +219,6 @@ static void esp_output_fill_trailer(u8 *tail, int tfclen, int plen, __u8 proto)
|
||||
int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
||||
{
|
||||
u8 *tail;
|
||||
u8 *vaddr;
|
||||
int nfrags;
|
||||
struct page *page;
|
||||
struct sk_buff *trailer;
|
||||
@ -252,14 +251,10 @@ int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info
|
||||
page = pfrag->page;
|
||||
get_page(page);
|
||||
|
||||
vaddr = kmap_atomic(page);
|
||||
|
||||
tail = vaddr + pfrag->offset;
|
||||
tail = page_address(page) + pfrag->offset;
|
||||
|
||||
esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto);
|
||||
|
||||
kunmap_atomic(vaddr);
|
||||
|
||||
nfrags = skb_shinfo(skb)->nr_frags;
|
||||
|
||||
__skb_fill_page_desc(skb, nfrags, page, pfrag->offset,
|
||||
|
@ -128,8 +128,42 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int
|
||||
ip6_finish_output_gso_slowpath_drop(struct net *net, struct sock *sk,
|
||||
struct sk_buff *skb, unsigned int mtu)
|
||||
{
|
||||
struct sk_buff *segs, *nskb;
|
||||
netdev_features_t features;
|
||||
int ret = 0;
|
||||
|
||||
/* Please see corresponding comment in ip_finish_output_gso
|
||||
* describing the cases where GSO segment length exceeds the
|
||||
* egress MTU.
|
||||
*/
|
||||
features = netif_skb_features(skb);
|
||||
segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
|
||||
if (IS_ERR_OR_NULL(segs)) {
|
||||
kfree_skb(skb);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
consume_skb(skb);
|
||||
|
||||
skb_list_walk_safe(segs, segs, nskb) {
|
||||
int err;
|
||||
|
||||
skb_mark_not_on_list(segs);
|
||||
err = ip6_fragment(net, sk, segs, ip6_finish_output2);
|
||||
if (err && ret == 0)
|
||||
ret = err;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
unsigned int mtu;
|
||||
int ret;
|
||||
|
||||
ret = BPF_CGROUP_RUN_PROG_INET_EGRESS(sk, skb);
|
||||
@ -146,7 +180,11 @@ static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *s
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) ||
|
||||
mtu = ip6_skb_dst_mtu(skb);
|
||||
if (skb_is_gso(skb) && !skb_gso_validate_mtu(skb, mtu))
|
||||
return ip6_finish_output_gso_slowpath_drop(net, sk, skb, mtu);
|
||||
|
||||
if ((skb->len > mtu && !skb_is_gso(skb)) ||
|
||||
dst_allfrag(skb_dst(skb)) ||
|
||||
(IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size))
|
||||
return ip6_fragment(net, sk, skb, ip6_finish_output2);
|
||||
|
@ -1582,8 +1582,11 @@ static int ipip6_newlink(struct net *src_net, struct net_device *dev,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IPV6_SIT_6RD
|
||||
if (ipip6_netlink_6rd_parms(data, &ip6rd))
|
||||
if (ipip6_netlink_6rd_parms(data, &ip6rd)) {
|
||||
err = ipip6_tunnel_update_6rd(nt, &ip6rd);
|
||||
if (err < 0)
|
||||
unregister_netdevice_queue(dev, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
return err;
|
||||
|
@ -537,6 +537,9 @@ nf_conntrack_hash_sysctl(struct ctl_table *table, int write,
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* module_param hashsize could have changed value */
|
||||
nf_conntrack_htable_size_user = nf_conntrack_htable_size;
|
||||
|
||||
ret = proc_dointvec(table, write, buffer, lenp, ppos);
|
||||
if (ret < 0 || !write)
|
||||
return ret;
|
||||
|
@ -1112,7 +1112,7 @@ static long rxrpc_read(const struct key *key,
|
||||
default: /* we have a ticket we can't encode */
|
||||
pr_err("Unsupported key token type (%u)\n",
|
||||
token->security_index);
|
||||
continue;
|
||||
return -ENOPKG;
|
||||
}
|
||||
|
||||
_debug("token[%u]: toksize=%u", ntoks, toksize);
|
||||
@ -1227,7 +1227,9 @@ static long rxrpc_read(const struct key *key,
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
pr_err("Unsupported key token type (%u)\n",
|
||||
token->security_index);
|
||||
return -ENOPKG;
|
||||
}
|
||||
|
||||
ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
|
||||
|
@ -184,7 +184,7 @@ static int rpc_parse_scope_id(struct net *net, const char *buf,
|
||||
scope_id = dev->ifindex;
|
||||
dev_put(dev);
|
||||
} else {
|
||||
if (kstrtou32(p, 10, &scope_id) == 0) {
|
||||
if (kstrtou32(p, 10, &scope_id) != 0) {
|
||||
kfree(p);
|
||||
return 0;
|
||||
}
|
||||
|
@ -882,9 +882,7 @@ void tipc_link_reset(struct tipc_link *l)
|
||||
int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
|
||||
struct sk_buff_head *xmitq)
|
||||
{
|
||||
struct tipc_msg *hdr = buf_msg(skb_peek(list));
|
||||
unsigned int maxwin = l->window;
|
||||
int imp = msg_importance(hdr);
|
||||
unsigned int mtu = l->mtu;
|
||||
u16 ack = l->rcv_nxt - 1;
|
||||
u16 seqno = l->snd_nxt;
|
||||
@ -893,13 +891,20 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
|
||||
struct sk_buff_head *backlogq = &l->backlogq;
|
||||
struct sk_buff *skb, *_skb, **tskb;
|
||||
int pkt_cnt = skb_queue_len(list);
|
||||
struct tipc_msg *hdr;
|
||||
int rc = 0;
|
||||
int imp;
|
||||
|
||||
if (pkt_cnt <= 0)
|
||||
return 0;
|
||||
|
||||
hdr = buf_msg(skb_peek(list));
|
||||
if (unlikely(msg_size(hdr) > mtu)) {
|
||||
skb_queue_purge(list);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
imp = msg_importance(hdr);
|
||||
/* Allow oversubscription of one data msg per source at congestion */
|
||||
if (unlikely(l->backlog[imp].len >= l->backlog[imp].limit)) {
|
||||
if (imp == TIPC_SYSTEM_IMPORTANCE) {
|
||||
|
@ -277,7 +277,9 @@ static void dump_common_audit_data(struct audit_buffer *ab,
|
||||
struct inode *inode;
|
||||
|
||||
audit_log_format(ab, " name=");
|
||||
spin_lock(&a->u.dentry->d_lock);
|
||||
audit_log_untrustedstring(ab, a->u.dentry->d_name.name);
|
||||
spin_unlock(&a->u.dentry->d_lock);
|
||||
|
||||
inode = d_backing_inode(a->u.dentry);
|
||||
if (inode) {
|
||||
@ -295,8 +297,9 @@ static void dump_common_audit_data(struct audit_buffer *ab,
|
||||
dentry = d_find_alias(inode);
|
||||
if (dentry) {
|
||||
audit_log_format(ab, " name=");
|
||||
audit_log_untrustedstring(ab,
|
||||
dentry->d_name.name);
|
||||
spin_lock(&dentry->d_lock);
|
||||
audit_log_untrustedstring(ab, dentry->d_name.name);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
dput(dentry);
|
||||
}
|
||||
audit_log_format(ab, " dev=");
|
||||
|
@ -99,7 +99,7 @@ static void transmit_midi_msg(struct snd_ff *ff, unsigned int port)
|
||||
|
||||
/* Set interval to next transaction. */
|
||||
ff->next_ktime[port] = ktime_add_ns(ktime_get(),
|
||||
len * 8 * NSEC_PER_SEC / 31250);
|
||||
len * 8 * (NSEC_PER_SEC / 31250));
|
||||
ff->rx_bytes[port] = len;
|
||||
|
||||
/*
|
||||
|
@ -210,7 +210,7 @@ static void midi_port_work(struct work_struct *work)
|
||||
|
||||
/* Set interval to next transaction. */
|
||||
port->next_ktime = ktime_add_ns(ktime_get(),
|
||||
port->consume_bytes * 8 * NSEC_PER_SEC / 31250);
|
||||
port->consume_bytes * 8 * (NSEC_PER_SEC / 31250));
|
||||
|
||||
/* Start this transaction. */
|
||||
port->idling = false;
|
||||
|
@ -212,6 +212,7 @@ static int cnl_set_dsp_D0(struct sst_dsp *ctx, unsigned int core_id)
|
||||
"dsp boot timeout, status=%#x error=%#x\n",
|
||||
sst_dsp_shim_read(ctx, CNL_ADSP_FW_STATUS),
|
||||
sst_dsp_shim_read(ctx, CNL_ADSP_ERROR_CODE));
|
||||
ret = -ETIMEDOUT;
|
||||
goto err;
|
||||
}
|
||||
} else {
|
||||
|
@ -2434,6 +2434,7 @@ void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w)
|
||||
enum snd_soc_dapm_direction dir;
|
||||
|
||||
list_del(&w->list);
|
||||
list_del(&w->dirty);
|
||||
/*
|
||||
* remove source and sink paths associated to this widget.
|
||||
* While removing the path, remove reference to it from both
|
||||
|
Loading…
x
Reference in New Issue
Block a user