This is the 4.4.120 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlqaaMQACgkQONu9yGCS aT4KzBAAvCqibAFMAux179fHPZD3bUKdHPLKtyFFiqEo72x85VbzGMyF+8z0G9ci uEIbg9nChvMEajggZ11I4Ydi8vBFNomYCp9I5d9ozDS18fUi0dLUPrRBbbKome5I qVygmKshx7QKuiiVNknecQczqZbrd6cqOHJqJH/W6TUEPNsC7gta0bAB40DeWjQk 1SSKYEstaz7For4ZH9mjNqM/KF0RSWUt8/iLs8u4EQcSs47CMkUMFv3PwtITC8if 9lgsk+DZ5ua3DLrpRvMX8pL/hC1GZaceun7hn0aBIa/YmAYC6EsT5PB2SDX1ULC/ dUw1TjXpt/pJvhzxm+YZ4tq6JkxGDT6cfb3LwmGwSm+XUp299y7WBseC8U7GLBIp hLLhSGTUtVkQbZ+dX24Hw+mwsgbdFbvFvwoeCBxfqAqgz/OeG4+zIXY94aBt0hxo 4qzzYqs4RuLS2bf+Gx6V2gfsqX6T9EXDIEUh+ybz+rAYBwLl9EVK7wVDB/ZjonTe 0/OUIQZEFS8g6kBczHQFISqoV+7ChwMwznEv8ZulYtdovPqGW7h10ZLAEm0L1i6d xXtjxYezSaaiTWg44fbGjSTzUBso0+Mlxf6Q8YO2inxPQlLLdaTiPBxkTxY6M9Re pmt8Z0o2796AsYbNrnBm5Y+8MTusdOWukFtUxz2vE8TR1r8mXO8= =jkg+ -----END PGP SIGNATURE----- Merge 4.4.120 into android-4.4 Changes in 4.4.120 hrtimer: Ensure POSIX compliance (relative CLOCK_REALTIME hrtimers) f2fs: fix a bug caused by NULL extent tree mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM ipv6: icmp6: Allow icmp messages to be looped back ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch sget(): handle failures of register_shrinker() drm/nouveau/pci: do a msi rearm on init spi: atmel: fixed spin_lock usage inside atmel_spi_remove net: arc_emac: fix arc_emac_rx() error paths scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error ARM: dts: ls1021a: fix incorrect clock references lib/mpi: Fix umul_ppmm() for MIPS64r6 tg3: Add workaround to restrict 5762 MRRS to 2048 tg3: Enable PHY reset in MTU change path for 5720 bnx2x: Improve reliability in case of nested PCI errors led: core: Fix brightness setting when setting delay_off=0 s390/dasd: fix wrongly assigned configuration data IB/mlx4: Fix mlx4_ib_alloc_mr error flow IB/ipoib: Fix race condition in neigh creation xfs: quota: fix missed destroy of qi_tree_lock xfs: quota: check result of register_shrinker() e1000: fix disabling already-disabled warning drm/ttm: check the return value of kzalloc mac80211: mesh: drop frames appearing to be from us can: flex_can: Correct the checking for frame length in flexcan_start_xmit() bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine. xen-netfront: enable device after manual module load mdio-sun4i: Fix a memory leak SolutionEngine771x: fix Ether platform data xen/gntdev: Fix off-by-one error when unmapping with holes xen/gntdev: Fix partial gntdev_mmap() cleanup sctp: make use of pre-calculated len net: gianfar_ptp: move set_fipers() to spinlock protecting area MIPS: Implement __multi3 for GCC7 MIPS64r6 builds Linux 4.4.120 Change-Id: Ie363d2e798f7bbe76e728c995e605af94667dfe5 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
d63fdf61a4
38 changed files with 306 additions and 88 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 119
|
||||
SUBLEVEL = 120
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
reg = <0x2a>;
|
||||
VDDA-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_3p3v>;
|
||||
clocks = <&sys_mclk 1>;
|
||||
clocks = <&sys_mclk>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
reg = <0x0a>;
|
||||
VDDA-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_3p3v>;
|
||||
clocks = <&sys_mclk 1>;
|
||||
clocks = <&sys_mclk>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -85,7 +85,11 @@
|
|||
.pushsection .text.fixup,"ax"
|
||||
.align 4
|
||||
9001: mov r4, #-EFAULT
|
||||
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
|
||||
ldr r5, [sp, #9*4] @ *err_ptr
|
||||
#else
|
||||
ldr r5, [sp, #8*4] @ *err_ptr
|
||||
#endif
|
||||
str r4, [r5]
|
||||
ldmia sp, {r1, r2} @ retrieve dst, len
|
||||
add r2, r2, r1
|
||||
|
|
|
@ -15,4 +15,5 @@ obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
|
|||
obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
|
||||
|
||||
# libgcc-style stuff needed in the kernel
|
||||
obj-y += ashldi3.o ashrdi3.o bswapsi.o bswapdi.o cmpdi2.o lshrdi3.o ucmpdi2.o
|
||||
obj-y += ashldi3.o ashrdi3.o bswapsi.o bswapdi.o cmpdi2.o lshrdi3.o multi3.o \
|
||||
ucmpdi2.o
|
||||
|
|
|
@ -9,10 +9,18 @@ typedef int word_type __attribute__ ((mode (__word__)));
|
|||
struct DWstruct {
|
||||
int high, low;
|
||||
};
|
||||
|
||||
struct TWstruct {
|
||||
long long high, low;
|
||||
};
|
||||
#elif defined(__LITTLE_ENDIAN)
|
||||
struct DWstruct {
|
||||
int low, high;
|
||||
};
|
||||
|
||||
struct TWstruct {
|
||||
long long low, high;
|
||||
};
|
||||
#else
|
||||
#error I feel sick.
|
||||
#endif
|
||||
|
@ -22,4 +30,13 @@ typedef union {
|
|||
long long ll;
|
||||
} DWunion;
|
||||
|
||||
#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6)
|
||||
typedef int ti_type __attribute__((mode(TI)));
|
||||
|
||||
typedef union {
|
||||
struct TWstruct s;
|
||||
ti_type ti;
|
||||
} TWunion;
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_LIBGCC_H */
|
||||
|
|
54
arch/mips/lib/multi3.c
Normal file
54
arch/mips/lib/multi3.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/export.h>
|
||||
|
||||
#include "libgcc.h"
|
||||
|
||||
/*
|
||||
* GCC 7 suboptimally generates __multi3 calls for mips64r6, so for that
|
||||
* specific case only we'll implement it here.
|
||||
*
|
||||
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82981
|
||||
*/
|
||||
#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6) && (__GNUC__ == 7)
|
||||
|
||||
/* multiply 64-bit values, low 64-bits returned */
|
||||
static inline long long notrace dmulu(long long a, long long b)
|
||||
{
|
||||
long long res;
|
||||
|
||||
asm ("dmulu %0,%1,%2" : "=r" (res) : "r" (a), "r" (b));
|
||||
return res;
|
||||
}
|
||||
|
||||
/* multiply 64-bit unsigned values, high 64-bits of 128-bit result returned */
|
||||
static inline long long notrace dmuhu(long long a, long long b)
|
||||
{
|
||||
long long res;
|
||||
|
||||
asm ("dmuhu %0,%1,%2" : "=r" (res) : "r" (a), "r" (b));
|
||||
return res;
|
||||
}
|
||||
|
||||
/* multiply 128-bit values, low 128-bits returned */
|
||||
ti_type notrace __multi3(ti_type a, ti_type b)
|
||||
{
|
||||
TWunion res, aa, bb;
|
||||
|
||||
aa.ti = a;
|
||||
bb.ti = b;
|
||||
|
||||
/*
|
||||
* a * b = (a.lo * b.lo)
|
||||
* + 2^64 * (a.hi * b.lo + a.lo * b.hi)
|
||||
* [+ 2^128 * (a.hi * b.hi)]
|
||||
*/
|
||||
res.s.low = dmulu(aa.s.low, bb.s.low);
|
||||
res.s.high = dmuhu(aa.s.low, bb.s.low);
|
||||
res.s.high += dmulu(aa.s.high, bb.s.low);
|
||||
res.s.high += dmulu(aa.s.low, bb.s.high);
|
||||
|
||||
return res.ti;
|
||||
}
|
||||
EXPORT_SYMBOL(__multi3);
|
||||
|
||||
#endif /* 64BIT && CPU_MIPSR6 && GCC7 */
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sh_eth.h>
|
||||
#include <mach-se/mach/se.h>
|
||||
#include <mach-se/mach/mrshpc.h>
|
||||
#include <asm/machvec.h>
|
||||
|
@ -114,6 +115,11 @@ static struct platform_device heartbeat_device = {
|
|||
#if defined(CONFIG_CPU_SUBTYPE_SH7710) ||\
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7712)
|
||||
/* SH771X Ethernet driver */
|
||||
static struct sh_eth_plat_data sh_eth_plat = {
|
||||
.phy = PHY_ID,
|
||||
.phy_interface = PHY_INTERFACE_MODE_MII,
|
||||
};
|
||||
|
||||
static struct resource sh_eth0_resources[] = {
|
||||
[0] = {
|
||||
.start = SH_ETH0_BASE,
|
||||
|
@ -131,7 +137,7 @@ static struct platform_device sh_eth0_device = {
|
|||
.name = "sh771x-ether",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = PHY_ID,
|
||||
.platform_data = &sh_eth_plat,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(sh_eth0_resources),
|
||||
.resource = sh_eth0_resources,
|
||||
|
@ -154,7 +160,7 @@ static struct platform_device sh_eth1_device = {
|
|||
.name = "sh771x-ether",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = PHY_ID,
|
||||
.platform_data = &sh_eth_plat,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(sh_eth1_resources),
|
||||
.resource = sh_eth1_resources,
|
||||
|
|
|
@ -127,6 +127,13 @@ nvkm_pci_init(struct nvkm_subdev *subdev)
|
|||
return ret;
|
||||
|
||||
pci->irq = pdev->irq;
|
||||
|
||||
/* Ensure MSI interrupts are armed, for the case where there are
|
||||
* already interrupts pending (for whatever reason) at load time.
|
||||
*/
|
||||
if (pci->msi)
|
||||
pci->func->msi_rearm(pci);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -818,6 +818,8 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages)
|
|||
pr_info("Initializing pool allocator\n");
|
||||
|
||||
_manager = kzalloc(sizeof(*_manager), GFP_KERNEL);
|
||||
if (!_manager)
|
||||
return -ENOMEM;
|
||||
|
||||
ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc");
|
||||
|
||||
|
|
|
@ -424,7 +424,6 @@ struct ib_mr *mlx4_ib_alloc_mr(struct ib_pd *pd,
|
|||
goto err_free_mr;
|
||||
|
||||
mr->max_pages = max_num_sg;
|
||||
|
||||
err = mlx4_mr_enable(dev->dev, &mr->mmr);
|
||||
if (err)
|
||||
goto err_free_pl;
|
||||
|
@ -435,6 +434,7 @@ struct ib_mr *mlx4_ib_alloc_mr(struct ib_pd *pd,
|
|||
return &mr->ibmr;
|
||||
|
||||
err_free_pl:
|
||||
mr->ibmr.device = pd->device;
|
||||
mlx4_free_priv_pages(mr);
|
||||
err_free_mr:
|
||||
(void) mlx4_mr_free(dev->dev, &mr->mmr);
|
||||
|
|
|
@ -844,8 +844,8 @@ static int path_rec_start(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void neigh_add_path(struct sk_buff *skb, u8 *daddr,
|
||||
struct net_device *dev)
|
||||
static struct ipoib_neigh *neigh_add_path(struct sk_buff *skb, u8 *daddr,
|
||||
struct net_device *dev)
|
||||
{
|
||||
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
||||
struct ipoib_path *path;
|
||||
|
@ -858,7 +858,15 @@ static void neigh_add_path(struct sk_buff *skb, u8 *daddr,
|
|||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
++dev->stats.tx_dropped;
|
||||
dev_kfree_skb_any(skb);
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* To avoid race condition, make sure that the
|
||||
* neigh will be added only once.
|
||||
*/
|
||||
if (unlikely(!list_empty(&neigh->list))) {
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
return neigh;
|
||||
}
|
||||
|
||||
path = __path_find(dev, daddr + 4);
|
||||
|
@ -896,7 +904,7 @@ static void neigh_add_path(struct sk_buff *skb, u8 *daddr,
|
|||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
ipoib_send(dev, skb, path->ah, IPOIB_QPN(daddr));
|
||||
ipoib_neigh_put(neigh);
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
neigh->ah = NULL;
|
||||
|
@ -913,7 +921,7 @@ static void neigh_add_path(struct sk_buff *skb, u8 *daddr,
|
|||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
ipoib_neigh_put(neigh);
|
||||
return;
|
||||
return NULL;
|
||||
|
||||
err_path:
|
||||
ipoib_neigh_free(neigh);
|
||||
|
@ -923,6 +931,8 @@ err_drop:
|
|||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
ipoib_neigh_put(neigh);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
|
||||
|
@ -1028,8 +1038,9 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
case htons(ETH_P_TIPC):
|
||||
neigh = ipoib_neigh_get(dev, phdr->hwaddr);
|
||||
if (unlikely(!neigh)) {
|
||||
neigh_add_path(skb, phdr->hwaddr, dev);
|
||||
return NETDEV_TX_OK;
|
||||
neigh = neigh_add_path(skb, phdr->hwaddr, dev);
|
||||
if (likely(!neigh))
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
break;
|
||||
case htons(ETH_P_ARP):
|
||||
|
|
|
@ -775,7 +775,10 @@ void ipoib_mcast_send(struct net_device *dev, u8 *daddr, struct sk_buff *skb)
|
|||
spin_lock_irqsave(&priv->lock, flags);
|
||||
if (!neigh) {
|
||||
neigh = ipoib_neigh_alloc(daddr, dev);
|
||||
if (neigh) {
|
||||
/* Make sure that the neigh will be added only
|
||||
* once to mcast list.
|
||||
*/
|
||||
if (neigh && list_empty(&neigh->list)) {
|
||||
kref_get(&mcast->ah->ref);
|
||||
neigh->ah = mcast->ah;
|
||||
list_add_tail(&neigh->list, &mcast->neigh_list);
|
||||
|
|
|
@ -149,7 +149,7 @@ void led_blink_set(struct led_classdev *led_cdev,
|
|||
unsigned long *delay_on,
|
||||
unsigned long *delay_off)
|
||||
{
|
||||
del_timer_sync(&led_cdev->blink_timer);
|
||||
led_stop_software_blink(led_cdev);
|
||||
|
||||
led_cdev->flags &= ~LED_BLINK_ONESHOT;
|
||||
led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP;
|
||||
|
|
|
@ -1029,9 +1029,6 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* handle the block mark swapping */
|
||||
block_mark_swapping(this, payload_virt, auxiliary_virt);
|
||||
|
||||
/* Loop over status bytes, accumulating ECC status. */
|
||||
status = auxiliary_virt + nfc_geo->auxiliary_status_offset;
|
||||
|
||||
|
@ -1047,6 +1044,9 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip,
|
|||
max_bitflips = max_t(unsigned int, max_bitflips, *status);
|
||||
}
|
||||
|
||||
/* handle the block mark swapping */
|
||||
block_mark_swapping(this, buf, auxiliary_virt);
|
||||
|
||||
if (oob_required) {
|
||||
/*
|
||||
* It's time to deliver the OOB bytes. See gpmi_ecc_read_oob()
|
||||
|
|
|
@ -493,7 +493,7 @@ static int flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
data = be32_to_cpup((__be32 *)&cf->data[0]);
|
||||
flexcan_write(data, ®s->mb[FLEXCAN_TX_BUF_ID].data[0]);
|
||||
}
|
||||
if (cf->can_dlc > 3) {
|
||||
if (cf->can_dlc > 4) {
|
||||
data = be32_to_cpup((__be32 *)&cf->data[4]);
|
||||
flexcan_write(data, ®s->mb[FLEXCAN_TX_BUF_ID].data[1]);
|
||||
}
|
||||
|
|
|
@ -250,39 +250,48 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
|
|||
continue;
|
||||
}
|
||||
|
||||
pktlen = info & LEN_MASK;
|
||||
stats->rx_packets++;
|
||||
stats->rx_bytes += pktlen;
|
||||
skb = rx_buff->skb;
|
||||
skb_put(skb, pktlen);
|
||||
skb->dev = ndev;
|
||||
skb->protocol = eth_type_trans(skb, ndev);
|
||||
|
||||
dma_unmap_single(&ndev->dev, dma_unmap_addr(rx_buff, addr),
|
||||
dma_unmap_len(rx_buff, len), DMA_FROM_DEVICE);
|
||||
|
||||
/* Prepare the BD for next cycle */
|
||||
rx_buff->skb = netdev_alloc_skb_ip_align(ndev,
|
||||
EMAC_BUFFER_SIZE);
|
||||
if (unlikely(!rx_buff->skb)) {
|
||||
/* Prepare the BD for next cycle. netif_receive_skb()
|
||||
* only if new skb was allocated and mapped to avoid holes
|
||||
* in the RX fifo.
|
||||
*/
|
||||
skb = netdev_alloc_skb_ip_align(ndev, EMAC_BUFFER_SIZE);
|
||||
if (unlikely(!skb)) {
|
||||
if (net_ratelimit())
|
||||
netdev_err(ndev, "cannot allocate skb\n");
|
||||
/* Return ownership to EMAC */
|
||||
rxbd->info = cpu_to_le32(FOR_EMAC | EMAC_BUFFER_SIZE);
|
||||
stats->rx_errors++;
|
||||
/* Because receive_skb is below, increment rx_dropped */
|
||||
stats->rx_dropped++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* receive_skb only if new skb was allocated to avoid holes */
|
||||
netif_receive_skb(skb);
|
||||
|
||||
addr = dma_map_single(&ndev->dev, (void *)rx_buff->skb->data,
|
||||
addr = dma_map_single(&ndev->dev, (void *)skb->data,
|
||||
EMAC_BUFFER_SIZE, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&ndev->dev, addr)) {
|
||||
if (net_ratelimit())
|
||||
netdev_err(ndev, "cannot dma map\n");
|
||||
dev_kfree_skb(rx_buff->skb);
|
||||
netdev_err(ndev, "cannot map dma buffer\n");
|
||||
dev_kfree_skb(skb);
|
||||
/* Return ownership to EMAC */
|
||||
rxbd->info = cpu_to_le32(FOR_EMAC | EMAC_BUFFER_SIZE);
|
||||
stats->rx_errors++;
|
||||
stats->rx_dropped++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* unmap previosly mapped skb */
|
||||
dma_unmap_single(&ndev->dev, dma_unmap_addr(rx_buff, addr),
|
||||
dma_unmap_len(rx_buff, len), DMA_FROM_DEVICE);
|
||||
|
||||
pktlen = info & LEN_MASK;
|
||||
stats->rx_packets++;
|
||||
stats->rx_bytes += pktlen;
|
||||
skb_put(rx_buff->skb, pktlen);
|
||||
rx_buff->skb->dev = ndev;
|
||||
rx_buff->skb->protocol = eth_type_trans(rx_buff->skb, ndev);
|
||||
|
||||
netif_receive_skb(rx_buff->skb);
|
||||
|
||||
rx_buff->skb = skb;
|
||||
dma_unmap_addr_set(rx_buff, addr, addr);
|
||||
dma_unmap_len_set(rx_buff, len, EMAC_BUFFER_SIZE);
|
||||
|
||||
|
|
|
@ -3052,7 +3052,7 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link)
|
|||
|
||||
del_timer_sync(&bp->timer);
|
||||
|
||||
if (IS_PF(bp)) {
|
||||
if (IS_PF(bp) && !BP_NOMCP(bp)) {
|
||||
/* Set ALWAYS_ALIVE bit in shmem */
|
||||
bp->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE;
|
||||
bnx2x_drv_pulse(bp);
|
||||
|
@ -3134,7 +3134,7 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link)
|
|||
bp->cnic_loaded = false;
|
||||
|
||||
/* Clear driver version indication in shmem */
|
||||
if (IS_PF(bp))
|
||||
if (IS_PF(bp) && !BP_NOMCP(bp))
|
||||
bnx2x_update_mng_version(bp);
|
||||
|
||||
/* Check if there are pending parity attentions. If there are - set
|
||||
|
|
|
@ -9570,6 +9570,15 @@ static int bnx2x_init_shmem(struct bnx2x *bp)
|
|||
|
||||
do {
|
||||
bp->common.shmem_base = REG_RD(bp, MISC_REG_SHARED_MEM_ADDR);
|
||||
|
||||
/* If we read all 0xFFs, means we are in PCI error state and
|
||||
* should bail out to avoid crashes on adapter's FW reads.
|
||||
*/
|
||||
if (bp->common.shmem_base == 0xFFFFFFFF) {
|
||||
bp->flags |= NO_MCP_FLAG;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (bp->common.shmem_base) {
|
||||
val = SHMEM_RD(bp, validity_map[BP_PORT(bp)]);
|
||||
if (val & SHR_MEM_VALIDITY_MB)
|
||||
|
@ -14214,7 +14223,10 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)
|
|||
BNX2X_ERR("IO slot reset --> driver unload\n");
|
||||
|
||||
/* MCP should have been reset; Need to wait for validity */
|
||||
bnx2x_init_shmem(bp);
|
||||
if (bnx2x_init_shmem(bp)) {
|
||||
rtnl_unlock();
|
||||
return PCI_ERS_RESULT_DISCONNECT;
|
||||
}
|
||||
|
||||
if (IS_PF(bp) && SHMEM2_HAS(bp, drv_capabilities_flag)) {
|
||||
u32 v;
|
||||
|
|
|
@ -29,7 +29,7 @@ static int bnxt_vf_ndo_prep(struct bnxt *bp, int vf_id)
|
|||
netdev_err(bp->dev, "vf ndo called though sriov is disabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (vf_id >= bp->pf.max_vfs) {
|
||||
if (vf_id >= bp->pf.active_vfs) {
|
||||
netdev_err(bp->dev, "Invalid VF id %d\n", vf_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -10051,6 +10051,16 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
|
|||
|
||||
tw32(GRC_MODE, tp->grc_mode | val);
|
||||
|
||||
/* On one of the AMD platform, MRRS is restricted to 4000 because of
|
||||
* south bridge limitation. As a workaround, Driver is setting MRRS
|
||||
* to 2048 instead of default 4096.
|
||||
*/
|
||||
if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
|
||||
tp->pdev->subsystem_device == TG3PCI_SUBDEVICE_ID_DELL_5762) {
|
||||
val = tr32(TG3PCI_DEV_STATUS_CTRL) & ~MAX_READ_REQ_MASK;
|
||||
tw32(TG3PCI_DEV_STATUS_CTRL, val | MAX_READ_REQ_SIZE_2048);
|
||||
}
|
||||
|
||||
/* Setup the timer prescalar register. Clock is always 66Mhz. */
|
||||
val = tr32(GRC_MISC_CFG);
|
||||
val &= ~0xff;
|
||||
|
@ -14230,7 +14240,8 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
|
|||
*/
|
||||
if (tg3_asic_rev(tp) == ASIC_REV_57766 ||
|
||||
tg3_asic_rev(tp) == ASIC_REV_5717 ||
|
||||
tg3_asic_rev(tp) == ASIC_REV_5719)
|
||||
tg3_asic_rev(tp) == ASIC_REV_5719 ||
|
||||
tg3_asic_rev(tp) == ASIC_REV_5720)
|
||||
reset_phy = true;
|
||||
|
||||
err = tg3_restart_hw(tp, reset_phy);
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
#define TG3PCI_SUBDEVICE_ID_DELL_JAGUAR 0x0106
|
||||
#define TG3PCI_SUBDEVICE_ID_DELL_MERLOT 0x0109
|
||||
#define TG3PCI_SUBDEVICE_ID_DELL_SLIM_MERLOT 0x010a
|
||||
#define TG3PCI_SUBDEVICE_ID_DELL_5762 0x07f0
|
||||
#define TG3PCI_SUBVENDOR_ID_COMPAQ PCI_VENDOR_ID_COMPAQ
|
||||
#define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE 0x007c
|
||||
#define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE_2 0x009a
|
||||
|
@ -280,6 +281,9 @@
|
|||
#define TG3PCI_STD_RING_PROD_IDX 0x00000098 /* 64-bit */
|
||||
#define TG3PCI_RCV_RET_RING_CON_IDX 0x000000a0 /* 64-bit */
|
||||
/* 0xa8 --> 0xb8 unused */
|
||||
#define TG3PCI_DEV_STATUS_CTRL 0x000000b4
|
||||
#define MAX_READ_REQ_SIZE_2048 0x00004000
|
||||
#define MAX_READ_REQ_MASK 0x00007000
|
||||
#define TG3PCI_DUAL_MAC_CTRL 0x000000b8
|
||||
#define DUAL_MAC_CTRL_CH_MASK 0x00000003
|
||||
#define DUAL_MAC_CTRL_ID 0x00000004
|
||||
|
|
|
@ -314,11 +314,10 @@ static int ptp_gianfar_adjtime(struct ptp_clock_info *ptp, s64 delta)
|
|||
now = tmr_cnt_read(etsects);
|
||||
now += delta;
|
||||
tmr_cnt_write(etsects, now);
|
||||
set_fipers(etsects);
|
||||
|
||||
spin_unlock_irqrestore(&etsects->lock, flags);
|
||||
|
||||
set_fipers(etsects);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,8 @@ struct e1000_adapter {
|
|||
enum e1000_state_t {
|
||||
__E1000_TESTING,
|
||||
__E1000_RESETTING,
|
||||
__E1000_DOWN
|
||||
__E1000_DOWN,
|
||||
__E1000_DISABLED
|
||||
};
|
||||
|
||||
#undef pr_fmt
|
||||
|
|
|
@ -940,7 +940,7 @@ static int e1000_init_hw_struct(struct e1000_adapter *adapter,
|
|||
static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct e1000_adapter *adapter;
|
||||
struct e1000_adapter *adapter = NULL;
|
||||
struct e1000_hw *hw;
|
||||
|
||||
static int cards_found = 0;
|
||||
|
@ -950,6 +950,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
u16 tmp = 0;
|
||||
u16 eeprom_apme_mask = E1000_EEPROM_APME;
|
||||
int bars, need_ioport;
|
||||
bool disable_dev = false;
|
||||
|
||||
/* do not allocate ioport bars when not needed */
|
||||
need_ioport = e1000_is_need_ioport(pdev);
|
||||
|
@ -1250,11 +1251,13 @@ err_mdio_ioremap:
|
|||
iounmap(hw->ce4100_gbe_mdio_base_virt);
|
||||
iounmap(hw->hw_addr);
|
||||
err_ioremap:
|
||||
disable_dev = !test_and_set_bit(__E1000_DISABLED, &adapter->flags);
|
||||
free_netdev(netdev);
|
||||
err_alloc_etherdev:
|
||||
pci_release_selected_regions(pdev, bars);
|
||||
err_pci_reg:
|
||||
pci_disable_device(pdev);
|
||||
if (!adapter || disable_dev)
|
||||
pci_disable_device(pdev);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1272,6 +1275,7 @@ static void e1000_remove(struct pci_dev *pdev)
|
|||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
bool disable_dev;
|
||||
|
||||
e1000_down_and_stop(adapter);
|
||||
e1000_release_manageability(adapter);
|
||||
|
@ -1290,9 +1294,11 @@ static void e1000_remove(struct pci_dev *pdev)
|
|||
iounmap(hw->flash_address);
|
||||
pci_release_selected_regions(pdev, adapter->bars);
|
||||
|
||||
disable_dev = !test_and_set_bit(__E1000_DISABLED, &adapter->flags);
|
||||
free_netdev(netdev);
|
||||
|
||||
pci_disable_device(pdev);
|
||||
if (disable_dev)
|
||||
pci_disable_device(pdev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5135,7 +5141,8 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
|||
if (netif_running(netdev))
|
||||
e1000_free_irq(adapter);
|
||||
|
||||
pci_disable_device(pdev);
|
||||
if (!test_and_set_bit(__E1000_DISABLED, &adapter->flags))
|
||||
pci_disable_device(pdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -5179,6 +5186,10 @@ static int e1000_resume(struct pci_dev *pdev)
|
|||
pr_err("Cannot enable PCI device from suspend\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
/* flush memory to make sure state is correct */
|
||||
smp_mb__before_atomic();
|
||||
clear_bit(__E1000_DISABLED, &adapter->flags);
|
||||
pci_set_master(pdev);
|
||||
|
||||
pci_enable_wake(pdev, PCI_D3hot, 0);
|
||||
|
@ -5253,7 +5264,9 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
|
|||
|
||||
if (netif_running(netdev))
|
||||
e1000_down(adapter);
|
||||
pci_disable_device(pdev);
|
||||
|
||||
if (!test_and_set_bit(__E1000_DISABLED, &adapter->flags))
|
||||
pci_disable_device(pdev);
|
||||
|
||||
/* Request a slot slot reset. */
|
||||
return PCI_ERS_RESULT_NEED_RESET;
|
||||
|
@ -5281,6 +5294,10 @@ static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev)
|
|||
pr_err("Cannot re-enable PCI device after reset.\n");
|
||||
return PCI_ERS_RESULT_DISCONNECT;
|
||||
}
|
||||
|
||||
/* flush memory to make sure state is correct */
|
||||
smp_mb__before_atomic();
|
||||
clear_bit(__E1000_DISABLED, &adapter->flags);
|
||||
pci_set_master(pdev);
|
||||
|
||||
pci_enable_wake(pdev, PCI_D3hot, 0);
|
||||
|
|
|
@ -128,8 +128,10 @@ static int sun4i_mdio_probe(struct platform_device *pdev)
|
|||
|
||||
data->regulator = devm_regulator_get(&pdev->dev, "phy");
|
||||
if (IS_ERR(data->regulator)) {
|
||||
if (PTR_ERR(data->regulator) == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
if (PTR_ERR(data->regulator) == -EPROBE_DEFER) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto err_out_free_mdiobus;
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "no regulator found\n");
|
||||
} else {
|
||||
|
|
|
@ -1331,6 +1331,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
|
|||
|
||||
netif_carrier_off(netdev);
|
||||
|
||||
xenbus_switch_state(dev, XenbusStateInitialising);
|
||||
return netdev;
|
||||
|
||||
exit:
|
||||
|
|
|
@ -2743,6 +2743,16 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
|
|||
erp = dasd_3990_erp_handle_match_erp(cqr, erp);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* For path verification work we need to stick with the path that was
|
||||
* originally chosen so that the per path configuration data is
|
||||
* assigned correctly.
|
||||
*/
|
||||
if (test_bit(DASD_CQR_VERIFY_PATH, &erp->flags) && cqr->lpm) {
|
||||
erp->lpm = cqr->lpm;
|
||||
}
|
||||
|
||||
if (device->features & DASD_FEATURE_ERPLOG) {
|
||||
/* print current erp_chain */
|
||||
dev_err(&device->cdev->dev,
|
||||
|
|
|
@ -890,10 +890,11 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
|
|||
case TEST_UNIT_READY:
|
||||
break;
|
||||
default:
|
||||
set_host_byte(scmnd, DID_TARGET_FAILURE);
|
||||
set_host_byte(scmnd, DID_ERROR);
|
||||
}
|
||||
break;
|
||||
case SRB_STATUS_INVALID_LUN:
|
||||
set_host_byte(scmnd, DID_NO_CONNECT);
|
||||
do_work = true;
|
||||
process_err_fn = storvsc_remove_lun;
|
||||
break;
|
||||
|
|
|
@ -1669,12 +1669,12 @@ static int atmel_spi_remove(struct platform_device *pdev)
|
|||
pm_runtime_get_sync(&pdev->dev);
|
||||
|
||||
/* reset the hardware and block queue progress */
|
||||
spin_lock_irq(&as->lock);
|
||||
if (as->use_dma) {
|
||||
atmel_spi_stop_dma(as);
|
||||
atmel_spi_release_dma(as);
|
||||
}
|
||||
|
||||
spin_lock_irq(&as->lock);
|
||||
spi_writel(as, CR, SPI_BIT(SWRST));
|
||||
spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */
|
||||
spi_readl(as, SR);
|
||||
|
|
|
@ -378,10 +378,8 @@ static int unmap_grant_pages(struct grant_map *map, int offset, int pages)
|
|||
}
|
||||
range = 0;
|
||||
while (range < pages) {
|
||||
if (map->unmap_ops[offset+range].handle == -1) {
|
||||
range--;
|
||||
if (map->unmap_ops[offset+range].handle == -1)
|
||||
break;
|
||||
}
|
||||
range++;
|
||||
}
|
||||
err = __unmap_grant_pages(map, offset, range);
|
||||
|
@ -876,8 +874,10 @@ unlock_out:
|
|||
out_unlock_put:
|
||||
mutex_unlock(&priv->lock);
|
||||
out_put_map:
|
||||
if (use_ptemod)
|
||||
if (use_ptemod) {
|
||||
map->vma = NULL;
|
||||
unmap_grant_pages(map, 0, map->count);
|
||||
}
|
||||
gntdev_put_map(priv, map);
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -497,7 +497,11 @@ retry:
|
|||
hlist_add_head(&s->s_instances, &type->fs_supers);
|
||||
spin_unlock(&sb_lock);
|
||||
get_filesystem(type);
|
||||
register_shrinker(&s->s_shrink);
|
||||
err = register_shrinker(&s->s_shrink);
|
||||
if (err) {
|
||||
deactivate_locked_super(s);
|
||||
s = ERR_PTR(err);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
STATIC int xfs_qm_init_quotainos(xfs_mount_t *);
|
||||
STATIC int xfs_qm_init_quotainfo(xfs_mount_t *);
|
||||
|
||||
|
||||
STATIC void xfs_qm_destroy_quotainos(xfs_quotainfo_t *qi);
|
||||
STATIC void xfs_qm_dqfree_one(struct xfs_dquot *dqp);
|
||||
/*
|
||||
* We use the batch lookup interface to iterate over the dquots as it
|
||||
|
@ -660,9 +660,17 @@ xfs_qm_init_quotainfo(
|
|||
qinf->qi_shrinker.scan_objects = xfs_qm_shrink_scan;
|
||||
qinf->qi_shrinker.seeks = DEFAULT_SEEKS;
|
||||
qinf->qi_shrinker.flags = SHRINKER_NUMA_AWARE;
|
||||
register_shrinker(&qinf->qi_shrinker);
|
||||
|
||||
error = register_shrinker(&qinf->qi_shrinker);
|
||||
if (error)
|
||||
goto out_free_inos;
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_inos:
|
||||
mutex_destroy(&qinf->qi_quotaofflock);
|
||||
mutex_destroy(&qinf->qi_tree_lock);
|
||||
xfs_qm_destroy_quotainos(qinf);
|
||||
out_free_lru:
|
||||
list_lru_destroy(&qinf->qi_lru);
|
||||
out_free_qinf:
|
||||
|
@ -671,7 +679,6 @@ out_free_qinf:
|
|||
return error;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Gets called when unmounting a filesystem or when all quotas get
|
||||
* turned off.
|
||||
|
@ -688,19 +695,8 @@ xfs_qm_destroy_quotainfo(
|
|||
|
||||
unregister_shrinker(&qi->qi_shrinker);
|
||||
list_lru_destroy(&qi->qi_lru);
|
||||
|
||||
if (qi->qi_uquotaip) {
|
||||
IRELE(qi->qi_uquotaip);
|
||||
qi->qi_uquotaip = NULL; /* paranoia */
|
||||
}
|
||||
if (qi->qi_gquotaip) {
|
||||
IRELE(qi->qi_gquotaip);
|
||||
qi->qi_gquotaip = NULL;
|
||||
}
|
||||
if (qi->qi_pquotaip) {
|
||||
IRELE(qi->qi_pquotaip);
|
||||
qi->qi_pquotaip = NULL;
|
||||
}
|
||||
xfs_qm_destroy_quotainos(qi);
|
||||
mutex_destroy(&qi->qi_tree_lock);
|
||||
mutex_destroy(&qi->qi_quotaofflock);
|
||||
kmem_free(qi);
|
||||
mp->m_quotainfo = NULL;
|
||||
|
@ -1561,6 +1557,24 @@ error_rele:
|
|||
return error;
|
||||
}
|
||||
|
||||
STATIC void
|
||||
xfs_qm_destroy_quotainos(
|
||||
xfs_quotainfo_t *qi)
|
||||
{
|
||||
if (qi->qi_uquotaip) {
|
||||
IRELE(qi->qi_uquotaip);
|
||||
qi->qi_uquotaip = NULL; /* paranoia */
|
||||
}
|
||||
if (qi->qi_gquotaip) {
|
||||
IRELE(qi->qi_gquotaip);
|
||||
qi->qi_gquotaip = NULL;
|
||||
}
|
||||
if (qi->qi_pquotaip) {
|
||||
IRELE(qi->qi_pquotaip);
|
||||
qi->qi_pquotaip = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
STATIC void
|
||||
xfs_qm_dqfree_one(
|
||||
struct xfs_dquot *dqp)
|
||||
|
|
|
@ -1139,7 +1139,12 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
|
|||
|
||||
cpu_base = raw_cpu_ptr(&hrtimer_bases);
|
||||
|
||||
if (clock_id == CLOCK_REALTIME && mode != HRTIMER_MODE_ABS)
|
||||
/*
|
||||
* POSIX magic: Relative CLOCK_REALTIME timers are not affected by
|
||||
* clock modifications, so they needs to become CLOCK_MONOTONIC to
|
||||
* ensure POSIX compliance.
|
||||
*/
|
||||
if (clock_id == CLOCK_REALTIME && mode & HRTIMER_MODE_REL)
|
||||
clock_id = CLOCK_MONOTONIC;
|
||||
|
||||
base = hrtimer_clockid_to_base(clock_id);
|
||||
|
|
|
@ -671,7 +671,23 @@ do { \
|
|||
************** MIPS/64 **************
|
||||
***************************************/
|
||||
#if (defined(__mips) && __mips >= 3) && W_TYPE_SIZE == 64
|
||||
#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
|
||||
#if defined(__mips_isa_rev) && __mips_isa_rev >= 6
|
||||
/*
|
||||
* GCC ends up emitting a __multi3 intrinsic call for MIPS64r6 with the plain C
|
||||
* code below, so we special case MIPS64r6 until the compiler can do better.
|
||||
*/
|
||||
#define umul_ppmm(w1, w0, u, v) \
|
||||
do { \
|
||||
__asm__ ("dmulu %0,%1,%2" \
|
||||
: "=d" ((UDItype)(w0)) \
|
||||
: "d" ((UDItype)(u)), \
|
||||
"d" ((UDItype)(v))); \
|
||||
__asm__ ("dmuhu %0,%1,%2" \
|
||||
: "=d" ((UDItype)(w1)) \
|
||||
: "d" ((UDItype)(u)), \
|
||||
"d" ((UDItype)(v))); \
|
||||
} while (0)
|
||||
#elif (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
|
||||
#define umul_ppmm(w1, w0, u, v) \
|
||||
do { \
|
||||
typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
|
||||
|
|
|
@ -1615,6 +1615,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
|
|||
}
|
||||
|
||||
rt->dst.flags |= DST_HOST;
|
||||
rt->dst.input = ip6_input;
|
||||
rt->dst.output = ip6_output;
|
||||
atomic_set(&rt->dst.__refcnt, 1);
|
||||
rt->rt6i_gateway = fl6->daddr;
|
||||
|
|
|
@ -3367,6 +3367,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
|
|||
}
|
||||
return true;
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
if (ether_addr_equal(sdata->vif.addr, hdr->addr2))
|
||||
return false;
|
||||
if (multicast)
|
||||
return true;
|
||||
return ether_addr_equal(sdata->vif.addr, hdr->addr1);
|
||||
|
|
|
@ -4445,7 +4445,7 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv
|
|||
len = sizeof(int);
|
||||
if (put_user(len, optlen))
|
||||
return -EFAULT;
|
||||
if (copy_to_user(optval, &sctp_sk(sk)->autoclose, sizeof(int)))
|
||||
if (copy_to_user(optval, &sctp_sk(sk)->autoclose, len))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
}
|
||||
|
@ -5022,6 +5022,9 @@ copy_getaddrs:
|
|||
err = -EFAULT;
|
||||
goto out;
|
||||
}
|
||||
/* XXX: We should have accounted for sizeof(struct sctp_getaddrs) too,
|
||||
* but we can't change it anymore.
|
||||
*/
|
||||
if (put_user(bytes_copied, optlen))
|
||||
err = -EFAULT;
|
||||
out:
|
||||
|
@ -5458,7 +5461,7 @@ static int sctp_getsockopt_maxseg(struct sock *sk, int len,
|
|||
params.assoc_id = 0;
|
||||
} else if (len >= sizeof(struct sctp_assoc_value)) {
|
||||
len = sizeof(struct sctp_assoc_value);
|
||||
if (copy_from_user(¶ms, optval, sizeof(params)))
|
||||
if (copy_from_user(¶ms, optval, len))
|
||||
return -EFAULT;
|
||||
} else
|
||||
return -EINVAL;
|
||||
|
@ -5627,7 +5630,9 @@ static int sctp_getsockopt_active_key(struct sock *sk, int len,
|
|||
|
||||
if (len < sizeof(struct sctp_authkeyid))
|
||||
return -EINVAL;
|
||||
if (copy_from_user(&val, optval, sizeof(struct sctp_authkeyid)))
|
||||
|
||||
len = sizeof(struct sctp_authkeyid);
|
||||
if (copy_from_user(&val, optval, len))
|
||||
return -EFAULT;
|
||||
|
||||
asoc = sctp_id2assoc(sk, val.scact_assoc_id);
|
||||
|
@ -5639,7 +5644,6 @@ static int sctp_getsockopt_active_key(struct sock *sk, int len,
|
|||
else
|
||||
val.scact_keynumber = ep->active_key_id;
|
||||
|
||||
len = sizeof(struct sctp_authkeyid);
|
||||
if (put_user(len, optlen))
|
||||
return -EFAULT;
|
||||
if (copy_to_user(optval, &val, len))
|
||||
|
@ -5665,7 +5669,7 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
|
|||
if (len < sizeof(struct sctp_authchunks))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_from_user(&val, optval, sizeof(struct sctp_authchunks)))
|
||||
if (copy_from_user(&val, optval, sizeof(val)))
|
||||
return -EFAULT;
|
||||
|
||||
to = p->gauth_chunks;
|
||||
|
@ -5710,7 +5714,7 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
|
|||
if (len < sizeof(struct sctp_authchunks))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_from_user(&val, optval, sizeof(struct sctp_authchunks)))
|
||||
if (copy_from_user(&val, optval, sizeof(val)))
|
||||
return -EFAULT;
|
||||
|
||||
to = p->gauth_chunks;
|
||||
|
|
Loading…
Add table
Reference in a new issue