Merge 4.9.226 into android-4.9-q
Changes in 4.9.226 ax25: fix setsockopt(SO_BINDTODEVICE) net: ipip: fix wrong address family in init error path net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()" net sched: fix reporting the first-time use timestamp sctp: Start shutdown on association restart if in SHUTDOWN-SENT state and socket is closed net/mlx5e: Update netdev txq on completions during closure net: qrtr: Fix passing invalid reference to qrtr_local_enqueue() net/mlx5: Add command entry handling completion net: sun: fix missing release regions in cas_init_one(). net/mlx4_core: fix a memory leak bug. uapi: fix linux/if_pppol2tp.h userspace compilation errors IB/cma: Fix reference count leak when no ipv4 addresses are set gpio: tegra: mask GPIO IRQs during IRQ shutdown net: microchip: encx24j600: add missed kthread_stop gfs2: move privileged user check to gfs2_quota_lock_check cachefiles: Fix race between read_waiter and read_copier involving op->to_do usb: gadget: legacy: fix redundant initialization warnings cifs: Fix null pointer check in cifs_read Input: usbtouchscreen - add support for BonXeon TP Input: evdev - call input_flush_device() on release(), not flush() Input: xpad - add custom init packet for Xbox One S controllers Input: i8042 - add ThinkPad S230u to i8042 reset list Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() IB/qib: Call kobject_put() when kobject_init_and_add() fails ARM: dts: imx: Correct B850v3 clock assignment ARM: dts: imx6q-bx50v3: Add internal switch ARM: dts/imx6q-bx50v3: Set display interface clock parents ALSA: hwdep: fix a left shifting 1 by 31 UB bug ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC exec: Always set cap_ambient in cap_bprm_set_creds libceph: ignore pool overlay and cache logic on redirects mm: remove VM_BUG_ON(PageSlab()) from page_mapcount() fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info() include/asm-generic/topology.h: guard cpumask_of_node() macro argument iommu: Fix reference count leak in iommu_group_alloc. parisc: Fix kernel panic in mem_init() mac80211: mesh: fix discovery timer re-arming issue / crash x86/dma: Fix max PFN arithmetic overflow on 32 bit systems xfrm: allow to accept packets with ipv6 NEXTHDR_HOP in xfrm_input xfrm: fix a warning in xfrm_policy_insert_list xfrm: fix a NULL-ptr deref in xfrm_local_error vti4: eliminated some duplicate code. ip_vti: receive ipip packet by calling ip_tunnel_rcv netfilter: nft_reject_bridge: enable reject with bridge vlan netfilter: ipset: Fix subcounter update skip netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code qlcnic: fix missing release in qlcnic_83xx_interrupt_test. bonding: Fix reference count leak in bond_sysfs_slave_add. netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build genirq/generic_pending: Do not lose pending affinity update net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags mm/vmalloc.c: don't dereference possible NULL pointer in __vunmap() sc16is7xx: move label 'err_spi' to correct section net: hns: Fixes the missing put_device in positive leg for roce reset scsi: zfcp: fix request object use-after-free in send path causing wrong traces Linux 4.9.226 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I64b95b6296df8de22f3f7ee64b13140f04215478
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 225
|
||||
SUBLEVEL = 226
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -65,13 +65,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&clks {
|
||||
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
|
||||
<&clks IMX6QDL_CLK_LDB_DI1_SEL>;
|
||||
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
|
||||
<&clks IMX6QDL_CLK_PLL3_USB_OTG>;
|
||||
};
|
||||
|
||||
&ldb {
|
||||
status = "okay";
|
||||
|
||||
|
||||
@@ -65,13 +65,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&clks {
|
||||
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
|
||||
<&clks IMX6QDL_CLK_LDB_DI1_SEL>;
|
||||
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
|
||||
<&clks IMX6QDL_CLK_PLL3_USB_OTG>;
|
||||
};
|
||||
|
||||
&ldb {
|
||||
status = "okay";
|
||||
|
||||
|
||||
@@ -53,17 +53,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&clks {
|
||||
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
|
||||
<&clks IMX6QDL_CLK_LDB_DI1_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU1_DI0_PRE_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU1_DI1_PRE_SEL>;
|
||||
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
|
||||
<&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD2_396M>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD2_396M>;
|
||||
};
|
||||
|
||||
&ldb {
|
||||
fsl,dual-channel;
|
||||
status = "okay";
|
||||
|
||||
@@ -92,6 +92,56 @@
|
||||
mux-int-port = <1>;
|
||||
mux-ext-port = <4>;
|
||||
};
|
||||
|
||||
aliases {
|
||||
mdio-gpio0 = &mdio0;
|
||||
};
|
||||
|
||||
mdio0: mdio-gpio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>, /* mdc */
|
||||
<&gpio2 7 GPIO_ACTIVE_HIGH>; /* mdio */
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch@0 {
|
||||
compatible = "marvell,mv88e6085"; /* 88e6240*/
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
switch_ports: ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switchphy0: switchphy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
switchphy1: switchphy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
switchphy2: switchphy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
switchphy3: switchphy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
|
||||
switchphy4: switchphy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ecspi5 {
|
||||
@@ -299,3 +349,30 @@
|
||||
tcxo-clock-frequency = <26000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
/* Synopsys, Inc. Device */
|
||||
pci_root: root@0,0 {
|
||||
compatible = "pci16c3,abcd";
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&clks {
|
||||
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
|
||||
<&clks IMX6QDL_CLK_LDB_DI1_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU1_DI0_PRE_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU1_DI1_PRE_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU2_DI0_PRE_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU2_DI1_PRE_SEL>;
|
||||
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
|
||||
<&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>;
|
||||
};
|
||||
|
||||
@@ -604,7 +604,7 @@ void __init mem_init(void)
|
||||
> BITS_PER_LONG);
|
||||
|
||||
high_memory = __va((max_pfn << PAGE_SHIFT));
|
||||
set_max_mapnr(page_to_pfn(virt_to_page(high_memory - 1)) + 1);
|
||||
set_max_mapnr(max_low_pfn);
|
||||
free_all_bootmem();
|
||||
|
||||
#ifdef CONFIG_PA11
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
#define MAX_DMA_PFN ((16UL * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* 4GB broken PCI/AGP hardware bus master zone */
|
||||
#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define MAX_DMA32_PFN (1UL << (32 - PAGE_SHIFT))
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/* The maximum address that we can perform a DMA transfer to on this platform */
|
||||
|
||||
@@ -341,6 +341,7 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d)
|
||||
struct tegra_gpio_info *tgi = bank->tgi;
|
||||
int gpio = d->hwirq;
|
||||
|
||||
tegra_gpio_irq_mask(d);
|
||||
gpiochip_unlock_as_irq(&tgi->gc, gpio);
|
||||
}
|
||||
|
||||
|
||||
@@ -756,7 +756,7 @@ int qib_create_port_files(struct ib_device *ibdev, u8 port_num,
|
||||
qib_dev_err(dd,
|
||||
"Skipping linkcontrol sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail;
|
||||
goto bail_link;
|
||||
}
|
||||
kobject_uevent(&ppd->pport_kobj, KOBJ_ADD);
|
||||
|
||||
@@ -766,7 +766,7 @@ int qib_create_port_files(struct ib_device *ibdev, u8 port_num,
|
||||
qib_dev_err(dd,
|
||||
"Skipping sl2vl sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail_link;
|
||||
goto bail_sl;
|
||||
}
|
||||
kobject_uevent(&ppd->sl2vl_kobj, KOBJ_ADD);
|
||||
|
||||
@@ -776,7 +776,7 @@ int qib_create_port_files(struct ib_device *ibdev, u8 port_num,
|
||||
qib_dev_err(dd,
|
||||
"Skipping diag_counters sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail_sl;
|
||||
goto bail_diagc;
|
||||
}
|
||||
kobject_uevent(&ppd->diagc_kobj, KOBJ_ADD);
|
||||
|
||||
@@ -789,7 +789,7 @@ int qib_create_port_files(struct ib_device *ibdev, u8 port_num,
|
||||
qib_dev_err(dd,
|
||||
"Skipping Congestion Control sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail_diagc;
|
||||
goto bail_cc;
|
||||
}
|
||||
|
||||
kobject_uevent(&ppd->pport_cc_kobj, KOBJ_ADD);
|
||||
@@ -871,6 +871,7 @@ void qib_verbs_unregister_sysfs(struct qib_devdata *dd)
|
||||
&cc_table_bin_attr);
|
||||
kobject_put(&ppd->pport_cc_kobj);
|
||||
}
|
||||
kobject_put(&ppd->diagc_kobj);
|
||||
kobject_put(&ppd->sl2vl_kobj);
|
||||
kobject_put(&ppd->pport_kobj);
|
||||
}
|
||||
|
||||
@@ -342,20 +342,6 @@ static int evdev_fasync(int fd, struct file *file, int on)
|
||||
return fasync_helper(fd, file, on, &client->fasync);
|
||||
}
|
||||
|
||||
static int evdev_flush(struct file *file, fl_owner_t id)
|
||||
{
|
||||
struct evdev_client *client = file->private_data;
|
||||
struct evdev *evdev = client->evdev;
|
||||
|
||||
mutex_lock(&evdev->mutex);
|
||||
|
||||
if (evdev->exist && !client->revoked)
|
||||
input_flush_device(&evdev->handle, file);
|
||||
|
||||
mutex_unlock(&evdev->mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void evdev_free(struct device *dev)
|
||||
{
|
||||
struct evdev *evdev = container_of(dev, struct evdev, dev);
|
||||
@@ -469,6 +455,10 @@ static int evdev_release(struct inode *inode, struct file *file)
|
||||
unsigned int i;
|
||||
|
||||
mutex_lock(&evdev->mutex);
|
||||
|
||||
if (evdev->exist && !client->revoked)
|
||||
input_flush_device(&evdev->handle, file);
|
||||
|
||||
evdev_ungrab(evdev, client);
|
||||
mutex_unlock(&evdev->mutex);
|
||||
|
||||
@@ -1331,7 +1321,6 @@ static const struct file_operations evdev_fops = {
|
||||
.compat_ioctl = evdev_ioctl_compat,
|
||||
#endif
|
||||
.fasync = evdev_fasync,
|
||||
.flush = evdev_flush,
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
|
||||
@@ -475,6 +475,16 @@ static const u8 xboxone_fw2015_init[] = {
|
||||
0x05, 0x20, 0x00, 0x01, 0x00
|
||||
};
|
||||
|
||||
/*
|
||||
* This packet is required for Xbox One S (0x045e:0x02ea)
|
||||
* and Xbox One Elite Series 2 (0x045e:0x0b00) pads to
|
||||
* initialize the controller that was previously used in
|
||||
* Bluetooth mode.
|
||||
*/
|
||||
static const u8 xboxone_s_init[] = {
|
||||
0x05, 0x20, 0x00, 0x0f, 0x06
|
||||
};
|
||||
|
||||
/*
|
||||
* This packet is required for the Titanfall 2 Xbox One pads
|
||||
* (0x0e6f:0x0165) to finish initialization and for Hori pads
|
||||
@@ -533,6 +543,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init),
|
||||
XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init),
|
||||
XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init),
|
||||
XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init),
|
||||
XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2),
|
||||
XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
|
||||
|
||||
@@ -991,7 +991,8 @@ static int rmi_driver_probe(struct device *dev)
|
||||
if (data->input) {
|
||||
rmi_driver_set_input_name(rmi_dev, data->input);
|
||||
if (!rmi_dev->xport->input) {
|
||||
if (input_register_device(data->input)) {
|
||||
retval = input_register_device(data->input);
|
||||
if (retval) {
|
||||
dev_err(dev, "%s: Failed to register input device.\n",
|
||||
__func__);
|
||||
goto err_destroy_functions;
|
||||
|
||||
@@ -738,6 +738,13 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "P65xRP"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Lenovo ThinkPad Twist S230u */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "33474HU"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ static const struct usb_device_id usbtouch_devices[] = {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
|
||||
{USB_DEVICE(0x255e, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
|
||||
{USB_DEVICE(0x595a, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
|
||||
{USB_DEVICE(0x6615, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
|
||||
{USB_DEVICE(0x6615, 0x0012), .driver_info = DEVTYPE_IRTOUCH_HIRES},
|
||||
|
||||
@@ -195,7 +195,7 @@ struct iommu_group *iommu_group_alloc(void)
|
||||
NULL, "%d", group->id);
|
||||
if (ret) {
|
||||
ida_simple_remove(&iommu_group_ida, group->id);
|
||||
kfree(group);
|
||||
kobject_put(&group->kobj);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -153,8 +153,10 @@ int bond_sysfs_slave_add(struct slave *slave)
|
||||
|
||||
err = kobject_init_and_add(&slave->kobj, &slave_ktype,
|
||||
&(slave->dev->dev.kobj), "bonding_slave");
|
||||
if (err)
|
||||
if (err) {
|
||||
kobject_put(&slave->kobj);
|
||||
return err;
|
||||
}
|
||||
|
||||
for (a = slave_attrs; *a; ++a) {
|
||||
err = sysfs_create_file(&slave->kobj, &((*a)->attr));
|
||||
|
||||
@@ -2867,6 +2867,9 @@ int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset)
|
||||
dsaf_set_bit(credit, DSAF_SBM_ROCEE_CFG_CRD_EN_B, 1);
|
||||
dsaf_write_dev(dsaf_dev, DSAF_SBM_ROCEE_CFG_REG_REG, credit);
|
||||
}
|
||||
|
||||
put_device(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(hns_dsaf_roce_reset);
|
||||
|
||||
@@ -2704,7 +2704,7 @@ void mlx4_opreq_action(struct work_struct *work)
|
||||
if (err) {
|
||||
mlx4_err(dev, "Failed to retrieve required operation: %d\n",
|
||||
err);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
|
||||
MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);
|
||||
|
||||
@@ -786,6 +786,7 @@ static void cmd_work_handler(struct work_struct *work)
|
||||
int alloc_ret;
|
||||
int cmd_mode;
|
||||
|
||||
complete(&ent->handling);
|
||||
sem = ent->page_queue ? &cmd->pages_sem : &cmd->sem;
|
||||
down(sem);
|
||||
if (!ent->page_queue) {
|
||||
@@ -904,6 +905,12 @@ static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent)
|
||||
struct mlx5_cmd *cmd = &dev->cmd;
|
||||
int err;
|
||||
|
||||
if (!wait_for_completion_timeout(&ent->handling, timeout) &&
|
||||
cancel_work_sync(&ent->work)) {
|
||||
ent->ret = -ECANCELED;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (cmd->mode == CMD_MODE_POLLING) {
|
||||
wait_for_completion(&ent->done);
|
||||
} else if (!wait_for_completion_timeout(&ent->done, timeout)) {
|
||||
@@ -911,12 +918,17 @@ static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent)
|
||||
mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true);
|
||||
}
|
||||
|
||||
out_err:
|
||||
err = ent->ret;
|
||||
|
||||
if (err == -ETIMEDOUT) {
|
||||
mlx5_core_warn(dev, "%s(0x%x) timeout. Will cause a leak of a command resource\n",
|
||||
mlx5_command_str(msg_to_opcode(ent->in)),
|
||||
msg_to_opcode(ent->in));
|
||||
} else if (err == -ECANCELED) {
|
||||
mlx5_core_warn(dev, "%s(0x%x) canceled on out of queue timeout.\n",
|
||||
mlx5_command_str(msg_to_opcode(ent->in)),
|
||||
msg_to_opcode(ent->in));
|
||||
}
|
||||
mlx5_core_dbg(dev, "err %d, delivery status %s(%d)\n",
|
||||
err, deliv_status_to_str(ent->status), ent->status);
|
||||
@@ -951,6 +963,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
|
||||
|
||||
ent->token = token;
|
||||
|
||||
init_completion(&ent->handling);
|
||||
if (!callback)
|
||||
init_completion(&ent->done);
|
||||
|
||||
@@ -970,6 +983,8 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
|
||||
err = wait_func(dev, ent);
|
||||
if (err == -ETIMEDOUT)
|
||||
goto out;
|
||||
if (err == -ECANCELED)
|
||||
goto out_free;
|
||||
|
||||
ds = ent->ts2 - ent->ts1;
|
||||
op = MLX5_GET(mbox_in, in->first.data, opcode);
|
||||
|
||||
@@ -499,8 +499,9 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget)
|
||||
static void mlx5e_free_txq_sq_descs(struct mlx5e_sq *sq)
|
||||
{
|
||||
struct mlx5e_tx_wqe_info *wi;
|
||||
u32 nbytes = 0;
|
||||
u16 ci, npkts = 0;
|
||||
struct sk_buff *skb;
|
||||
u16 ci;
|
||||
int i;
|
||||
|
||||
while (sq->cc != sq->pc) {
|
||||
@@ -521,8 +522,11 @@ static void mlx5e_free_txq_sq_descs(struct mlx5e_sq *sq)
|
||||
}
|
||||
|
||||
dev_kfree_skb_any(skb);
|
||||
npkts++;
|
||||
nbytes += wi->num_bytes;
|
||||
sq->cc += wi->num_wqebbs;
|
||||
}
|
||||
netdev_tx_completed_queue(sq->txq, npkts, nbytes);
|
||||
}
|
||||
|
||||
static void mlx5e_free_xdp_sq_descs(struct mlx5e_sq *sq)
|
||||
|
||||
@@ -1058,7 +1058,7 @@ static int encx24j600_spi_probe(struct spi_device *spi)
|
||||
if (unlikely(ret)) {
|
||||
netif_err(priv, probe, ndev, "Error %d initializing card encx24j600 card\n",
|
||||
ret);
|
||||
goto out_free;
|
||||
goto out_stop;
|
||||
}
|
||||
|
||||
eidled = encx24j600_read_reg(priv, EIDLED);
|
||||
@@ -1076,6 +1076,8 @@ static int encx24j600_spi_probe(struct spi_device *spi)
|
||||
|
||||
out_unregister:
|
||||
unregister_netdev(priv->ndev);
|
||||
out_stop:
|
||||
kthread_stop(priv->kworker_task);
|
||||
out_free:
|
||||
free_netdev(ndev);
|
||||
|
||||
@@ -1088,6 +1090,7 @@ static int encx24j600_spi_remove(struct spi_device *spi)
|
||||
struct encx24j600_priv *priv = dev_get_drvdata(&spi->dev);
|
||||
|
||||
unregister_netdev(priv->ndev);
|
||||
kthread_stop(priv->kworker_task);
|
||||
|
||||
free_netdev(priv->ndev);
|
||||
|
||||
|
||||
@@ -3610,7 +3610,7 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
|
||||
ahw->diag_cnt = 0;
|
||||
ret = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_INTRPT_TEST);
|
||||
if (ret)
|
||||
goto fail_diag_irq;
|
||||
goto fail_mbx_args;
|
||||
|
||||
if (adapter->flags & QLCNIC_MSIX_ENABLED)
|
||||
intrpt_id = ahw->intr_tbl[0].id;
|
||||
@@ -3640,6 +3640,8 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
|
||||
|
||||
done:
|
||||
qlcnic_free_mbx_args(&cmd);
|
||||
|
||||
fail_mbx_args:
|
||||
qlcnic_83xx_diag_free_res(netdev, drv_sds_rings);
|
||||
|
||||
fail_diag_irq:
|
||||
|
||||
@@ -4980,7 +4980,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
cas_cacheline_size)) {
|
||||
dev_err(&pdev->dev, "Could not set PCI cache "
|
||||
"line size\n");
|
||||
goto err_write_cacheline;
|
||||
goto err_out_free_res;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -5151,7 +5151,6 @@ err_out_iounmap:
|
||||
err_out_free_res:
|
||||
pci_release_regions(pdev);
|
||||
|
||||
err_write_cacheline:
|
||||
/* Try to restore it in case the error occurred after we
|
||||
* set it.
|
||||
*/
|
||||
|
||||
@@ -1594,6 +1594,7 @@ int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *wka_port)
|
||||
{
|
||||
struct zfcp_qdio *qdio = wka_port->adapter->qdio;
|
||||
struct zfcp_fsf_req *req;
|
||||
unsigned long req_id = 0;
|
||||
int retval = -EIO;
|
||||
|
||||
spin_lock_irq(&qdio->req_q_lock);
|
||||
@@ -1616,6 +1617,8 @@ int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *wka_port)
|
||||
hton24(req->qtcb->bottom.support.d_id, wka_port->d_id);
|
||||
req->data = wka_port;
|
||||
|
||||
req_id = req->req_id;
|
||||
|
||||
zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
|
||||
retval = zfcp_fsf_req_send(req);
|
||||
if (retval)
|
||||
@@ -1623,7 +1626,7 @@ int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *wka_port)
|
||||
out:
|
||||
spin_unlock_irq(&qdio->req_q_lock);
|
||||
if (!retval)
|
||||
zfcp_dbf_rec_run_wka("fsowp_1", wka_port, req->req_id);
|
||||
zfcp_dbf_rec_run_wka("fsowp_1", wka_port, req_id);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -1649,6 +1652,7 @@ int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *wka_port)
|
||||
{
|
||||
struct zfcp_qdio *qdio = wka_port->adapter->qdio;
|
||||
struct zfcp_fsf_req *req;
|
||||
unsigned long req_id = 0;
|
||||
int retval = -EIO;
|
||||
|
||||
spin_lock_irq(&qdio->req_q_lock);
|
||||
@@ -1671,6 +1675,8 @@ int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *wka_port)
|
||||
req->data = wka_port;
|
||||
req->qtcb->header.port_handle = wka_port->handle;
|
||||
|
||||
req_id = req->req_id;
|
||||
|
||||
zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
|
||||
retval = zfcp_fsf_req_send(req);
|
||||
if (retval)
|
||||
@@ -1678,7 +1684,7 @@ int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *wka_port)
|
||||
out:
|
||||
spin_unlock_irq(&qdio->req_q_lock);
|
||||
if (!retval)
|
||||
zfcp_dbf_rec_run_wka("fscwp_1", wka_port, req->req_id);
|
||||
zfcp_dbf_rec_run_wka("fscwp_1", wka_port, req_id);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -1523,10 +1523,12 @@ static int __init sc16is7xx_init(void)
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_SERIAL_SC16IS7XX_SPI
|
||||
err_spi:
|
||||
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
|
||||
i2c_del_driver(&sc16is7xx_i2c_uart_driver);
|
||||
#endif
|
||||
#endif
|
||||
err_i2c:
|
||||
uart_unregister_driver(&sc16is7xx_uart);
|
||||
return ret;
|
||||
|
||||
@@ -1364,7 +1364,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
|
||||
|
||||
req->buf = dev->rbuf;
|
||||
req->context = NULL;
|
||||
value = -EOPNOTSUPP;
|
||||
switch (ctrl->bRequest) {
|
||||
|
||||
case USB_REQ_GET_DESCRIPTOR:
|
||||
@@ -1788,7 +1787,7 @@ static ssize_t
|
||||
dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
|
||||
{
|
||||
struct dev_data *dev = fd->private_data;
|
||||
ssize_t value = len, length = len;
|
||||
ssize_t value, length = len;
|
||||
unsigned total;
|
||||
u32 tag;
|
||||
char *kbuf;
|
||||
|
||||
@@ -1721,7 +1721,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
|
||||
(!regset->active || regset->active(t->task, regset) > 0)) {
|
||||
int ret;
|
||||
size_t size = regset->n * regset->size;
|
||||
void *data = kmalloc(size, GFP_KERNEL);
|
||||
void *data = kzalloc(size, GFP_KERNEL);
|
||||
if (unlikely(!data))
|
||||
return 0;
|
||||
ret = regset->get(t->task, regset,
|
||||
|
||||
@@ -64,9 +64,9 @@ static int cachefiles_read_waiter(wait_queue_t *wait, unsigned mode,
|
||||
object = container_of(op->op.object, struct cachefiles_object, fscache);
|
||||
spin_lock(&object->work_lock);
|
||||
list_add_tail(&monitor->op_link, &op->to_do);
|
||||
fscache_enqueue_retrieval(op);
|
||||
spin_unlock(&object->work_lock);
|
||||
|
||||
fscache_enqueue_retrieval(op);
|
||||
fscache_put_retrieval(op);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3293,7 +3293,7 @@ cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset)
|
||||
* than it negotiated since it will refuse the read
|
||||
* then.
|
||||
*/
|
||||
if ((tcon->ses) && !(tcon->ses->capabilities &
|
||||
if (!(tcon->ses->capabilities &
|
||||
tcon->ses->server->vals->cap_large_files)) {
|
||||
current_read_size = min_t(uint,
|
||||
current_read_size, CIFSMaxBufSize);
|
||||
|
||||
@@ -1039,8 +1039,7 @@ int gfs2_quota_lock(struct gfs2_inode *ip, kuid_t uid, kgid_t gid)
|
||||
u32 x;
|
||||
int error = 0;
|
||||
|
||||
if (capable(CAP_SYS_RESOURCE) ||
|
||||
sdp->sd_args.ar_quota != GFS2_QUOTA_ON)
|
||||
if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON)
|
||||
return 0;
|
||||
|
||||
error = gfs2_quota_hold(ip, uid, gid);
|
||||
|
||||
@@ -47,7 +47,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip,
|
||||
int ret;
|
||||
|
||||
ap->allowed = UINT_MAX; /* Assume we are permitted a whole lot */
|
||||
if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF)
|
||||
if (capable(CAP_SYS_RESOURCE) ||
|
||||
sdp->sd_args.ar_quota == GFS2_QUOTA_OFF)
|
||||
return 0;
|
||||
ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE);
|
||||
if (ret)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#ifdef CONFIG_NEED_MULTIPLE_NODES
|
||||
#define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask)
|
||||
#else
|
||||
#define cpumask_of_node(node) ((void)node, cpu_online_mask)
|
||||
#define cpumask_of_node(node) ((void)(node), cpu_online_mask)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef pcibus_to_node
|
||||
|
||||
@@ -656,6 +656,7 @@ struct mlx5_cmd_work_ent {
|
||||
struct delayed_work cb_timeout_work;
|
||||
void *context;
|
||||
int idx;
|
||||
struct completion handling;
|
||||
struct completion done;
|
||||
struct mlx5_cmd *cmd;
|
||||
struct work_struct work;
|
||||
|
||||
@@ -504,6 +504,11 @@ static inline int is_vmalloc_or_module_addr(const void *x)
|
||||
|
||||
extern void kvfree(const void *addr);
|
||||
|
||||
/*
|
||||
* Mapcount of compound page as a whole, does not include mapped sub-pages.
|
||||
*
|
||||
* Must be called only for compound pages or any their tail sub-pages.
|
||||
*/
|
||||
static inline int compound_mapcount(struct page *page)
|
||||
{
|
||||
VM_BUG_ON_PAGE(!PageCompound(page), page);
|
||||
@@ -523,10 +528,16 @@ static inline void page_mapcount_reset(struct page *page)
|
||||
|
||||
int __page_mapcount(struct page *page);
|
||||
|
||||
/*
|
||||
* Mapcount of 0-order page; when compound sub-page, includes
|
||||
* compound_mapcount().
|
||||
*
|
||||
* Result is undefined for pages which cannot be mapped into userspace.
|
||||
* For example SLAB or special types of pages. See function page_has_type().
|
||||
* They use this place in struct page differently.
|
||||
*/
|
||||
static inline int page_mapcount(struct page *page)
|
||||
{
|
||||
VM_BUG_ON_PAGE(PageSlab(page), page);
|
||||
|
||||
if (unlikely(PageCompound(page)))
|
||||
return __page_mapcount(page);
|
||||
return atomic_read(&page->_mapcount) + 1;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <linux/netfilter/nf_conntrack_common.h>
|
||||
|
||||
extern const char *const pptp_msg_name[];
|
||||
const char *pptp_msg_name(u_int16_t msg);
|
||||
|
||||
/* state of the control session */
|
||||
enum pptp_ctrlsess_state {
|
||||
|
||||
@@ -94,7 +94,8 @@ static inline void tcf_tm_dump(struct tcf_t *dtm, const struct tcf_t *stm)
|
||||
{
|
||||
dtm->install = jiffies_to_clock_t(jiffies - stm->install);
|
||||
dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse);
|
||||
dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse);
|
||||
dtm->firstuse = stm->firstuse ?
|
||||
jiffies_to_clock_t(jiffies - stm->firstuse) : 0;
|
||||
dtm->expires = jiffies_to_clock_t(stm->expires);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,11 +208,13 @@ static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr,
|
||||
dev = dev_get_by_index(&init_net, dev_addr->bound_dev_if);
|
||||
if (dev) {
|
||||
ip4 = in_dev_get(dev);
|
||||
if (ip4 && ip4->ifa_list && ip4->ifa_list->ifa_address) {
|
||||
if (ip4 && ip4->ifa_list && ip4->ifa_list->ifa_address)
|
||||
ipv6_addr_set_v4mapped(ip4->ifa_list->ifa_address,
|
||||
(struct in6_addr *)gid);
|
||||
|
||||
if (ip4)
|
||||
in_dev_put(ip4);
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,8 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/socket.h>
|
||||
#ifndef __KERNEL__
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <linux/in.h>
|
||||
#include <linux/in6.h>
|
||||
|
||||
#define IPPROTO_L2TP 115
|
||||
|
||||
@@ -31,7 +30,7 @@ struct sockaddr_l2tpip {
|
||||
__u32 l2tp_conn_id; /* Connection ID of tunnel */
|
||||
|
||||
/* Pad to size of `struct sockaddr'. */
|
||||
unsigned char __pad[sizeof(struct sockaddr) -
|
||||
unsigned char __pad[__SOCK_SIZE__ -
|
||||
sizeof(__kernel_sa_family_t) -
|
||||
sizeof(__be16) - sizeof(struct in_addr) -
|
||||
sizeof(__u32)];
|
||||
|
||||
@@ -7,17 +7,18 @@
|
||||
void irq_move_masked_irq(struct irq_data *idata)
|
||||
{
|
||||
struct irq_desc *desc = irq_data_to_desc(idata);
|
||||
struct irq_chip *chip = desc->irq_data.chip;
|
||||
struct irq_data *data = &desc->irq_data;
|
||||
struct irq_chip *chip = data->chip;
|
||||
|
||||
if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
|
||||
if (likely(!irqd_is_setaffinity_pending(data)))
|
||||
return;
|
||||
|
||||
irqd_clr_move_pending(&desc->irq_data);
|
||||
irqd_clr_move_pending(data);
|
||||
|
||||
/*
|
||||
* Paranoia: cpu-local interrupts shouldn't be calling in here anyway.
|
||||
*/
|
||||
if (irqd_is_per_cpu(&desc->irq_data)) {
|
||||
if (irqd_is_per_cpu(data)) {
|
||||
WARN_ON(1);
|
||||
return;
|
||||
}
|
||||
@@ -42,9 +43,20 @@ void irq_move_masked_irq(struct irq_data *idata)
|
||||
* For correct operation this depends on the caller
|
||||
* masking the irqs.
|
||||
*/
|
||||
if (cpumask_any_and(desc->pending_mask, cpu_online_mask) < nr_cpu_ids)
|
||||
irq_do_set_affinity(&desc->irq_data, desc->pending_mask, false);
|
||||
if (cpumask_any_and(desc->pending_mask, cpu_online_mask) < nr_cpu_ids) {
|
||||
int ret;
|
||||
|
||||
ret = irq_do_set_affinity(data, desc->pending_mask, false);
|
||||
/*
|
||||
* If the there is a cleanup pending in the underlying
|
||||
* vector management, reschedule the move for the next
|
||||
* interrupt. Leave desc->pending_mask intact.
|
||||
*/
|
||||
if (ret == -EBUSY) {
|
||||
irqd_set_move_pending(data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
cpumask_clear(desc->pending_mask);
|
||||
}
|
||||
|
||||
|
||||
@@ -1499,7 +1499,7 @@ static void __vunmap(const void *addr, int deallocate_pages)
|
||||
addr))
|
||||
return;
|
||||
|
||||
area = find_vmap_area((unsigned long)addr)->vm;
|
||||
area = find_vm_area(addr);
|
||||
if (unlikely(!area)) {
|
||||
WARN(1, KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
|
||||
addr);
|
||||
|
||||
@@ -639,8 +639,10 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
|
||||
break;
|
||||
|
||||
case SO_BINDTODEVICE:
|
||||
if (optlen > IFNAMSIZ)
|
||||
optlen = IFNAMSIZ;
|
||||
if (optlen > IFNAMSIZ - 1)
|
||||
optlen = IFNAMSIZ - 1;
|
||||
|
||||
memset(devname, 0, sizeof(devname));
|
||||
|
||||
if (copy_from_user(devname, optval, optlen)) {
|
||||
res = -EFAULT;
|
||||
|
||||
@@ -34,6 +34,12 @@ static void nft_reject_br_push_etherhdr(struct sk_buff *oldskb,
|
||||
ether_addr_copy(eth->h_dest, eth_hdr(oldskb)->h_source);
|
||||
eth->h_proto = eth_hdr(oldskb)->h_proto;
|
||||
skb_pull(nskb, ETH_HLEN);
|
||||
|
||||
if (skb_vlan_tag_present(oldskb)) {
|
||||
u16 vid = skb_vlan_tag_get(oldskb);
|
||||
|
||||
__vlan_hwaccel_put_tag(nskb, oldskb->vlan_proto, vid);
|
||||
}
|
||||
}
|
||||
|
||||
static int nft_bridge_iphdr_validate(struct sk_buff *skb)
|
||||
|
||||
@@ -2879,7 +2879,9 @@ static void handle_reply(struct ceph_osd *osd, struct ceph_msg *msg)
|
||||
* supported.
|
||||
*/
|
||||
req->r_t.target_oloc.pool = m.redirect.oloc.pool;
|
||||
req->r_flags |= CEPH_OSD_FLAG_REDIRECTED;
|
||||
req->r_flags |= CEPH_OSD_FLAG_REDIRECTED |
|
||||
CEPH_OSD_FLAG_IGNORE_OVERLAY |
|
||||
CEPH_OSD_FLAG_IGNORE_CACHE;
|
||||
req->r_tid = 0;
|
||||
__submit_request(req, false);
|
||||
goto out_unlock_osdc;
|
||||
|
||||
@@ -2361,7 +2361,7 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm)
|
||||
}
|
||||
|
||||
if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) {
|
||||
__dev_notify_flags(dev, old_flags, 0U);
|
||||
__dev_notify_flags(dev, old_flags, (old_flags ^ dev->flags));
|
||||
} else {
|
||||
dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
|
||||
__dev_notify_flags(dev, old_flags, ~0U);
|
||||
|
||||
@@ -50,7 +50,7 @@ static int vti_net_id __read_mostly;
|
||||
static int vti_tunnel_init(struct net_device *dev);
|
||||
|
||||
static int vti_input(struct sk_buff *skb, int nexthdr, __be32 spi,
|
||||
int encap_type)
|
||||
int encap_type, bool update_skb_dev)
|
||||
{
|
||||
struct ip_tunnel *tunnel;
|
||||
const struct iphdr *iph = ip_hdr(skb);
|
||||
@@ -65,6 +65,9 @@ static int vti_input(struct sk_buff *skb, int nexthdr, __be32 spi,
|
||||
|
||||
XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel;
|
||||
|
||||
if (update_skb_dev)
|
||||
skb->dev = tunnel->dev;
|
||||
|
||||
return xfrm_input(skb, nexthdr, spi, encap_type);
|
||||
}
|
||||
|
||||
@@ -74,25 +77,43 @@ drop:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vti_input_ipip(struct sk_buff *skb, int nexthdr, __be32 spi,
|
||||
int encap_type)
|
||||
static int vti_input_proto(struct sk_buff *skb, int nexthdr, __be32 spi,
|
||||
int encap_type)
|
||||
{
|
||||
struct ip_tunnel *tunnel;
|
||||
return vti_input(skb, nexthdr, spi, encap_type, false);
|
||||
}
|
||||
|
||||
static int vti_rcv(struct sk_buff *skb, __be32 spi, bool update_skb_dev)
|
||||
{
|
||||
XFRM_SPI_SKB_CB(skb)->family = AF_INET;
|
||||
XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr);
|
||||
|
||||
return vti_input(skb, ip_hdr(skb)->protocol, spi, 0, update_skb_dev);
|
||||
}
|
||||
|
||||
static int vti_rcv_proto(struct sk_buff *skb)
|
||||
{
|
||||
return vti_rcv(skb, 0, false);
|
||||
}
|
||||
|
||||
static int vti_rcv_tunnel(struct sk_buff *skb)
|
||||
{
|
||||
struct ip_tunnel_net *itn = net_generic(dev_net(skb->dev), vti_net_id);
|
||||
const struct iphdr *iph = ip_hdr(skb);
|
||||
struct net *net = dev_net(skb->dev);
|
||||
struct ip_tunnel_net *itn = net_generic(net, vti_net_id);
|
||||
struct ip_tunnel *tunnel;
|
||||
|
||||
tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
|
||||
iph->saddr, iph->daddr, 0);
|
||||
if (tunnel) {
|
||||
struct tnl_ptk_info tpi = {
|
||||
.proto = htons(ETH_P_IP),
|
||||
};
|
||||
|
||||
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
|
||||
goto drop;
|
||||
|
||||
XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel;
|
||||
|
||||
skb->dev = tunnel->dev;
|
||||
|
||||
return xfrm_input(skb, nexthdr, spi, encap_type);
|
||||
if (iptunnel_pull_header(skb, 0, tpi.proto, false))
|
||||
goto drop;
|
||||
return ip_tunnel_rcv(tunnel, skb, &tpi, NULL, false);
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
@@ -101,22 +122,6 @@ drop:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vti_rcv(struct sk_buff *skb)
|
||||
{
|
||||
XFRM_SPI_SKB_CB(skb)->family = AF_INET;
|
||||
XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr);
|
||||
|
||||
return vti_input(skb, ip_hdr(skb)->protocol, 0, 0);
|
||||
}
|
||||
|
||||
static int vti_rcv_ipip(struct sk_buff *skb)
|
||||
{
|
||||
XFRM_SPI_SKB_CB(skb)->family = AF_INET;
|
||||
XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr);
|
||||
|
||||
return vti_input_ipip(skb, ip_hdr(skb)->protocol, ip_hdr(skb)->saddr, 0);
|
||||
}
|
||||
|
||||
static int vti_rcv_cb(struct sk_buff *skb, int err)
|
||||
{
|
||||
unsigned short family;
|
||||
@@ -482,31 +487,31 @@ static void __net_init vti_fb_tunnel_init(struct net_device *dev)
|
||||
}
|
||||
|
||||
static struct xfrm4_protocol vti_esp4_protocol __read_mostly = {
|
||||
.handler = vti_rcv,
|
||||
.input_handler = vti_input,
|
||||
.handler = vti_rcv_proto,
|
||||
.input_handler = vti_input_proto,
|
||||
.cb_handler = vti_rcv_cb,
|
||||
.err_handler = vti4_err,
|
||||
.priority = 100,
|
||||
};
|
||||
|
||||
static struct xfrm4_protocol vti_ah4_protocol __read_mostly = {
|
||||
.handler = vti_rcv,
|
||||
.input_handler = vti_input,
|
||||
.handler = vti_rcv_proto,
|
||||
.input_handler = vti_input_proto,
|
||||
.cb_handler = vti_rcv_cb,
|
||||
.err_handler = vti4_err,
|
||||
.priority = 100,
|
||||
};
|
||||
|
||||
static struct xfrm4_protocol vti_ipcomp4_protocol __read_mostly = {
|
||||
.handler = vti_rcv,
|
||||
.input_handler = vti_input,
|
||||
.handler = vti_rcv_proto,
|
||||
.input_handler = vti_input_proto,
|
||||
.cb_handler = vti_rcv_cb,
|
||||
.err_handler = vti4_err,
|
||||
.priority = 100,
|
||||
};
|
||||
|
||||
static struct xfrm_tunnel ipip_handler __read_mostly = {
|
||||
.handler = vti_rcv_ipip,
|
||||
.handler = vti_rcv_tunnel,
|
||||
.err_handler = vti4_err,
|
||||
.priority = 0,
|
||||
};
|
||||
|
||||
@@ -689,7 +689,7 @@ out:
|
||||
|
||||
rtnl_link_failed:
|
||||
#if IS_ENABLED(CONFIG_MPLS)
|
||||
xfrm4_tunnel_deregister(&mplsip_handler, AF_INET);
|
||||
xfrm4_tunnel_deregister(&mplsip_handler, AF_MPLS);
|
||||
xfrm_tunnel_mplsip_failed:
|
||||
|
||||
#endif
|
||||
|
||||
@@ -156,8 +156,7 @@ pptp_outbound_pkt(struct sk_buff *skb,
|
||||
break;
|
||||
default:
|
||||
pr_debug("unknown outbound packet 0x%04x:%s\n", msg,
|
||||
msg <= PPTP_MSG_MAX ? pptp_msg_name[msg] :
|
||||
pptp_msg_name[0]);
|
||||
pptp_msg_name(msg));
|
||||
/* fall through */
|
||||
case PPTP_SET_LINK_INFO:
|
||||
/* only need to NAT in case PAC is behind NAT box */
|
||||
@@ -250,9 +249,7 @@ pptp_inbound_pkt(struct sk_buff *skb,
|
||||
pcid_off = offsetof(union pptp_ctrl_union, setlink.peersCallID);
|
||||
break;
|
||||
default:
|
||||
pr_debug("unknown inbound packet %s\n",
|
||||
msg <= PPTP_MSG_MAX ? pptp_msg_name[msg] :
|
||||
pptp_msg_name[0]);
|
||||
pr_debug("unknown inbound packet %s\n", pptp_msg_name(msg));
|
||||
/* fall through */
|
||||
case PPTP_START_SESSION_REQUEST:
|
||||
case PPTP_START_SESSION_REPLY:
|
||||
|
||||
@@ -477,18 +477,16 @@ u32 ip_idents_reserve(u32 hash, int segs)
|
||||
atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ;
|
||||
u32 old = ACCESS_ONCE(*p_tstamp);
|
||||
u32 now = (u32)jiffies;
|
||||
u32 new, delta = 0;
|
||||
u32 delta = 0;
|
||||
|
||||
if (old != now && cmpxchg(p_tstamp, old, now) == old)
|
||||
delta = prandom_u32_max(now - old);
|
||||
|
||||
/* Do not use atomic_add_return() as it makes UBSAN unhappy */
|
||||
do {
|
||||
old = (u32)atomic_read(p_id);
|
||||
new = old + delta + segs;
|
||||
} while (atomic_cmpxchg(p_id, old, new) != old);
|
||||
|
||||
return new - segs;
|
||||
/* If UBSAN reports an error there, please make sure your compiler
|
||||
* supports -fno-strict-overflow before reporting it that was a bug
|
||||
* in UBSAN, and it has been fixed in GCC-8.
|
||||
*/
|
||||
return atomic_add_return(segs + delta, p_id) - segs;
|
||||
}
|
||||
EXPORT_SYMBOL(ip_idents_reserve);
|
||||
|
||||
|
||||
@@ -1082,7 +1082,14 @@ void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata)
|
||||
mesh_path_sel_frame_tx(MPATH_PREQ, 0, sdata->vif.addr, ifmsh->sn,
|
||||
target_flags, mpath->dst, mpath->sn, da, 0,
|
||||
ttl, lifetime, 0, ifmsh->preq_id++, sdata);
|
||||
|
||||
spin_lock_bh(&mpath->state_lock);
|
||||
if (mpath->flags & MESH_PATH_DELETED) {
|
||||
spin_unlock_bh(&mpath->state_lock);
|
||||
goto enddiscovery;
|
||||
}
|
||||
mod_timer(&mpath->timer, jiffies + mpath->discovery_timeout);
|
||||
spin_unlock_bh(&mpath->state_lock);
|
||||
|
||||
enddiscovery:
|
||||
rcu_read_unlock();
|
||||
|
||||
@@ -61,7 +61,7 @@ list_set_ktest(struct ip_set *set, const struct sk_buff *skb,
|
||||
/* Don't lookup sub-counters at all */
|
||||
opt->cmdflags &= ~IPSET_FLAG_MATCH_COUNTERS;
|
||||
if (opt->cmdflags & IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE)
|
||||
opt->cmdflags &= ~IPSET_FLAG_SKIP_COUNTER_UPDATE;
|
||||
opt->cmdflags |= IPSET_FLAG_SKIP_COUNTER_UPDATE;
|
||||
list_for_each_entry_rcu(e, &map->members, list) {
|
||||
if (SET_WITH_TIMEOUT(set) &&
|
||||
ip_set_timeout_expired(ext_timeout(e, set)))
|
||||
|
||||
@@ -71,24 +71,32 @@ EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_expectfn);
|
||||
|
||||
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
|
||||
/* PptpControlMessageType names */
|
||||
const char *const pptp_msg_name[] = {
|
||||
"UNKNOWN_MESSAGE",
|
||||
"START_SESSION_REQUEST",
|
||||
"START_SESSION_REPLY",
|
||||
"STOP_SESSION_REQUEST",
|
||||
"STOP_SESSION_REPLY",
|
||||
"ECHO_REQUEST",
|
||||
"ECHO_REPLY",
|
||||
"OUT_CALL_REQUEST",
|
||||
"OUT_CALL_REPLY",
|
||||
"IN_CALL_REQUEST",
|
||||
"IN_CALL_REPLY",
|
||||
"IN_CALL_CONNECT",
|
||||
"CALL_CLEAR_REQUEST",
|
||||
"CALL_DISCONNECT_NOTIFY",
|
||||
"WAN_ERROR_NOTIFY",
|
||||
"SET_LINK_INFO"
|
||||
static const char *const pptp_msg_name_array[PPTP_MSG_MAX + 1] = {
|
||||
[0] = "UNKNOWN_MESSAGE",
|
||||
[PPTP_START_SESSION_REQUEST] = "START_SESSION_REQUEST",
|
||||
[PPTP_START_SESSION_REPLY] = "START_SESSION_REPLY",
|
||||
[PPTP_STOP_SESSION_REQUEST] = "STOP_SESSION_REQUEST",
|
||||
[PPTP_STOP_SESSION_REPLY] = "STOP_SESSION_REPLY",
|
||||
[PPTP_ECHO_REQUEST] = "ECHO_REQUEST",
|
||||
[PPTP_ECHO_REPLY] = "ECHO_REPLY",
|
||||
[PPTP_OUT_CALL_REQUEST] = "OUT_CALL_REQUEST",
|
||||
[PPTP_OUT_CALL_REPLY] = "OUT_CALL_REPLY",
|
||||
[PPTP_IN_CALL_REQUEST] = "IN_CALL_REQUEST",
|
||||
[PPTP_IN_CALL_REPLY] = "IN_CALL_REPLY",
|
||||
[PPTP_IN_CALL_CONNECT] = "IN_CALL_CONNECT",
|
||||
[PPTP_CALL_CLEAR_REQUEST] = "CALL_CLEAR_REQUEST",
|
||||
[PPTP_CALL_DISCONNECT_NOTIFY] = "CALL_DISCONNECT_NOTIFY",
|
||||
[PPTP_WAN_ERROR_NOTIFY] = "WAN_ERROR_NOTIFY",
|
||||
[PPTP_SET_LINK_INFO] = "SET_LINK_INFO"
|
||||
};
|
||||
|
||||
const char *pptp_msg_name(u_int16_t msg)
|
||||
{
|
||||
if (msg > PPTP_MSG_MAX)
|
||||
return pptp_msg_name_array[0];
|
||||
|
||||
return pptp_msg_name_array[msg];
|
||||
}
|
||||
EXPORT_SYMBOL(pptp_msg_name);
|
||||
#endif
|
||||
|
||||
@@ -277,7 +285,7 @@ pptp_inbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
typeof(nf_nat_pptp_hook_inbound) nf_nat_pptp_inbound;
|
||||
|
||||
msg = ntohs(ctlh->messageType);
|
||||
pr_debug("inbound control message %s\n", pptp_msg_name[msg]);
|
||||
pr_debug("inbound control message %s\n", pptp_msg_name(msg));
|
||||
|
||||
switch (msg) {
|
||||
case PPTP_START_SESSION_REPLY:
|
||||
@@ -312,7 +320,7 @@ pptp_inbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
pcid = pptpReq->ocack.peersCallID;
|
||||
if (info->pns_call_id != pcid)
|
||||
goto invalid;
|
||||
pr_debug("%s, CID=%X, PCID=%X\n", pptp_msg_name[msg],
|
||||
pr_debug("%s, CID=%X, PCID=%X\n", pptp_msg_name(msg),
|
||||
ntohs(cid), ntohs(pcid));
|
||||
|
||||
if (pptpReq->ocack.resultCode == PPTP_OUTCALL_CONNECT) {
|
||||
@@ -329,7 +337,7 @@ pptp_inbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
goto invalid;
|
||||
|
||||
cid = pptpReq->icreq.callID;
|
||||
pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid));
|
||||
pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid));
|
||||
info->cstate = PPTP_CALL_IN_REQ;
|
||||
info->pac_call_id = cid;
|
||||
break;
|
||||
@@ -348,7 +356,7 @@ pptp_inbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
if (info->pns_call_id != pcid)
|
||||
goto invalid;
|
||||
|
||||
pr_debug("%s, PCID=%X\n", pptp_msg_name[msg], ntohs(pcid));
|
||||
pr_debug("%s, PCID=%X\n", pptp_msg_name(msg), ntohs(pcid));
|
||||
info->cstate = PPTP_CALL_IN_CONF;
|
||||
|
||||
/* we expect a GRE connection from PAC to PNS */
|
||||
@@ -358,7 +366,7 @@ pptp_inbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
case PPTP_CALL_DISCONNECT_NOTIFY:
|
||||
/* server confirms disconnect */
|
||||
cid = pptpReq->disc.callID;
|
||||
pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid));
|
||||
pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid));
|
||||
info->cstate = PPTP_CALL_NONE;
|
||||
|
||||
/* untrack this call id, unexpect GRE packets */
|
||||
@@ -385,7 +393,7 @@ pptp_inbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
invalid:
|
||||
pr_debug("invalid %s: type=%d cid=%u pcid=%u "
|
||||
"cstate=%d sstate=%d pns_cid=%u pac_cid=%u\n",
|
||||
msg <= PPTP_MSG_MAX ? pptp_msg_name[msg] : pptp_msg_name[0],
|
||||
pptp_msg_name(msg),
|
||||
msg, ntohs(cid), ntohs(pcid), info->cstate, info->sstate,
|
||||
ntohs(info->pns_call_id), ntohs(info->pac_call_id));
|
||||
return NF_ACCEPT;
|
||||
@@ -405,7 +413,7 @@ pptp_outbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
typeof(nf_nat_pptp_hook_outbound) nf_nat_pptp_outbound;
|
||||
|
||||
msg = ntohs(ctlh->messageType);
|
||||
pr_debug("outbound control message %s\n", pptp_msg_name[msg]);
|
||||
pr_debug("outbound control message %s\n", pptp_msg_name(msg));
|
||||
|
||||
switch (msg) {
|
||||
case PPTP_START_SESSION_REQUEST:
|
||||
@@ -427,7 +435,7 @@ pptp_outbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
info->cstate = PPTP_CALL_OUT_REQ;
|
||||
/* track PNS call id */
|
||||
cid = pptpReq->ocreq.callID;
|
||||
pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid));
|
||||
pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid));
|
||||
info->pns_call_id = cid;
|
||||
break;
|
||||
|
||||
@@ -441,7 +449,7 @@ pptp_outbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
pcid = pptpReq->icack.peersCallID;
|
||||
if (info->pac_call_id != pcid)
|
||||
goto invalid;
|
||||
pr_debug("%s, CID=%X PCID=%X\n", pptp_msg_name[msg],
|
||||
pr_debug("%s, CID=%X PCID=%X\n", pptp_msg_name(msg),
|
||||
ntohs(cid), ntohs(pcid));
|
||||
|
||||
if (pptpReq->icack.resultCode == PPTP_INCALL_ACCEPT) {
|
||||
@@ -481,7 +489,7 @@ pptp_outbound_pkt(struct sk_buff *skb, unsigned int protoff,
|
||||
invalid:
|
||||
pr_debug("invalid %s: type=%d cid=%u pcid=%u "
|
||||
"cstate=%d sstate=%d pns_cid=%u pac_cid=%u\n",
|
||||
msg <= PPTP_MSG_MAX ? pptp_msg_name[msg] : pptp_msg_name[0],
|
||||
pptp_msg_name(msg),
|
||||
msg, ntohs(cid), ntohs(pcid), info->cstate, info->sstate,
|
||||
ntohs(info->pns_call_id), ntohs(info->pac_call_id));
|
||||
return NF_ACCEPT;
|
||||
|
||||
@@ -571,7 +571,7 @@ static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb)
|
||||
}
|
||||
mutex_unlock(&qrtr_node_lock);
|
||||
|
||||
qrtr_local_enqueue(node, skb);
|
||||
qrtr_local_enqueue(NULL, skb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1793,12 +1793,13 @@ static sctp_disposition_t sctp_sf_do_dupcook_a(struct net *net,
|
||||
/* Update the content of current association. */
|
||||
sctp_add_cmd_sf(commands, SCTP_CMD_UPDATE_ASSOC, SCTP_ASOC(new_asoc));
|
||||
sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));
|
||||
if (sctp_state(asoc, SHUTDOWN_PENDING) &&
|
||||
if ((sctp_state(asoc, SHUTDOWN_PENDING) ||
|
||||
sctp_state(asoc, SHUTDOWN_SENT)) &&
|
||||
(sctp_sstate(asoc->base.sk, CLOSING) ||
|
||||
sock_flag(asoc->base.sk, SOCK_DEAD))) {
|
||||
/* if were currently in SHUTDOWN_PENDING, but the socket
|
||||
* has been closed by user, don't transition to ESTABLISHED.
|
||||
* Instead trigger SHUTDOWN bundled with COOKIE_ACK.
|
||||
/* If the socket has been closed by user, don't
|
||||
* transition to ESTABLISHED. Instead trigger SHUTDOWN
|
||||
* bundled with COOKIE_ACK.
|
||||
*/
|
||||
sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl));
|
||||
return sctp_sf_do_9_2_start_shutdown(net, ep, asoc,
|
||||
|
||||
@@ -307,7 +307,7 @@ resume:
|
||||
dev_put(skb->dev);
|
||||
|
||||
spin_lock(&x->lock);
|
||||
if (nexthdr <= 0) {
|
||||
if (nexthdr < 0) {
|
||||
if (nexthdr == -EBADMSG) {
|
||||
xfrm_audit_state_icvfail(x, skb,
|
||||
x->type->proto);
|
||||
|
||||
@@ -242,7 +242,8 @@ void xfrm_local_error(struct sk_buff *skb, int mtu)
|
||||
|
||||
if (skb->protocol == htons(ETH_P_IP))
|
||||
proto = AF_INET;
|
||||
else if (skb->protocol == htons(ETH_P_IPV6))
|
||||
else if (skb->protocol == htons(ETH_P_IPV6) &&
|
||||
skb->sk->sk_family == AF_INET6)
|
||||
proto = AF_INET6;
|
||||
else
|
||||
return;
|
||||
|
||||
@@ -766,12 +766,7 @@ static void xfrm_policy_requeue(struct xfrm_policy *old,
|
||||
static bool xfrm_policy_mark_match(struct xfrm_policy *policy,
|
||||
struct xfrm_policy *pol)
|
||||
{
|
||||
u32 mark = policy->mark.v & policy->mark.m;
|
||||
|
||||
if (policy->mark.v == pol->mark.v && policy->mark.m == pol->mark.m)
|
||||
return true;
|
||||
|
||||
if ((mark & pol->mark.m) == pol->mark.v &&
|
||||
if (policy->mark.v == pol->mark.v &&
|
||||
policy->priority == pol->priority)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -522,6 +522,7 @@ int cap_bprm_set_creds(struct linux_binprm *bprm)
|
||||
int ret;
|
||||
kuid_t root_uid;
|
||||
|
||||
new->cap_ambient = old->cap_ambient;
|
||||
if (WARN_ON(!cap_ambient_invariant_ok(old)))
|
||||
return -EPERM;
|
||||
|
||||
|
||||
@@ -228,14 +228,14 @@ static int snd_hwdep_dsp_load(struct snd_hwdep *hw,
|
||||
if (copy_from_user(&info, _info, sizeof(info)))
|
||||
return -EFAULT;
|
||||
/* check whether the dsp was already loaded */
|
||||
if (hw->dsp_loaded & (1 << info.index))
|
||||
if (hw->dsp_loaded & (1u << info.index))
|
||||
return -EBUSY;
|
||||
if (!access_ok(VERIFY_READ, info.image, info.length))
|
||||
return -EFAULT;
|
||||
err = hw->ops.dsp_load(hw, &info);
|
||||
if (err < 0)
|
||||
return err;
|
||||
hw->dsp_loaded |= (1 << info.index);
|
||||
hw->dsp_loaded |= (1u << info.index);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -980,6 +980,14 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
|
||||
cval->res = 384;
|
||||
}
|
||||
break;
|
||||
case USB_ID(0x0495, 0x3042): /* ESS Technology Asus USB DAC */
|
||||
if ((strstr(kctl->id.name, "Playback Volume") != NULL) ||
|
||||
strstr(kctl->id.name, "Capture Volume") != NULL) {
|
||||
cval->min >>= 8;
|
||||
cval->max = 0;
|
||||
cval->res = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user