Merge 4.19.170 into android-4.19-stable
Changes in 4.19.170 usb: ohci: Make distrust_firmware param default to false compiler.h: Raise minimum version of GCC to 5.1 for arm64 dm integrity: fix flush with external metadata device crypto: x86/crc32c - fix building with clang ias nfsd4: readdirplus shouldn't return parent of export udp: Prevent reuseport_select_sock from reading uninitialized socks netxen_nic: fix MSI/MSI-x interrupts net: mvpp2: Remove Pause and Asym_Pause support 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 rxrpc: Call state should be read with READ_ONCE() under some circumstances 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: 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.19.170 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I4a12e49eae7097a468161952228c57c974a1b0ac
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 169
|
SUBLEVEL = 170
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ continue_block:
|
|||||||
|
|
||||||
## branch into array
|
## branch into array
|
||||||
lea jump_table(%rip), bufp
|
lea jump_table(%rip), bufp
|
||||||
movzxw (bufp, %rax, 2), len
|
movzwq (bufp, %rax, 2), len
|
||||||
lea crc_array(%rip), bufp
|
lea crc_array(%rip), bufp
|
||||||
lea (bufp, len, 1), bufp
|
lea (bufp, len, 1), bufp
|
||||||
JMP_NOSPEC bufp
|
JMP_NOSPEC bufp
|
||||||
|
|||||||
@@ -1450,6 +1450,12 @@ sector_t dm_bufio_get_device_size(struct dm_bufio_client *c)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(dm_bufio_get_device_size);
|
EXPORT_SYMBOL_GPL(dm_bufio_get_device_size);
|
||||||
|
|
||||||
|
struct dm_io_client *dm_bufio_get_dm_io_client(struct dm_bufio_client *c)
|
||||||
|
{
|
||||||
|
return c->dm_io;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(dm_bufio_get_dm_io_client);
|
||||||
|
|
||||||
sector_t dm_bufio_get_block_number(struct dm_buffer *b)
|
sector_t dm_bufio_get_block_number(struct dm_buffer *b)
|
||||||
{
|
{
|
||||||
return b->block;
|
return b->block;
|
||||||
|
|||||||
@@ -1153,12 +1153,52 @@ static int dm_integrity_rw_tag(struct dm_integrity_c *ic, unsigned char *tag, se
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dm_integrity_flush_buffers(struct dm_integrity_c *ic)
|
struct flush_request {
|
||||||
|
struct dm_io_request io_req;
|
||||||
|
struct dm_io_region io_reg;
|
||||||
|
struct dm_integrity_c *ic;
|
||||||
|
struct completion comp;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void flush_notify(unsigned long error, void *fr_)
|
||||||
|
{
|
||||||
|
struct flush_request *fr = fr_;
|
||||||
|
if (unlikely(error != 0))
|
||||||
|
dm_integrity_io_error(fr->ic, "flusing disk cache", -EIO);
|
||||||
|
complete(&fr->comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dm_integrity_flush_buffers(struct dm_integrity_c *ic, bool flush_data)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
struct flush_request fr;
|
||||||
|
|
||||||
|
if (!ic->meta_dev)
|
||||||
|
flush_data = false;
|
||||||
|
if (flush_data) {
|
||||||
|
fr.io_req.bi_op = REQ_OP_WRITE,
|
||||||
|
fr.io_req.bi_op_flags = REQ_PREFLUSH | REQ_SYNC,
|
||||||
|
fr.io_req.mem.type = DM_IO_KMEM,
|
||||||
|
fr.io_req.mem.ptr.addr = NULL,
|
||||||
|
fr.io_req.notify.fn = flush_notify,
|
||||||
|
fr.io_req.notify.context = &fr;
|
||||||
|
fr.io_req.client = dm_bufio_get_dm_io_client(ic->bufio),
|
||||||
|
fr.io_reg.bdev = ic->dev->bdev,
|
||||||
|
fr.io_reg.sector = 0,
|
||||||
|
fr.io_reg.count = 0,
|
||||||
|
fr.ic = ic;
|
||||||
|
init_completion(&fr.comp);
|
||||||
|
r = dm_io(&fr.io_req, 1, &fr.io_reg, NULL);
|
||||||
|
BUG_ON(r);
|
||||||
|
}
|
||||||
|
|
||||||
r = dm_bufio_write_dirty_buffers(ic->bufio);
|
r = dm_bufio_write_dirty_buffers(ic->bufio);
|
||||||
if (unlikely(r))
|
if (unlikely(r))
|
||||||
dm_integrity_io_error(ic, "writing tags", r);
|
dm_integrity_io_error(ic, "writing tags", r);
|
||||||
|
|
||||||
|
if (flush_data)
|
||||||
|
wait_for_completion(&fr.comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sleep_on_endio_wait(struct dm_integrity_c *ic)
|
static void sleep_on_endio_wait(struct dm_integrity_c *ic)
|
||||||
@@ -1846,7 +1886,7 @@ static void integrity_commit(struct work_struct *w)
|
|||||||
flushes = bio_list_get(&ic->flush_bio_list);
|
flushes = bio_list_get(&ic->flush_bio_list);
|
||||||
if (unlikely(ic->mode != 'J')) {
|
if (unlikely(ic->mode != 'J')) {
|
||||||
spin_unlock_irq(&ic->endio_wait.lock);
|
spin_unlock_irq(&ic->endio_wait.lock);
|
||||||
dm_integrity_flush_buffers(ic);
|
dm_integrity_flush_buffers(ic, true);
|
||||||
goto release_flush_bios;
|
goto release_flush_bios;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2057,7 +2097,7 @@ static void do_journal_write(struct dm_integrity_c *ic, unsigned write_start,
|
|||||||
complete_journal_op(&comp);
|
complete_journal_op(&comp);
|
||||||
wait_for_completion_io(&comp.comp);
|
wait_for_completion_io(&comp.comp);
|
||||||
|
|
||||||
dm_integrity_flush_buffers(ic);
|
dm_integrity_flush_buffers(ic, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void integrity_writer(struct work_struct *w)
|
static void integrity_writer(struct work_struct *w)
|
||||||
@@ -2099,7 +2139,7 @@ static void recalc_write_super(struct dm_integrity_c *ic)
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
dm_integrity_flush_buffers(ic);
|
dm_integrity_flush_buffers(ic, false);
|
||||||
if (dm_integrity_failed(ic))
|
if (dm_integrity_failed(ic))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -2409,7 +2449,7 @@ static void dm_integrity_postsuspend(struct dm_target *ti)
|
|||||||
if (ic->meta_dev)
|
if (ic->meta_dev)
|
||||||
queue_work(ic->writer_wq, &ic->writer_work);
|
queue_work(ic->writer_wq, &ic->writer_work);
|
||||||
drain_workqueue(ic->writer_wq);
|
drain_workqueue(ic->writer_wq);
|
||||||
dm_integrity_flush_buffers(ic);
|
dm_integrity_flush_buffers(ic, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
|
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
|
||||||
|
|||||||
@@ -4266,8 +4266,6 @@ static void mvpp2_phylink_validate(struct net_device *dev,
|
|||||||
|
|
||||||
phylink_set(mask, Autoneg);
|
phylink_set(mask, Autoneg);
|
||||||
phylink_set_port_modes(mask);
|
phylink_set_port_modes(mask);
|
||||||
phylink_set(mask, Pause);
|
|
||||||
phylink_set(mask, Asym_Pause);
|
|
||||||
|
|
||||||
switch (state->interface) {
|
switch (state->interface) {
|
||||||
case PHY_INTERFACE_MODE_10GKR:
|
case PHY_INTERFACE_MODE_10GKR:
|
||||||
|
|||||||
@@ -580,11 +580,6 @@ static const struct net_device_ops netxen_netdev_ops = {
|
|||||||
.ndo_set_features = netxen_set_features,
|
.ndo_set_features = netxen_set_features,
|
||||||
};
|
};
|
||||||
|
|
||||||
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,
|
static inline void netxen_set_interrupt_mode(struct netxen_adapter *adapter,
|
||||||
u32 mode)
|
u32 mode)
|
||||||
{
|
{
|
||||||
@@ -680,7 +675,7 @@ static int netxen_setup_intr(struct netxen_adapter *adapter)
|
|||||||
netxen_initialize_interrupt_registers(adapter);
|
netxen_initialize_interrupt_registers(adapter);
|
||||||
netxen_set_msix_bit(pdev, 0);
|
netxen_set_msix_bit(pdev, 0);
|
||||||
|
|
||||||
if (netxen_function_zero(pdev)) {
|
if (adapter->portnum == 0) {
|
||||||
if (!netxen_setup_msi_interrupts(adapter, num_msix))
|
if (!netxen_setup_msi_interrupts(adapter, num_msix))
|
||||||
netxen_set_interrupt_mode(adapter, NETXEN_MSI_MODE);
|
netxen_set_interrupt_mode(adapter, NETXEN_MSI_MODE);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3596,6 +3596,7 @@ static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
|
|||||||
{
|
{
|
||||||
struct stmmac_priv *priv = netdev_priv(dev);
|
struct stmmac_priv *priv = netdev_priv(dev);
|
||||||
int txfifosz = priv->plat->tx_fifo_size;
|
int txfifosz = priv->plat->tx_fifo_size;
|
||||||
|
const int mtu = new_mtu;
|
||||||
|
|
||||||
if (txfifosz == 0)
|
if (txfifosz == 0)
|
||||||
txfifosz = priv->dma_cap.tx_fifo_size;
|
txfifosz = priv->dma_cap.tx_fifo_size;
|
||||||
@@ -3613,7 +3614,7 @@ static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
|
|||||||
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
dev->mtu = new_mtu;
|
dev->mtu = mtu;
|
||||||
|
|
||||||
netdev_update_features(dev);
|
netdev_update_features(dev);
|
||||||
|
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
|
|||||||
reply_len = sizeof *phym;
|
reply_len = sizeof *phym;
|
||||||
retval = rndis_query(dev, intf, u.buf,
|
retval = rndis_query(dev, intf, u.buf,
|
||||||
RNDIS_OID_GEN_PHYSICAL_MEDIUM,
|
RNDIS_OID_GEN_PHYSICAL_MEDIUM,
|
||||||
0, (void **) &phym, &reply_len);
|
reply_len, (void **)&phym, &reply_len);
|
||||||
if (retval != 0 || !phym) {
|
if (retval != 0 || !phym) {
|
||||||
/* OID is optional so don't fail here. */
|
/* OID is optional so don't fail here. */
|
||||||
phym_unspec = cpu_to_le32(RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED);
|
phym_unspec = cpu_to_le32(RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED);
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ struct cdns_spi {
|
|||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
struct clk *ref_clk;
|
struct clk *ref_clk;
|
||||||
struct clk *pclk;
|
struct clk *pclk;
|
||||||
|
unsigned int clk_rate;
|
||||||
u32 speed_hz;
|
u32 speed_hz;
|
||||||
const u8 *txbuf;
|
const u8 *txbuf;
|
||||||
u8 *rxbuf;
|
u8 *rxbuf;
|
||||||
@@ -258,7 +259,7 @@ static void cdns_spi_config_clock_freq(struct spi_device *spi,
|
|||||||
u32 ctrl_reg, baud_rate_val;
|
u32 ctrl_reg, baud_rate_val;
|
||||||
unsigned long frequency;
|
unsigned long frequency;
|
||||||
|
|
||||||
frequency = clk_get_rate(xspi->ref_clk);
|
frequency = xspi->clk_rate;
|
||||||
|
|
||||||
ctrl_reg = cdns_spi_read(xspi, CDNS_SPI_CR);
|
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->auto_runtime_pm = true;
|
||||||
master->mode_bits = SPI_CPOL | SPI_CPHA;
|
master->mode_bits = SPI_CPOL | SPI_CPHA;
|
||||||
|
|
||||||
|
xspi->clk_rate = clk_get_rate(xspi->ref_clk);
|
||||||
/* Set to default valid value */
|
/* 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;
|
xspi->speed_hz = master->max_speed_hz;
|
||||||
|
|
||||||
master->bits_per_word_mask = SPI_BPW_MASK(8);
|
master->bits_per_word_mask = SPI_BPW_MASK(8);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ static void io_watchdog_func(struct timer_list *t);
|
|||||||
|
|
||||||
|
|
||||||
/* Some boards misreport power switching/overcurrent */
|
/* Some boards misreport power switching/overcurrent */
|
||||||
static bool distrust_firmware = true;
|
static bool distrust_firmware;
|
||||||
module_param (distrust_firmware, bool, 0);
|
module_param (distrust_firmware, bool, 0);
|
||||||
MODULE_PARM_DESC (distrust_firmware,
|
MODULE_PARM_DESC (distrust_firmware,
|
||||||
"true to distrust firmware power/overcurrent setup");
|
"true to distrust firmware power/overcurrent setup");
|
||||||
|
|||||||
@@ -844,9 +844,14 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
|
|||||||
if (isdotent(name, namlen)) {
|
if (isdotent(name, namlen)) {
|
||||||
if (namlen == 2) {
|
if (namlen == 2) {
|
||||||
dchild = dget_parent(dparent);
|
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)
|
if (dchild == dparent)
|
||||||
goto out;
|
goto out;
|
||||||
|
if (dparent == exp->ex_path.dentry)
|
||||||
|
goto out;
|
||||||
} else
|
} else
|
||||||
dchild = dget(dparent);
|
dchild = dget(dparent);
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
|
|
||||||
#if GCC_VERSION < 40600
|
#if GCC_VERSION < 40600
|
||||||
# error Sorry, your compiler is too old - please upgrade it.
|
# error Sorry, your compiler is too old - please upgrade it.
|
||||||
|
#elif defined(CONFIG_ARM64) && GCC_VERSION < 50100
|
||||||
|
/*
|
||||||
|
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293
|
||||||
|
* https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk
|
||||||
|
*/
|
||||||
|
# error Sorry, your version of GCC is too old - please use 5.1 or newer.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ void dm_bufio_set_minimum_buffers(struct dm_bufio_client *c, unsigned n);
|
|||||||
|
|
||||||
unsigned dm_bufio_get_block_size(struct dm_bufio_client *c);
|
unsigned dm_bufio_get_block_size(struct dm_bufio_client *c);
|
||||||
sector_t dm_bufio_get_device_size(struct dm_bufio_client *c);
|
sector_t dm_bufio_get_device_size(struct dm_bufio_client *c);
|
||||||
|
struct dm_io_client *dm_bufio_get_dm_io_client(struct dm_bufio_client *c);
|
||||||
sector_t dm_bufio_get_block_number(struct dm_buffer *b);
|
sector_t dm_bufio_get_block_number(struct dm_buffer *b);
|
||||||
void *dm_bufio_get_block_data(struct dm_buffer *b);
|
void *dm_bufio_get_block_data(struct dm_buffer *b);
|
||||||
void *dm_bufio_get_aux_data(struct dm_buffer *b);
|
void *dm_bufio_get_aux_data(struct dm_buffer *b);
|
||||||
|
|||||||
@@ -459,13 +459,17 @@ EXPORT_SYMBOL(__netdev_alloc_skb);
|
|||||||
struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, unsigned int len,
|
struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, unsigned int len,
|
||||||
gfp_t gfp_mask)
|
gfp_t gfp_mask)
|
||||||
{
|
{
|
||||||
struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
|
struct napi_alloc_cache *nc;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
len += NET_SKB_PAD + NET_IP_ALIGN;
|
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))) {
|
(gfp_mask & (__GFP_DIRECT_RECLAIM | GFP_DMA))) {
|
||||||
skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE);
|
skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
@@ -473,6 +477,7 @@ struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, unsigned int len,
|
|||||||
goto skb_success;
|
goto skb_success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nc = this_cpu_ptr(&napi_alloc_cache);
|
||||||
len += SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
len += SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||||
len = SKB_DATA_ALIGN(len);
|
len = SKB_DATA_ALIGN(len);
|
||||||
|
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ struct sock *reuseport_select_sock(struct sock *sk,
|
|||||||
i = j = reciprocal_scale(hash, socks);
|
i = j = reciprocal_scale(hash, socks);
|
||||||
while (reuse->socks[i]->sk_state == TCP_ESTABLISHED) {
|
while (reuse->socks[i]->sk_state == TCP_ESTABLISHED) {
|
||||||
i++;
|
i++;
|
||||||
if (i >= reuse->num_socks)
|
if (i >= socks)
|
||||||
i = 0;
|
i = 0;
|
||||||
if (i == j)
|
if (i == j)
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
@@ -1756,6 +1756,8 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||||||
fn = &reply_funcs[dcb->cmd];
|
fn = &reply_funcs[dcb->cmd];
|
||||||
if (!fn->cb)
|
if (!fn->cb)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
if (fn->type == RTM_SETDCB && !netlink_capable(skb, CAP_NET_ADMIN))
|
||||||
|
return -EPERM;
|
||||||
|
|
||||||
if (!tb[DCB_ATTR_IFNAME])
|
if (!tb[DCB_ATTR_IFNAME])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
@@ -270,7 +270,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)
|
int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
||||||
{
|
{
|
||||||
u8 *tail;
|
u8 *tail;
|
||||||
u8 *vaddr;
|
|
||||||
int nfrags;
|
int nfrags;
|
||||||
int esph_offset;
|
int esph_offset;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
@@ -312,14 +311,10 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||||||
page = pfrag->page;
|
page = pfrag->page;
|
||||||
get_page(page);
|
get_page(page);
|
||||||
|
|
||||||
vaddr = kmap_atomic(page);
|
tail = page_address(page) + pfrag->offset;
|
||||||
|
|
||||||
tail = vaddr + pfrag->offset;
|
|
||||||
|
|
||||||
esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto);
|
esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto);
|
||||||
|
|
||||||
kunmap_atomic(vaddr);
|
|
||||||
|
|
||||||
nfrags = skb_shinfo(skb)->nr_frags;
|
nfrags = skb_shinfo(skb)->nr_frags;
|
||||||
|
|
||||||
__skb_fill_page_desc(skb, nfrags, page, pfrag->offset,
|
__skb_fill_page_desc(skb, nfrags, page, pfrag->offset,
|
||||||
|
|||||||
@@ -237,7 +237,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)
|
int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
||||||
{
|
{
|
||||||
u8 *tail;
|
u8 *tail;
|
||||||
u8 *vaddr;
|
|
||||||
int nfrags;
|
int nfrags;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
struct sk_buff *trailer;
|
struct sk_buff *trailer;
|
||||||
@@ -270,14 +269,10 @@ int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info
|
|||||||
page = pfrag->page;
|
page = pfrag->page;
|
||||||
get_page(page);
|
get_page(page);
|
||||||
|
|
||||||
vaddr = kmap_atomic(page);
|
tail = page_address(page) + pfrag->offset;
|
||||||
|
|
||||||
tail = vaddr + pfrag->offset;
|
|
||||||
|
|
||||||
esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto);
|
esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto);
|
||||||
|
|
||||||
kunmap_atomic(vaddr);
|
|
||||||
|
|
||||||
nfrags = skb_shinfo(skb)->nr_frags;
|
nfrags = skb_shinfo(skb)->nr_frags;
|
||||||
|
|
||||||
__skb_fill_page_desc(skb, nfrags, page, pfrag->offset,
|
__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;
|
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)
|
static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
unsigned int mtu;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = BPF_CGROUP_RUN_PROG_INET_EGRESS(sk, skb);
|
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
|
#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_network_len(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)) ||
|
dst_allfrag(skb_dst(skb)) ||
|
||||||
(IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size))
|
(IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size))
|
||||||
return ip6_fragment(net, sk, skb, ip6_finish_output2);
|
return ip6_fragment(net, sk, skb, ip6_finish_output2);
|
||||||
|
|||||||
@@ -1596,8 +1596,11 @@ static int ipip6_newlink(struct net *src_net, struct net_device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IPV6_SIT_6RD
|
#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);
|
err = ipip6_tunnel_update_6rd(nt, &ip6rd);
|
||||||
|
if (err < 0)
|
||||||
|
unregister_netdevice_queue(dev, NULL);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb,
|
|||||||
if (state >= RXRPC_CALL_COMPLETE)
|
if (state >= RXRPC_CALL_COMPLETE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (call->state == RXRPC_CALL_SERVER_RECV_REQUEST) {
|
if (state == RXRPC_CALL_SERVER_RECV_REQUEST) {
|
||||||
unsigned long timo = READ_ONCE(call->next_req_timo);
|
unsigned long timo = READ_ONCE(call->next_req_timo);
|
||||||
unsigned long now, expect_req_by;
|
unsigned long now, expect_req_by;
|
||||||
|
|
||||||
|
|||||||
@@ -1112,7 +1112,7 @@ static long rxrpc_read(const struct key *key,
|
|||||||
default: /* we have a ticket we can't encode */
|
default: /* we have a ticket we can't encode */
|
||||||
pr_err("Unsupported key token type (%u)\n",
|
pr_err("Unsupported key token type (%u)\n",
|
||||||
token->security_index);
|
token->security_index);
|
||||||
continue;
|
return -ENOPKG;
|
||||||
}
|
}
|
||||||
|
|
||||||
_debug("token[%u]: toksize=%u", ntoks, toksize);
|
_debug("token[%u]: toksize=%u", ntoks, toksize);
|
||||||
@@ -1227,7 +1227,9 @@ static long rxrpc_read(const struct key *key,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
pr_err("Unsupported key token type (%u)\n",
|
||||||
|
token->security_index);
|
||||||
|
return -ENOPKG;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
|
ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
|
||||||
|
|||||||
@@ -914,9 +914,7 @@ void tipc_link_reset(struct tipc_link *l)
|
|||||||
int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
|
int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
|
||||||
struct sk_buff_head *xmitq)
|
struct sk_buff_head *xmitq)
|
||||||
{
|
{
|
||||||
struct tipc_msg *hdr = buf_msg(skb_peek(list));
|
|
||||||
unsigned int maxwin = l->window;
|
unsigned int maxwin = l->window;
|
||||||
int imp = msg_importance(hdr);
|
|
||||||
unsigned int mtu = l->mtu;
|
unsigned int mtu = l->mtu;
|
||||||
u16 ack = l->rcv_nxt - 1;
|
u16 ack = l->rcv_nxt - 1;
|
||||||
u16 seqno = l->snd_nxt;
|
u16 seqno = l->snd_nxt;
|
||||||
@@ -925,13 +923,20 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
|
|||||||
struct sk_buff_head *backlogq = &l->backlogq;
|
struct sk_buff_head *backlogq = &l->backlogq;
|
||||||
struct sk_buff *skb, *_skb, **tskb;
|
struct sk_buff *skb, *_skb, **tskb;
|
||||||
int pkt_cnt = skb_queue_len(list);
|
int pkt_cnt = skb_queue_len(list);
|
||||||
|
struct tipc_msg *hdr;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
int imp;
|
||||||
|
|
||||||
|
if (pkt_cnt <= 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
hdr = buf_msg(skb_peek(list));
|
||||||
if (unlikely(msg_size(hdr) > mtu)) {
|
if (unlikely(msg_size(hdr) > mtu)) {
|
||||||
__skb_queue_purge(list);
|
__skb_queue_purge(list);
|
||||||
return -EMSGSIZE;
|
return -EMSGSIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imp = msg_importance(hdr);
|
||||||
/* Allow oversubscription of one data msg per source at congestion */
|
/* Allow oversubscription of one data msg per source at congestion */
|
||||||
if (unlikely(l->backlog[imp].len >= l->backlog[imp].limit)) {
|
if (unlikely(l->backlog[imp].len >= l->backlog[imp].limit)) {
|
||||||
if (imp == TIPC_SYSTEM_IMPORTANCE) {
|
if (imp == TIPC_SYSTEM_IMPORTANCE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user