This is the 4.9.155 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlxbDFsACgkQONu9yGCS aT4TmQ/+PCgz7TKTu1/Sh7ScmbSjlYFfaQ25K9NzqWDuaTOXCsvrWY4IDdbk7fxZ WnM8WPpTUfKaRwUVL3T32uwv/uMM8TnXN2r4dB9TH+WF/UK1ovLHQGO5zGWS9erY dvckRjkRuPe27KYd/sPSA7PRBiWuw1EFqcBIdAuC8OJK1knm3W95C8XVeIkVfey2 /NFIvZELYEOCMzXwPqXbeFG553VtHVGB2GRJqEqZzqZ+JGnUCyBpCgvuwbrQ706l /Smvz23mmElUGzdTXr4uRPmf2g8bA3a+08/gQM4YPpZYRUMbcCVE3+KaYf3jjJPR Inj+cKBhF8R6JwkJayzdBJ1KbG6e6DaL2yANqNvoeYCkyP+4GNmoWKebFYklrXr/ jn/btnJtHwSBDVufdgW6uQ039UE66Wfvvi7QrkCgTjebEyf6jU3SnB8Z7HpZZMCg dwgO6rHKklm6cSJTBZsIDyBd4oj19bTTvOiUcaayQXfeyjlrbWXhH6UOEBze54uT Ho8yjCq9r2TiO6g9mJOfkkvep1hgNVgabnOyA/papUx3my9sGkUn1Rqg1Pbm9OEF PV4p853t4+Qe5iBq+yXgacrCg+21q9Xg3ct6QW/c/Quz4UirR9Ayw93C4ej4rJYZ 79/mADmkpH+A1ufP2F80UoWo0IN9oizecfYHOZ+6useUEVgIRik= =QoXP -----END PGP SIGNATURE----- Merge 4.9.155 into android-4.9 Changes in 4.9.155 Fix "net: ipv4: do not handle duplicate fragments as overlapping" fs: add the fsnotify call to vfs_iter_write ipv6: Consider sk_bound_dev_if when binding a socket to an address l2tp: copy 4 more bytes to linear part if necessary net/mlx4_core: Add masking for a few queries on HCA caps netrom: switch to sock timer API net/rose: fix NULL ax25_cb kernel panic ucc_geth: Reset BQL queue when stopping device net/mlx5e: Allow MAC invalidation while spoofchk is ON l2tp: remove l2specific_len dependency in l2tp_core l2tp: fix reading optional fields of L2TPv3 ipvlan, l3mdev: fix broken l3s mode wrt local routes CIFS: Do not count -ENODATA as failure for query directory fs/dcache: Fix incorrect nr_dentry_unused accounting in shrink_dcache_sb() ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment arm64: kaslr: ensure randomized quantities are clean also when kaslr is off arm64: hyp-stub: Forbid kprobing of the hyp-stub arm64: hibernate: Clean the __hyp_text to PoC after resume gfs2: Revert "Fix loop in gfs2_rbm_find" platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK platform/x86: asus-nb-wmi: Drop mapping of 0x33 and 0x34 scan codes mmc: sdhci-iproc: handle mmc_of_parse() errors during probe kernel/exit.c: release ptraced tasks before zap_pid_ns_processes mm, oom: fix use-after-free in oom_kill_process mm: hwpoison: use do_send_sig_info() instead of force_sig() mm: migrate: don't rely on __PageMovable() of newpage after unlocking it cifs: Always resolve hostname before reconnecting drivers: core: Remove glue dirs from sysfs earlier fs: don't scan the inode cache before SB_BORN is set fanotify: fix handling of events on child sub-directory Linux 4.9.155 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
32e6695e35
34 changed files with 292 additions and 106 deletions
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 9
|
PATCHLEVEL = 9
|
||||||
SUBLEVEL = 154
|
SUBLEVEL = 155
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Roaring Lionus
|
NAME = Roaring Lionus
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ static void __iomem *cns3xxx_pci_map_bus(struct pci_bus *bus,
|
||||||
} else /* remote PCI bus */
|
} else /* remote PCI bus */
|
||||||
base = cnspci->cfg1_regs + ((busno & 0xf) << 20);
|
base = cnspci->cfg1_regs + ((busno & 0xf) << 20);
|
||||||
|
|
||||||
return base + (where & 0xffc) + (devfn << 12);
|
return base + where + (devfn << 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||||
|
|
|
||||||
|
|
@ -294,8 +294,10 @@ int swsusp_arch_suspend(void)
|
||||||
dcache_clean_range(__idmap_text_start, __idmap_text_end);
|
dcache_clean_range(__idmap_text_start, __idmap_text_end);
|
||||||
|
|
||||||
/* Clean kvm setup code to PoC? */
|
/* Clean kvm setup code to PoC? */
|
||||||
if (el2_reset_needed())
|
if (el2_reset_needed()) {
|
||||||
dcache_clean_range(__hyp_idmap_text_start, __hyp_idmap_text_end);
|
dcache_clean_range(__hyp_idmap_text_start, __hyp_idmap_text_end);
|
||||||
|
dcache_clean_range(__hyp_text_start, __hyp_text_end);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tell the hibernation core that we've just restored
|
* Tell the hibernation core that we've just restored
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
#include <asm/virt.h>
|
#include <asm/virt.h>
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
.pushsection .hyp.text, "ax"
|
||||||
|
|
||||||
.align 11
|
.align 11
|
||||||
|
|
||||||
ENTRY(__hyp_stub_vectors)
|
ENTRY(__hyp_stub_vectors)
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ u64 __init kaslr_early_init(u64 dt_phys, u64 modulo_offset)
|
||||||
* we end up running with module randomization disabled.
|
* we end up running with module randomization disabled.
|
||||||
*/
|
*/
|
||||||
module_alloc_base = (u64)_etext - MODULES_VSIZE;
|
module_alloc_base = (u64)_etext - MODULES_VSIZE;
|
||||||
|
__flush_dcache_area(&module_alloc_base, sizeof(module_alloc_base));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to map the FDT early. If this fails, we simply bail,
|
* Try to map the FDT early. If this fails, we simply bail,
|
||||||
|
|
|
||||||
|
|
@ -862,6 +862,8 @@ static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mutex_lock(&gdp_mutex);
|
mutex_lock(&gdp_mutex);
|
||||||
|
if (!kobject_has_children(glue_dir))
|
||||||
|
kobject_del(glue_dir);
|
||||||
kobject_put(glue_dir);
|
kobject_put(glue_dir);
|
||||||
mutex_unlock(&gdp_mutex);
|
mutex_unlock(&gdp_mutex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
iproc_host->data = iproc_data;
|
iproc_host->data = iproc_data;
|
||||||
|
|
||||||
mmc_of_parse(host->mmc);
|
ret = mmc_of_parse(host->mmc);
|
||||||
|
if (ret)
|
||||||
|
goto err;
|
||||||
|
|
||||||
sdhci_get_of_property(pdev);
|
sdhci_get_of_property(pdev);
|
||||||
|
|
||||||
host->mmc->caps |= iproc_host->data->mmc_caps;
|
host->mmc->caps |= iproc_host->data->mmc_caps;
|
||||||
|
|
|
||||||
|
|
@ -1888,6 +1888,8 @@ static void ucc_geth_free_tx(struct ucc_geth_private *ugeth)
|
||||||
u16 i, j;
|
u16 i, j;
|
||||||
u8 __iomem *bd;
|
u8 __iomem *bd;
|
||||||
|
|
||||||
|
netdev_reset_queue(ugeth->ndev);
|
||||||
|
|
||||||
ug_info = ugeth->ug_info;
|
ug_info = ugeth->ug_info;
|
||||||
uf_info = &ug_info->uf_info;
|
uf_info = &ug_info->uf_info;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2037,9 +2037,11 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev,
|
||||||
{
|
{
|
||||||
struct mlx4_cmd_mailbox *mailbox;
|
struct mlx4_cmd_mailbox *mailbox;
|
||||||
__be32 *outbox;
|
__be32 *outbox;
|
||||||
|
u64 qword_field;
|
||||||
u32 dword_field;
|
u32 dword_field;
|
||||||
int err;
|
u16 word_field;
|
||||||
u8 byte_field;
|
u8 byte_field;
|
||||||
|
int err;
|
||||||
static const u8 a0_dmfs_query_hw_steering[] = {
|
static const u8 a0_dmfs_query_hw_steering[] = {
|
||||||
[0] = MLX4_STEERING_DMFS_A0_DEFAULT,
|
[0] = MLX4_STEERING_DMFS_A0_DEFAULT,
|
||||||
[1] = MLX4_STEERING_DMFS_A0_DYNAMIC,
|
[1] = MLX4_STEERING_DMFS_A0_DYNAMIC,
|
||||||
|
|
@ -2067,19 +2069,32 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev,
|
||||||
|
|
||||||
/* QPC/EEC/CQC/EQC/RDMARC attributes */
|
/* QPC/EEC/CQC/EQC/RDMARC attributes */
|
||||||
|
|
||||||
MLX4_GET(param->qpc_base, outbox, INIT_HCA_QPC_BASE_OFFSET);
|
MLX4_GET(qword_field, outbox, INIT_HCA_QPC_BASE_OFFSET);
|
||||||
MLX4_GET(param->log_num_qps, outbox, INIT_HCA_LOG_QP_OFFSET);
|
param->qpc_base = qword_field & ~((u64)0x1f);
|
||||||
MLX4_GET(param->srqc_base, outbox, INIT_HCA_SRQC_BASE_OFFSET);
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_QP_OFFSET);
|
||||||
MLX4_GET(param->log_num_srqs, outbox, INIT_HCA_LOG_SRQ_OFFSET);
|
param->log_num_qps = byte_field & 0x1f;
|
||||||
MLX4_GET(param->cqc_base, outbox, INIT_HCA_CQC_BASE_OFFSET);
|
MLX4_GET(qword_field, outbox, INIT_HCA_SRQC_BASE_OFFSET);
|
||||||
MLX4_GET(param->log_num_cqs, outbox, INIT_HCA_LOG_CQ_OFFSET);
|
param->srqc_base = qword_field & ~((u64)0x1f);
|
||||||
MLX4_GET(param->altc_base, outbox, INIT_HCA_ALTC_BASE_OFFSET);
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_SRQ_OFFSET);
|
||||||
MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET);
|
param->log_num_srqs = byte_field & 0x1f;
|
||||||
MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET);
|
MLX4_GET(qword_field, outbox, INIT_HCA_CQC_BASE_OFFSET);
|
||||||
MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET);
|
param->cqc_base = qword_field & ~((u64)0x1f);
|
||||||
MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET);
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_CQ_OFFSET);
|
||||||
MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET);
|
param->log_num_cqs = byte_field & 0x1f;
|
||||||
MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET);
|
MLX4_GET(qword_field, outbox, INIT_HCA_ALTC_BASE_OFFSET);
|
||||||
|
param->altc_base = qword_field;
|
||||||
|
MLX4_GET(qword_field, outbox, INIT_HCA_AUXC_BASE_OFFSET);
|
||||||
|
param->auxc_base = qword_field;
|
||||||
|
MLX4_GET(qword_field, outbox, INIT_HCA_EQC_BASE_OFFSET);
|
||||||
|
param->eqc_base = qword_field & ~((u64)0x1f);
|
||||||
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_EQ_OFFSET);
|
||||||
|
param->log_num_eqs = byte_field & 0x1f;
|
||||||
|
MLX4_GET(word_field, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET);
|
||||||
|
param->num_sys_eqs = word_field & 0xfff;
|
||||||
|
MLX4_GET(qword_field, outbox, INIT_HCA_RDMARC_BASE_OFFSET);
|
||||||
|
param->rdmarc_base = qword_field & ~((u64)0x1f);
|
||||||
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_RD_OFFSET);
|
||||||
|
param->log_rd_per_qp = byte_field & 0x7;
|
||||||
|
|
||||||
MLX4_GET(dword_field, outbox, INIT_HCA_FLAGS_OFFSET);
|
MLX4_GET(dword_field, outbox, INIT_HCA_FLAGS_OFFSET);
|
||||||
if (dword_field & (1 << INIT_HCA_DEVICE_MANAGED_FLOW_STEERING_EN)) {
|
if (dword_field & (1 << INIT_HCA_DEVICE_MANAGED_FLOW_STEERING_EN)) {
|
||||||
|
|
@ -2098,22 +2113,21 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev,
|
||||||
/* steering attributes */
|
/* steering attributes */
|
||||||
if (param->steering_mode == MLX4_STEERING_MODE_DEVICE_MANAGED) {
|
if (param->steering_mode == MLX4_STEERING_MODE_DEVICE_MANAGED) {
|
||||||
MLX4_GET(param->mc_base, outbox, INIT_HCA_FS_BASE_OFFSET);
|
MLX4_GET(param->mc_base, outbox, INIT_HCA_FS_BASE_OFFSET);
|
||||||
MLX4_GET(param->log_mc_entry_sz, outbox,
|
MLX4_GET(byte_field, outbox, INIT_HCA_FS_LOG_ENTRY_SZ_OFFSET);
|
||||||
INIT_HCA_FS_LOG_ENTRY_SZ_OFFSET);
|
param->log_mc_entry_sz = byte_field & 0x1f;
|
||||||
MLX4_GET(param->log_mc_table_sz, outbox,
|
MLX4_GET(byte_field, outbox, INIT_HCA_FS_LOG_TABLE_SZ_OFFSET);
|
||||||
INIT_HCA_FS_LOG_TABLE_SZ_OFFSET);
|
param->log_mc_table_sz = byte_field & 0x1f;
|
||||||
MLX4_GET(byte_field, outbox,
|
MLX4_GET(byte_field, outbox, INIT_HCA_FS_A0_OFFSET);
|
||||||
INIT_HCA_FS_A0_OFFSET);
|
|
||||||
param->dmfs_high_steer_mode =
|
param->dmfs_high_steer_mode =
|
||||||
a0_dmfs_query_hw_steering[(byte_field >> 6) & 3];
|
a0_dmfs_query_hw_steering[(byte_field >> 6) & 3];
|
||||||
} else {
|
} else {
|
||||||
MLX4_GET(param->mc_base, outbox, INIT_HCA_MC_BASE_OFFSET);
|
MLX4_GET(param->mc_base, outbox, INIT_HCA_MC_BASE_OFFSET);
|
||||||
MLX4_GET(param->log_mc_entry_sz, outbox,
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_MC_ENTRY_SZ_OFFSET);
|
||||||
INIT_HCA_LOG_MC_ENTRY_SZ_OFFSET);
|
param->log_mc_entry_sz = byte_field & 0x1f;
|
||||||
MLX4_GET(param->log_mc_hash_sz, outbox,
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_MC_HASH_SZ_OFFSET);
|
||||||
INIT_HCA_LOG_MC_HASH_SZ_OFFSET);
|
param->log_mc_hash_sz = byte_field & 0x1f;
|
||||||
MLX4_GET(param->log_mc_table_sz, outbox,
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_MC_TABLE_SZ_OFFSET);
|
||||||
INIT_HCA_LOG_MC_TABLE_SZ_OFFSET);
|
param->log_mc_table_sz = byte_field & 0x1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CX3 is capable of extending CQEs/EQEs from 32 to 64 bytes */
|
/* CX3 is capable of extending CQEs/EQEs from 32 to 64 bytes */
|
||||||
|
|
@ -2137,15 +2151,18 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev,
|
||||||
/* TPT attributes */
|
/* TPT attributes */
|
||||||
|
|
||||||
MLX4_GET(param->dmpt_base, outbox, INIT_HCA_DMPT_BASE_OFFSET);
|
MLX4_GET(param->dmpt_base, outbox, INIT_HCA_DMPT_BASE_OFFSET);
|
||||||
MLX4_GET(param->mw_enabled, outbox, INIT_HCA_TPT_MW_OFFSET);
|
MLX4_GET(byte_field, outbox, INIT_HCA_TPT_MW_OFFSET);
|
||||||
MLX4_GET(param->log_mpt_sz, outbox, INIT_HCA_LOG_MPT_SZ_OFFSET);
|
param->mw_enabled = byte_field >> 7;
|
||||||
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_MPT_SZ_OFFSET);
|
||||||
|
param->log_mpt_sz = byte_field & 0x3f;
|
||||||
MLX4_GET(param->mtt_base, outbox, INIT_HCA_MTT_BASE_OFFSET);
|
MLX4_GET(param->mtt_base, outbox, INIT_HCA_MTT_BASE_OFFSET);
|
||||||
MLX4_GET(param->cmpt_base, outbox, INIT_HCA_CMPT_BASE_OFFSET);
|
MLX4_GET(param->cmpt_base, outbox, INIT_HCA_CMPT_BASE_OFFSET);
|
||||||
|
|
||||||
/* UAR attributes */
|
/* UAR attributes */
|
||||||
|
|
||||||
MLX4_GET(param->uar_page_sz, outbox, INIT_HCA_UAR_PAGE_SZ_OFFSET);
|
MLX4_GET(param->uar_page_sz, outbox, INIT_HCA_UAR_PAGE_SZ_OFFSET);
|
||||||
MLX4_GET(param->log_uar_sz, outbox, INIT_HCA_LOG_UAR_SZ_OFFSET);
|
MLX4_GET(byte_field, outbox, INIT_HCA_LOG_UAR_SZ_OFFSET);
|
||||||
|
param->log_uar_sz = byte_field & 0xf;
|
||||||
|
|
||||||
/* phv_check enable */
|
/* phv_check enable */
|
||||||
MLX4_GET(byte_field, outbox, INIT_HCA_CACHELINE_SZ_OFFSET);
|
MLX4_GET(byte_field, outbox, INIT_HCA_CACHELINE_SZ_OFFSET);
|
||||||
|
|
|
||||||
|
|
@ -1216,14 +1216,6 @@ static int esw_vport_ingress_config(struct mlx5_eswitch *esw,
|
||||||
int err = 0;
|
int err = 0;
|
||||||
u8 *smac_v;
|
u8 *smac_v;
|
||||||
|
|
||||||
if (vport->info.spoofchk && !is_valid_ether_addr(vport->info.mac)) {
|
|
||||||
mlx5_core_warn(esw->dev,
|
|
||||||
"vport[%d] configure ingress rules failed, illegal mac with spoofchk\n",
|
|
||||||
vport->vport);
|
|
||||||
return -EPERM;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
esw_vport_cleanup_ingress_rules(esw, vport);
|
esw_vport_cleanup_ingress_rules(esw, vport);
|
||||||
|
|
||||||
if (!vport->info.vlan && !vport->info.qos && !vport->info.spoofchk) {
|
if (!vport->info.vlan && !vport->info.qos && !vport->info.spoofchk) {
|
||||||
|
|
@ -1709,13 +1701,10 @@ int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw,
|
||||||
mutex_lock(&esw->state_lock);
|
mutex_lock(&esw->state_lock);
|
||||||
evport = &esw->vports[vport];
|
evport = &esw->vports[vport];
|
||||||
|
|
||||||
if (evport->info.spoofchk && !is_valid_ether_addr(mac)) {
|
if (evport->info.spoofchk && !is_valid_ether_addr(mac))
|
||||||
mlx5_core_warn(esw->dev,
|
mlx5_core_warn(esw->dev,
|
||||||
"MAC invalidation is not allowed when spoofchk is on, vport(%d)\n",
|
"Set invalid MAC while spoofchk is on, vport(%d)\n",
|
||||||
vport);
|
vport);
|
||||||
err = -EPERM;
|
|
||||||
goto unlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = mlx5_modify_nic_vport_mac_address(esw->dev, vport, mac);
|
err = mlx5_modify_nic_vport_mac_address(esw->dev, vport, mac);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
@ -1859,6 +1848,10 @@ int mlx5_eswitch_set_vport_spoofchk(struct mlx5_eswitch *esw,
|
||||||
evport = &esw->vports[vport];
|
evport = &esw->vports[vport];
|
||||||
pschk = evport->info.spoofchk;
|
pschk = evport->info.spoofchk;
|
||||||
evport->info.spoofchk = spoofchk;
|
evport->info.spoofchk = spoofchk;
|
||||||
|
if (pschk && !is_valid_ether_addr(evport->info.mac))
|
||||||
|
mlx5_core_warn(esw->dev,
|
||||||
|
"Spoofchk in set while MAC is invalid, vport(%d)\n",
|
||||||
|
evport->vport);
|
||||||
if (evport->enabled && esw->mode == SRIOV_LEGACY)
|
if (evport->enabled && esw->mode == SRIOV_LEGACY)
|
||||||
err = esw_vport_ingress_config(esw, evport);
|
err = esw_vport_ingress_config(esw, evport);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,12 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval)
|
||||||
err = ipvlan_register_nf_hook();
|
err = ipvlan_register_nf_hook();
|
||||||
if (!err) {
|
if (!err) {
|
||||||
mdev->l3mdev_ops = &ipvl_l3mdev_ops;
|
mdev->l3mdev_ops = &ipvl_l3mdev_ops;
|
||||||
mdev->priv_flags |= IFF_L3MDEV_MASTER;
|
mdev->priv_flags |= IFF_L3MDEV_RX_HANDLER;
|
||||||
} else
|
} else
|
||||||
goto fail;
|
goto fail;
|
||||||
} else if (port->mode == IPVLAN_MODE_L3S) {
|
} else if (port->mode == IPVLAN_MODE_L3S) {
|
||||||
/* Old mode was L3S */
|
/* Old mode was L3S */
|
||||||
mdev->priv_flags &= ~IFF_L3MDEV_MASTER;
|
mdev->priv_flags &= ~IFF_L3MDEV_RX_HANDLER;
|
||||||
ipvlan_unregister_nf_hook();
|
ipvlan_unregister_nf_hook();
|
||||||
mdev->l3mdev_ops = NULL;
|
mdev->l3mdev_ops = NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -158,7 +158,7 @@ static void ipvlan_port_destroy(struct net_device *dev)
|
||||||
|
|
||||||
dev->priv_flags &= ~IFF_IPVLAN_MASTER;
|
dev->priv_flags &= ~IFF_IPVLAN_MASTER;
|
||||||
if (port->mode == IPVLAN_MODE_L3S) {
|
if (port->mode == IPVLAN_MODE_L3S) {
|
||||||
dev->priv_flags &= ~IFF_L3MDEV_MASTER;
|
dev->priv_flags &= ~IFF_L3MDEV_RX_HANDLER;
|
||||||
ipvlan_unregister_nf_hook();
|
ipvlan_unregister_nf_hook();
|
||||||
dev->l3mdev_ops = NULL;
|
dev->l3mdev_ops = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -477,8 +477,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
|
||||||
{ KE_KEY, 0x30, { KEY_VOLUMEUP } },
|
{ KE_KEY, 0x30, { KEY_VOLUMEUP } },
|
||||||
{ KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
|
{ KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
|
||||||
{ KE_KEY, 0x32, { KEY_MUTE } },
|
{ KE_KEY, 0x32, { KEY_MUTE } },
|
||||||
{ KE_KEY, 0x33, { KEY_DISPLAYTOGGLE } }, /* LCD on */
|
{ KE_KEY, 0x35, { KEY_SCREENLOCK } },
|
||||||
{ KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */
|
|
||||||
{ KE_KEY, 0x40, { KEY_PREVIOUSSONG } },
|
{ KE_KEY, 0x40, { KEY_PREVIOUSSONG } },
|
||||||
{ KE_KEY, 0x41, { KEY_NEXTSONG } },
|
{ KE_KEY, 0x41, { KEY_NEXTSONG } },
|
||||||
{ KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */
|
{ KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
#include "cifs_unicode.h"
|
#include "cifs_unicode.h"
|
||||||
#include "cifs_debug.h"
|
#include "cifs_debug.h"
|
||||||
#include "cifs_fs_sb.h"
|
#include "cifs_fs_sb.h"
|
||||||
|
#include "dns_resolve.h"
|
||||||
#include "ntlmssp.h"
|
#include "ntlmssp.h"
|
||||||
#include "nterr.h"
|
#include "nterr.h"
|
||||||
#include "rfc1002pdu.h"
|
#include "rfc1002pdu.h"
|
||||||
|
|
@ -306,6 +307,53 @@ static void cifs_prune_tlinks(struct work_struct *work);
|
||||||
static int cifs_setup_volume_info(struct smb_vol *volume_info, char *mount_data,
|
static int cifs_setup_volume_info(struct smb_vol *volume_info, char *mount_data,
|
||||||
const char *devname);
|
const char *devname);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resolve hostname and set ip addr in tcp ses. Useful for hostnames that may
|
||||||
|
* get their ip addresses changed at some point.
|
||||||
|
*
|
||||||
|
* This should be called with server->srv_mutex held.
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_CIFS_DFS_UPCALL
|
||||||
|
static int reconn_set_ipaddr(struct TCP_Server_Info *server)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
int len;
|
||||||
|
char *unc, *ipaddr = NULL;
|
||||||
|
|
||||||
|
if (!server->hostname)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
len = strlen(server->hostname) + 3;
|
||||||
|
|
||||||
|
unc = kmalloc(len, GFP_KERNEL);
|
||||||
|
if (!unc) {
|
||||||
|
cifs_dbg(FYI, "%s: failed to create UNC path\n", __func__);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
snprintf(unc, len, "\\\\%s", server->hostname);
|
||||||
|
|
||||||
|
rc = dns_resolve_server_name_to_ip(unc, &ipaddr);
|
||||||
|
kfree(unc);
|
||||||
|
|
||||||
|
if (rc < 0) {
|
||||||
|
cifs_dbg(FYI, "%s: failed to resolve server part of %s to IP: %d\n",
|
||||||
|
__func__, server->hostname, rc);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr,
|
||||||
|
strlen(ipaddr));
|
||||||
|
kfree(ipaddr);
|
||||||
|
|
||||||
|
return !rc ? -1 : 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int reconn_set_ipaddr(struct TCP_Server_Info *server)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cifs tcp session reconnection
|
* cifs tcp session reconnection
|
||||||
*
|
*
|
||||||
|
|
@ -403,6 +451,11 @@ cifs_reconnect(struct TCP_Server_Info *server)
|
||||||
rc = generic_ip_connect(server);
|
rc = generic_ip_connect(server);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
cifs_dbg(FYI, "reconnect error %d\n", rc);
|
cifs_dbg(FYI, "reconnect error %d\n", rc);
|
||||||
|
rc = reconn_set_ipaddr(server);
|
||||||
|
if (rc) {
|
||||||
|
cifs_dbg(FYI, "%s: failed to resolve hostname: %d\n",
|
||||||
|
__func__, rc);
|
||||||
|
}
|
||||||
mutex_unlock(&server->srv_mutex);
|
mutex_unlock(&server->srv_mutex);
|
||||||
msleep(3000);
|
msleep(3000);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -2686,8 +2686,8 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
|
||||||
if (rc == -ENODATA && rsp->hdr.Status == STATUS_NO_MORE_FILES) {
|
if (rc == -ENODATA && rsp->hdr.Status == STATUS_NO_MORE_FILES) {
|
||||||
srch_inf->endOfSearch = true;
|
srch_inf->endOfSearch = true;
|
||||||
rc = 0;
|
rc = 0;
|
||||||
}
|
} else
|
||||||
cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE);
|
cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE);
|
||||||
goto qdir_exit;
|
goto qdir_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1164,15 +1164,11 @@ static enum lru_status dentry_lru_isolate_shrink(struct list_head *item,
|
||||||
*/
|
*/
|
||||||
void shrink_dcache_sb(struct super_block *sb)
|
void shrink_dcache_sb(struct super_block *sb)
|
||||||
{
|
{
|
||||||
long freed;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
LIST_HEAD(dispose);
|
LIST_HEAD(dispose);
|
||||||
|
|
||||||
freed = list_lru_walk(&sb->s_dentry_lru,
|
list_lru_walk(&sb->s_dentry_lru,
|
||||||
dentry_lru_isolate_shrink, &dispose, 1024);
|
dentry_lru_isolate_shrink, &dispose, 1024);
|
||||||
|
|
||||||
this_cpu_sub(nr_dentry_unused, freed);
|
|
||||||
shrink_dentry_list(&dispose);
|
shrink_dentry_list(&dispose);
|
||||||
cond_resched();
|
cond_resched();
|
||||||
} while (list_lru_count(&sb->s_dentry_lru) > 0);
|
} while (list_lru_count(&sb->s_dentry_lru) > 0);
|
||||||
|
|
|
||||||
|
|
@ -1705,9 +1705,9 @@ static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext,
|
||||||
goto next_iter;
|
goto next_iter;
|
||||||
}
|
}
|
||||||
if (ret == -E2BIG) {
|
if (ret == -E2BIG) {
|
||||||
n += rbm->bii - initial_bii;
|
|
||||||
rbm->bii = 0;
|
rbm->bii = 0;
|
||||||
rbm->offset = 0;
|
rbm->offset = 0;
|
||||||
|
n += (rbm->bii - initial_bii);
|
||||||
goto res_covered_end_of_rgrp;
|
goto res_covered_end_of_rgrp;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -101,9 +101,9 @@ int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
|
||||||
parent = dget_parent(dentry);
|
parent = dget_parent(dentry);
|
||||||
p_inode = parent->d_inode;
|
p_inode = parent->d_inode;
|
||||||
|
|
||||||
if (unlikely(!fsnotify_inode_watches_children(p_inode)))
|
if (unlikely(!fsnotify_inode_watches_children(p_inode))) {
|
||||||
__fsnotify_update_child_dentry_flags(p_inode);
|
__fsnotify_update_child_dentry_flags(p_inode);
|
||||||
else if (p_inode->i_fsnotify_mask & mask) {
|
} else if (p_inode->i_fsnotify_mask & mask & ~FS_EVENT_ON_CHILD) {
|
||||||
struct name_snapshot name;
|
struct name_snapshot name;
|
||||||
|
|
||||||
/* we are notifying a parent so come up with the new mask which
|
/* we are notifying a parent so come up with the new mask which
|
||||||
|
|
@ -207,6 +207,10 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
|
||||||
else
|
else
|
||||||
mnt = NULL;
|
mnt = NULL;
|
||||||
|
|
||||||
|
/* An event "on child" is not intended for a mount mark */
|
||||||
|
if (mask & FS_EVENT_ON_CHILD)
|
||||||
|
mnt = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optimization: srcu_read_lock() has a memory barrier which can
|
* Optimization: srcu_read_lock() has a memory barrier which can
|
||||||
* be expensive. It protects walking the *_fsnotify_marks lists.
|
* be expensive. It protects walking the *_fsnotify_marks lists.
|
||||||
|
|
|
||||||
|
|
@ -389,8 +389,10 @@ ssize_t vfs_iter_write(struct file *file, struct iov_iter *iter, loff_t *ppos)
|
||||||
iter->type |= WRITE;
|
iter->type |= WRITE;
|
||||||
ret = file->f_op->write_iter(&kiocb, iter);
|
ret = file->f_op->write_iter(&kiocb, iter);
|
||||||
BUG_ON(ret == -EIOCBQUEUED);
|
BUG_ON(ret == -EIOCBQUEUED);
|
||||||
if (ret > 0)
|
if (ret > 0) {
|
||||||
*ppos = kiocb.ki_pos;
|
*ppos = kiocb.ki_pos;
|
||||||
|
fsnotify_modify(file);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(vfs_iter_write);
|
EXPORT_SYMBOL(vfs_iter_write);
|
||||||
|
|
|
||||||
30
fs/super.c
30
fs/super.c
|
|
@ -119,13 +119,23 @@ static unsigned long super_cache_count(struct shrinker *shrink,
|
||||||
sb = container_of(shrink, struct super_block, s_shrink);
|
sb = container_of(shrink, struct super_block, s_shrink);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't call trylock_super as it is a potential
|
* We don't call trylock_super() here as it is a scalability bottleneck,
|
||||||
* scalability bottleneck. The counts could get updated
|
* so we're exposed to partial setup state. The shrinker rwsem does not
|
||||||
* between super_cache_count and super_cache_scan anyway.
|
* protect filesystem operations backing list_lru_shrink_count() or
|
||||||
* Call to super_cache_count with shrinker_rwsem held
|
* s_op->nr_cached_objects(). Counts can change between
|
||||||
* ensures the safety of call to list_lru_shrink_count() and
|
* super_cache_count and super_cache_scan, so we really don't need locks
|
||||||
* s_op->nr_cached_objects().
|
* here.
|
||||||
|
*
|
||||||
|
* However, if we are currently mounting the superblock, the underlying
|
||||||
|
* filesystem might be in a state of partial construction and hence it
|
||||||
|
* is dangerous to access it. trylock_super() uses a MS_BORN check to
|
||||||
|
* avoid this situation, so do the same here. The memory barrier is
|
||||||
|
* matched with the one in mount_fs() as we don't hold locks here.
|
||||||
*/
|
*/
|
||||||
|
if (!(sb->s_flags & MS_BORN))
|
||||||
|
return 0;
|
||||||
|
smp_rmb();
|
||||||
|
|
||||||
if (sb->s_op && sb->s_op->nr_cached_objects)
|
if (sb->s_op && sb->s_op->nr_cached_objects)
|
||||||
total_objects = sb->s_op->nr_cached_objects(sb, sc);
|
total_objects = sb->s_op->nr_cached_objects(sb, sc);
|
||||||
|
|
||||||
|
|
@ -1211,6 +1221,14 @@ mount_fs(struct file_system_type *type, int flags, const char *name, struct vfsm
|
||||||
sb = root->d_sb;
|
sb = root->d_sb;
|
||||||
BUG_ON(!sb);
|
BUG_ON(!sb);
|
||||||
WARN_ON(!sb->s_bdi);
|
WARN_ON(!sb->s_bdi);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write barrier is for super_cache_count(). We place it before setting
|
||||||
|
* MS_BORN as the data dependency between the two functions is the
|
||||||
|
* superblock structure contents that we just set up, not the MS_BORN
|
||||||
|
* flag.
|
||||||
|
*/
|
||||||
|
smp_wmb();
|
||||||
sb->s_flags |= MS_BORN;
|
sb->s_flags |= MS_BORN;
|
||||||
|
|
||||||
error = security_sb_kern_mount(sb, flags, secdata);
|
error = security_sb_kern_mount(sb, flags, secdata);
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,23 @@ extern void kobject_put(struct kobject *kobj);
|
||||||
extern const void *kobject_namespace(struct kobject *kobj);
|
extern const void *kobject_namespace(struct kobject *kobj);
|
||||||
extern char *kobject_get_path(struct kobject *kobj, gfp_t flag);
|
extern char *kobject_get_path(struct kobject *kobj, gfp_t flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* kobject_has_children - Returns whether a kobject has children.
|
||||||
|
* @kobj: the object to test
|
||||||
|
*
|
||||||
|
* This will return whether a kobject has other kobjects as children.
|
||||||
|
*
|
||||||
|
* It does NOT account for the presence of attribute files, only sub
|
||||||
|
* directories. It also assumes there is no concurrent addition or
|
||||||
|
* removal of such children, and thus relies on external locking.
|
||||||
|
*/
|
||||||
|
static inline bool kobject_has_children(struct kobject *kobj)
|
||||||
|
{
|
||||||
|
WARN_ON_ONCE(atomic_read(&kobj->kref.refcount) == 0);
|
||||||
|
|
||||||
|
return kobj->sd && kobj->sd->dir.subdirs;
|
||||||
|
}
|
||||||
|
|
||||||
struct kobj_type {
|
struct kobj_type {
|
||||||
void (*release)(struct kobject *kobj);
|
void (*release)(struct kobject *kobj);
|
||||||
const struct sysfs_ops *sysfs_ops;
|
const struct sysfs_ops *sysfs_ops;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue