Linux 3.18.98
Greg KH
maintainerI'm announcing the release of the 3.18.98 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/sh/boards/mach-se/770x/setup.c | 10 +++- drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 drivers/leds/led-core.c | 2 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 6 +- drivers/net/ethernet/arc/emac_main.c | 53 +++++++++++++---------- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 4 - drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 +++++- drivers/net/ethernet/broadcom/tg3.c | 13 +++++ drivers/net/ethernet/broadcom/tg3.h | 4 + drivers/net/ethernet/freescale/gianfar_ptp.c | 3 - drivers/net/ethernet/intel/e1000/e1000.h | 3 - drivers/net/ethernet/intel/e1000/e1000_main.c | 27 +++++++++-- drivers/net/phy/mdio-sun4i.c | 6 +- drivers/net/xen-netfront.c | 1 drivers/s390/block/dasd_3990_erp.c | 10 ++++ drivers/scsi/storvsc_drv.c | 3 - drivers/spi/spi-atmel.c | 2 drivers/xen/gntdev.c | 8 +-- fs/super.c | 6 ++ fs/xfs/xfs_qm.c | 46 +++++++++++++------ kernel/time/hrtimer.c | 7 ++- net/ipv6/ip6_output.c | 11 +--- net/ipv6/route.c | 1 net/sctp/socket.c | 16 ++++-- 25 files changed, 179 insertions(+), 81 deletions(-)
Al Viro (1):
sget(): handle failures of register_shrinker()
Alexander Kochetkov (1):
net: arc_emac: fix arc_emac_rx() error paths
Aliaksei Karaliou (2):
xfs: quota: fix missed destroy of qi_tree_lock
xfs: quota: check result of register_shrinker()
Anna-Maria Gleixner (1):
hrtimer: Ensure POSIX compliance (relative CLOCK_REALTIME hrtimers)
Brendan McGrath (1):
ipv6: icmp6: Allow icmp messages to be looped back
Cathy Avery (1):
scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error
Christophe JAILLET (1):
mdio-sun4i: Fix a memory leak
Eduardo Otubo (1):
xen-netfront: enable device after manual module load
Greg Kroah-Hartman (1):
Linux 3.18.98
Guilherme G. Piccoli (1):
bnx2x: Improve reliability in case of nested PCI errors
Jakub Sitnicki (1):
ipv6: Skip XFRM lookup if dst_entry in socket cache is valid
Marcelo Ricardo Leitner (1):
sctp: make use of pre-calculated len
Matthieu CASTET (1):
led: core: Fix brightness setting when setting delay_off=0
Radu Pirea (1):
spi: atmel: fixed spin_lock usage inside atmel_spi_remove
Ross Lagerwall (2):
xen/gntdev: Fix off-by-one error when unmapping with holes xen/gntdev: Fix partial gntdev_mmap() cleanup
Sascha Hauer (1):
mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM
Sergei Shtylyov (1):
SolutionEngine771x: fix Ether platform data
Siva Reddy Kallam (2):
tg3: Add workaround to restrict 5762 MRRS to 2048
tg3: Enable PHY reset in MTU change path for 5720
Stefan Haberland (1):
s390/dasd: fix wrongly assigned configuration data
Tushar Dave (1):
e1000: fix disabling already-disabled warning
Xiongwei Song (1):
drm/ttm: check the return value of kzalloc
Yangbo Lu (1):
net: gianfar_ptp: move set_fipers() to spinlock protecting area
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 97 +SUBLEVEL = 98 EXTRAVERSION = NAME = Diseased Newt
arch/sh/boards/mach-se/770x/setup.c +8 -2
@@ -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,
drivers/gpu/drm/ttm/ttm_page_alloc.c +2 -0
@@ -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" );
drivers/leds/led-core.c +1 -1
@@ -76,7 +76,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 ;
drivers/mtd/nand/gpmi-nand/gpmi-nand.c +3 -3
@@ -1025,9 +1025,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;
@@ -1043,6 +1040,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()
drivers/net/ethernet/arc/emac_main.c +31 -22
70 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +2 -2
@@ -2994,7 +2994,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);
@@ -3076,7 +3076,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
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +13 -1
@@ -9472,6 +9472,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)
@@ -13743,7 +13752,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;
drivers/net/ethernet/broadcom/tg3.c +12 -1
@@ -10028,6 +10028,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 ;
@@ -14204,7 +14214,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);
drivers/net/ethernet/broadcom/tg3.h +4 -0
@@ -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
drivers/net/ethernet/freescale/gianfar_ptp.c +1 -2
@@ -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 ; }
drivers/net/ethernet/intel/e1000/e1000.h +2 -1
@@ -328,7 +328,8 @@ struct e1000_adapter {enum e1000_state_t { __E1000_TESTING, __E1000_RESETTING, - __E1000_DOWN + __E1000_DOWN, + __E1000_DISABLED };#undef pr_fmt
drivers/net/ethernet/intel/e1000/e1000_main.c +22 -5
@@ -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); }/**
@@ -5137,7 +5143,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 ; }
@@ -5181,6 +5188,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 );
@@ -5255,7 +5266,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 ;
@@ -5283,6 +5296,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 );
drivers/net/phy/mdio-sun4i.c +4 -2
@@ -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 {
drivers/net/xen-netfront.c +1 -0
@@ -1358,6 +1358,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)netif_carrier_off (netdev); +xenbus_switch_state (dev, XenbusStateInitialising);return netdev; exit:
drivers/s390/block/dasd_3990_erp.c +10 -0
@@ -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,
drivers/scsi/storvsc_drv.c +2 -1
@@ -1029,10 +1029,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 ;
drivers/spi/spi-atmel.c +1 -1
@@ -1416,12 +1416,12 @@ static int atmel_spi_remove(struct platform_device *pdev)struct atmel_spi *as =spi_master_get_devdata (master);/* 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 );
drivers/xen/gntdev.c +4 -4
@@ -348,10 +348,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);
@@ -819,8 +817,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; }
fs/super.c +5 -1
@@ -476,7 +476,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; }
fs/xfs/xfs_qm.c +30 -16
78 lines not on this page · raw message
kernel/time/hrtimer.c +6 -1
@@ -1149,7 +1149,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);
net/ipv6/ip6_output.c +3 -8
@@ -1038,17 +1038,12 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, const struct in6_addr *final_dst) {struct dst_entry *dst =sk_dst_check (sk,inet6_sk (sk)->dst_cookie); -int err; dst =ip6_sk_dst_check (sk, dst, fl6); +if (!dst) + dst =ip6_dst_lookup_flow (sk, fl6, final_dst); - err =ip6_dst_lookup_tail (sk, &dst, fl6); -if (err) -return ERR_PTR (err); -if (final_dst) - fl6->daddr = *final_dst; - -return xfrm_lookup_route (sock_net (sk), dst,flowi6_to_flowi (fl6), sk,0 ); +return dst; }EXPORT_SYMBOL_GPL (ip6_sk_dst_lookup_flow);
net/ipv6/route.c +1 -0
@@ -1367,6 +1367,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;
net/sctp/socket.c +10 -6
@@ -4458,7 +4458,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 ; }
@@ -5035,6 +5035,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:
@@ -5471,7 +5474,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 ;
@@ -5635,7 +5638,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);
@@ -5647,7 +5652,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))
@@ -5673,7 +5677,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;
@@ -5718,7 +5722,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;