Linux 3.4.31
Greg KH
maintainerI'm announcing the release of the 3.4.31 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.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
------------
MAINTAINERS | 6 Makefile | 2 arch/x86/include/asm/efi.h | 1 arch/x86/kernel/reboot.c | 2 arch/x86/kernel/setup.c | 28 +-- arch/x86/platform/efi/efi.c | 57 ++++--- drivers/acpi/osl.c | 2 drivers/atm/iphase.h | 146 +++++++++---------- drivers/char/virtio_console.c | 3 drivers/firmware/dmi_scan.c | 2 drivers/firmware/efivars.c | 4 drivers/firmware/iscsi_ibft_find.c | 2 drivers/gpu/drm/radeon/radeon_device.c | 3 drivers/isdn/gigaset/capi.c | 2 drivers/net/ethernet/broadcom/tg3.c | 62 +++++--- drivers/net/ethernet/calxeda/xgmac.c | 4 drivers/net/ethernet/emulex/benet/be.h | 5 drivers/net/ethernet/emulex/benet/be_main.c | 56 +++++-- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 13 + drivers/net/ethernet/mellanox/mlx4/main.c | 11 - drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 drivers/net/ethernet/realtek/r8169.c | 7 drivers/net/ethernet/via/via-rhine.c | 8 - drivers/net/loopback.c | 5 drivers/net/wireless/rtlwifi/base.c | 7 drivers/net/wireless/rtlwifi/usb.c | 4 drivers/net/xen-netback/common.h | 3 drivers/net/xen-netback/interface.c | 23 +- drivers/net/xen-netback/netback.c | 115 +++++++++----- drivers/platform/x86/ibm_rtl.c | 2 drivers/platform/x86/samsung-laptop.c | 4 drivers/scsi/isci/init.c | 2 include/linux/efi.h | 24 ++- init/main.c | 4 kernel/resource.c | 50 ++++-- net/bluetooth/smp.c | 13 + net/bridge/br_netfilter.c | 3 net/core/pktgen.c | 9 - net/ipv4/ip_sockglue.c | 2 net/ipv4/tcp_input.c | 5 net/ipv6/addrconf.c | 2 net/ipv6/ip6_output.c | 4 net/ipv6/route.c | 3 net/packet/af_packet.c | 10 - net/sctp/endpointola.c | 5 net/sctp/outqueue.c | 12 + net/sctp/socket.c | 2 48 files changed, 460 insertions(+), 283 deletions(-)
Cong Wang (2):
net: prevent setting ttl=0 via IP_TTL
pktgen: correctly handle failures when adding a device
Daniel Borkmann (2):
net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree
net: sctp: sctp_endpoint_free: zero out secret key data
David S. Miller (1):
via-rhine: Fix bugs in NAPI support.
Eric Dumazet (3):
netxen: fix off by one bug in netxen_release_tx_buffer()
net: loopback: fix a dst refcounting issue
tcp: frto should not set snd_cwnd to 0
Greg Kroah-Hartman (1):
Linux 3.4.31
Heiko Carstens (1):
atm/iphase: rename fregt_t -> ffreg_t
Ian Campbell (3):
xen/netback: shutdown the ring if it contains garbage. xen/netback: free already allocated memory on failure in xen_netbk_get_requests
netback: correct netbk_tx_err to handle wrap around.
Ilpo Järvinen (1):
tcp: fix for zero packets_in_flight was too broad
Johan Hedberg (1):
Bluetooth: Fix handling of unexpected SMP PDUs
Larry Finger (2):
rtlwifi: Fix the usage of the wrong variable in usb.c
rtlwifi: Fix scheduling while atomic bug
Marcelo Ricardo Leitner (1):
ipv6: do not create neighbor entries for local delivery
Matt Fleming (2):
efi: Make 'efi_enabled' a function to query EFI facilities
samsung-laptop: Disable on EFI hardware
Matthew Daley (1):
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
Neil Horman (1):
sctp: refactor sctp_outq_teardown to insure proper re-initalization
Nithin Nayak Sujir (2):
tg3: Avoid null pointer dereference in tg3_interrupt in netconsole mode
tg3: Fix crc errors on jumbo frame receive
Or Gerlitz (1):
net/mlx4_core: Set number of msix vectors under SRIOV mode to firmware defaults
Phil Sutter (1):
packet: fix leakage of tx_ring memory
Rob Herring (1):
net: calxedaxgmac: throw away overrun frames
Romain KUNTZ (1):
ipv6: fix header length calculation in ip6_append_data()
Romain Kuntz (1):
ipv6: fix the noflags test in addrconf_get_prefix_route
Sarveshwar Bandi (1):
bridge: Pull ip header into skb->data before looking into ip header.
Sjur Brændeland (1):
virtio_console: Don't access uninitialized data.
Somnath Kotur (1):
be2net: Fix to trim skb for padded vlan packets to workaround an ASIC Bug
Stephen Hemminger (1):
MAINTAINERS: Stephen Hemminger email change
T Makphaibulchoke (1):
kernel/resource.c: fix stack overflow in __reserve_region_with_split()
Tilman Schmidt (1):
isdn/gigaset: fix zero size border case in debug dump
Timo Teräs (1):
r8169: remove the obsolete and incorrect AMD workaround
Yan Burman (1):
net/mlx4_en: Fix bridged vSwitch configuration for non SRIOV mode
Greg KH
maintainerMAINTAINERS +3 -3
@@ -2627,7 +2627,7 @@ S: Maintained F: drivers/net/ethernet/i825xx/eexpress.* ETHERNET BRIDGE -M: Stephen Hemminger <[email protected]> +M: Stephen Hemminger <[email protected]> L: [email protected] L: [email protected] W: http://www.linuxfoundation.org/en/Net:Bridge
@@ -4312,7 +4312,7 @@ S: Maintained MARVELL GIGABIT ETHERNET DRIVERS (skge/sky2) M: Mirko Lindner <[email protected]> -M: Stephen Hemminger <[email protected]> +M: Stephen Hemminger <[email protected]> L: [email protected] S: Maintained F: drivers/net/ethernet/marvell/sk*
@@ -4563,7 +4563,7 @@ S: Supported F: drivers/infiniband/hw/nes/ NETEM NETWORK EMULATOR -M: Stephen Hemminger <[email protected]> +M: Stephen Hemminger <[email protected]> L: [email protected] S: Maintained F: net/sched/sch_netem.c
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 30 +SUBLEVEL = 31 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/x86/include/asm/efi.h +1 -0
@@ -94,6 +94,7 @@ extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,#endif /* CONFIG_X86_32 */ extern int add_efi_memmap; +extern unsigned long x86_efi_facility;extern void efi_set_executable (efi_memory_desc_t *md,bool executable);extern int efi_memblock_x86_reserve_range (void );extern void efi_call_phys_prelog (void );
arch/x86/kernel/reboot.c +1 -1
@@ -619,7 +619,7 @@ static void native_machine_emergency_restart(void)break ;case BOOT_EFI : -if (efi_enabled) +if (efi_enabled (EFI_RUNTIME_SERVICES )) efi.reset_system(reboot_mode ? EFI_RESET_WARM : EFI_RESET_COLD,
arch/x86/kernel/setup.c +14 -14
@@ -818,15 +818,15 @@ void __init setup_arch(char **cmdline_p)#ifdef CONFIG_EFI if (!strncmp ((char *)&boot_params.efi_info.efi_loader_signature,"EL32" ,4 )) { - efi_enabled =1 ; - efi_64bit = false; +set_bit (EFI_BOOT , &x86_efi_facility); }else if (!strncmp ((char *)&boot_params.efi_info.efi_loader_signature,"EL64" ,4 )) { - efi_enabled =1 ; - efi_64bit = true; +set_bit (EFI_BOOT , &x86_efi_facility); +set_bit (EFI_64BIT , &x86_efi_facility); } -if (efi_enabled &&efi_memblock_x86_reserve_range ()) - efi_enabled =0 ; + +if (efi_enabled (EFI_BOOT )) +efi_memblock_x86_reserve_range ();#endif x86_init.oem.arch_setup ();
@@ -899,7 +899,7 @@ void __init setup_arch(char **cmdline_p)finish_e820_parsing (); -if (efi_enabled) +if (efi_enabled (EFI_BOOT ))efi_init ();dmi_scan_machine ();
@@ -982,7 +982,7 @@ void __init setup_arch(char **cmdline_p)* The EFI specification says that boot service code won't be called * after ExitBootServices(). This is, in fact, a lie. */ -if (efi_enabled) +if (efi_enabled (EFI_MEMMAP ))efi_reserve_boot_services ();/* preallocate 4k for mptable mpc */
@@ -1119,7 +1119,7 @@ void __init setup_arch(char **cmdline_p)#ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE ) -if (!efi_enabled || (efi_mem_type (0xa0000 ) !=EFI_CONVENTIONAL_MEMORY )) +if (!efi_enabled (EFI_BOOT ) || (efi_mem_type (0xa0000 ) !=EFI_CONVENTIONAL_MEMORY )) conswitchp = &vga_con;#elif defined(CONFIG_DUMMY_CONSOLE ) conswitchp = &dummy_con;
@@ -1136,14 +1136,14 @@ void __init setup_arch(char **cmdline_p)arch_init_ideal_nops ();#ifdef CONFIG_EFI -/* Once setup is done above, disable efi_enabled on mismatched -* firmware/kernel archtectures since there is no support for -* runtime services. +/* Once setup is done above, unmap the EFI memory map on +* mismatched firmware/kernel archtectures since there is no +* support for runtime services. */ -if (efi_enabled &&IS_ENABLED (CONFIG_X86_64 ) != efi_64bit) { +if (efi_enabled (EFI_BOOT ) && +IS_ENABLED (CONFIG_X86_64 ) !=efi_enabled (EFI_64BIT )) {pr_info ("efi: Setup done, disabling due to 32/64-bit mismatch\n" );efi_unmap_memmap (); - efi_enabled =0 ; }#endif }
arch/x86/platform/efi/efi.c +34 -23
137 lines not on this page · raw message
drivers/acpi/osl.c +1 -1
@@ -250,7 +250,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)return acpi_rsdp;#endif -if (efi_enabled) { +if (efi_enabled (EFI_CONFIG_TABLES )) {if (efi.acpi20 !=EFI_INVALID_TABLE_ADDR )return efi.acpi20;else if (efi.acpi !=EFI_INVALID_TABLE_ADDR )
drivers/atm/iphase.h +73 -73
155 lines not on this page · raw message
drivers/char/virtio_console.c +2 -1
@@ -1808,7 +1808,8 @@ static void virtcons_remove(struct virtio_device *vdev)/* Disable interrupts for vqs */ vdev->config->reset (vdev);/* Finish up work that's lined up */ -cancel_work_sync (&portdev->control_work); +if (use_multiport (portdev)) +cancel_work_sync (&portdev->control_work);list_for_each_entry_safe (port, port2, &portdev->ports, list)unplug_port (port);
drivers/firmware/dmi_scan.c +1 -1
@@ -471,7 +471,7 @@ void __init dmi_scan_machine(void)char __iomem *p, *q;int rc; -if (efi_enabled) { +if (efi_enabled (EFI_CONFIG_TABLES )) {if (efi.smbios ==EFI_INVALID_TABLE_ADDR ) goto error;
drivers/firmware/efivars.c +2 -2
@@ -1224,7 +1224,7 @@ efivars_init(void)printk (KERN_INFO "EFI Variables Facility v%s %s\n" ,EFIVARS_VERSION ,EFIVARS_DATE ); -if (!efi_enabled) +if (!efi_enabled (EFI_RUNTIME_SERVICES ))return 0 ;/* For now we'll register the efi directory at /sys/firmware/efi */
@@ -1262,7 +1262,7 @@ err_put: static void __exitefivars_exit (void ) { -if (efi_enabled) { +if (efi_enabled (EFI_RUNTIME_SERVICES )) {unregister_efivars (&__efivars);kobject_put (efi_kobj); }
drivers/firmware/iscsi_ibft_find.c +1 -1
@@ -99,7 +99,7 @@ unsigned long __init find_ibft_region(unsigned long *sizep)/* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will * only use ACPI for this */ -if (!efi_enabled) +if (!efi_enabled (EFI_BOOT ))find_ibft_in_mem ();if (ibft_addr) {
drivers/gpu/drm/radeon/radeon_device.c +2 -1
@@ -358,7 +358,8 @@ bool radeon_card_posted(struct radeon_device *rdev) {uint32_t reg; -if (efi_enabled && rdev->pdev->subsystem_vendor ==PCI_VENDOR_ID_APPLE ) +if (efi_enabled (EFI_BOOT ) && + rdev->pdev->subsystem_vendor ==PCI_VENDOR_ID_APPLE )return false;/* first check CRTCs */
drivers/isdn/gigaset/capi.c +2 -0
@@ -264,6 +264,8 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag,CAPIMSG_APPID (data),CAPIMSG_MSGID (data), l, CAPIMSG_CONTROL(data)); l -=12 ; +if (l <=0 ) +return ; dbgline =kmalloc (3 * l,GFP_ATOMIC );if (!dbgline)return ;
drivers/net/ethernet/broadcom/tg3.c +39 -23
158 lines not on this page · raw message
drivers/net/ethernet/calxeda/xgmac.c +4 -0
@@ -547,6 +547,10 @@ static int desc_get_rx_status(struct xgmac_priv *priv, struct xgmac_dma_desc *p)return -1 ; } +/* All frames should fit into a single buffer */ +if (!(status &RXDESC_FIRST_SEG ) || !(status &RXDESC_LAST_SEG )) +return -1 ; +/* Check if packet has checksum already */ if ((status &RXDESC_FRAME_TYPE ) && (status &RXDESC_EXT_STATUS ) && !(ext_status &RXDESC_IP_PAYLOAD_MASK ))
drivers/net/ethernet/emulex/benet/be.h +5 -0
@@ -536,6 +536,11 @@ static inline void be_check_sriov_fn_type(struct be_adapter *adapter) adapter->is_virtfn = (sli_intf &SLI_INTF_FT_MASK ) ?1 :0 ; } +static inline bool is_ipv4_pkt (struct sk_buff *skb) +{ +return skb->protocol ==ntohs (ETH_P_IP ) &&ip_hdr (skb)->version ==4 ; +} +static inline void be_vf_eth_addr_generate (struct be_adapter *adapter,u8 *mac) {u32 addr;
drivers/net/ethernet/emulex/benet/be_main.c +42 -14
81 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx4/en_tx.c +9 -4
@@ -683,10 +683,15 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) ring->tx_csum++; } -/* Copy dst mac address to wqe */ - ethh = (struct ethhdr *)skb->data; - tx_desc->ctrl.srcrb_flags16[0 ] =get_unaligned ((__be16 *)ethh->h_dest); - tx_desc->ctrl.imm =get_unaligned ((__be32 *)(ethh->h_dest +2 )); +if (mlx4_is_mfunc (mdev->dev) || priv->validate_loopback) { +/* Copy dst mac address to wqe. This allows loopback in eSwitch, +* so that VFs and PF can communicate with each other +*/ + ethh = (struct ethhdr *)skb->data; + tx_desc->ctrl.srcrb_flags16[0 ] =get_unaligned ((__be16 *)ethh->h_dest); + tx_desc->ctrl.imm =get_unaligned ((__be32 *)(ethh->h_dest +2 )); + } +/* Handle LSO (TSO) packets */ if (lso_header_size) {/* Mark opcode as LSO */
drivers/net/ethernet/mellanox/mlx4/main.c +2 -9
@@ -1526,15 +1526,8 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)int i;if (msi_x) { -/* In multifunction mode each function gets 2 msi-X vectors -* one for data path completions anf the other for asynch events -* or command completions */ -if (mlx4_is_mfunc (dev)) { - nreq =2 ; - }else { - nreq =min_t (int, dev->caps.num_eqs - - dev->caps.reserved_eqs, nreq); - } + nreq =min_t (int, dev->caps.num_eqs - dev->caps.reserved_eqs, + nreq); entries =kcalloc (nreq,sizeof *entries,GFP_KERNEL );if (!entries)
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +1 -1
@@ -144,7 +144,7 @@ void netxen_release_tx_buffers(struct netxen_adapter *adapter) buffrag->length, PCI_DMA_TODEVICE); buffrag->dma =0ULL ; } -for (j =0 ; j < cmd_buf->frag_count; j++) { +for (j =1 ; j < cmd_buf->frag_count; j++) { buffrag++;if (buffrag->dma) { pci_unmap_page(adapter->pdev, buffrag->dma,
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +2 -0
@@ -1956,10 +1956,12 @@ unwind:while (--i >=0 ) { nf = &pbuf->frag_array[i+1 ];pci_unmap_page (pdev, nf->dma, nf->length,PCI_DMA_TODEVICE ); + nf->dma =0ULL ; } nf = &pbuf->frag_array[0 ];pci_unmap_single (pdev, nf->dma,skb_headlen (skb),PCI_DMA_TODEVICE ); + nf->dma =0ULL ; out_err:return -ENOMEM ;
drivers/net/ethernet/realtek/r8169.c +0 -7
@@ -5450,13 +5450,6 @@ process_pkt: tp->rx_stats.bytes += pkt_size;u64_stats_update_end (&tp->rx_stats.syncp); } - -/* Work around for AMD plateform. */ -if ((desc->opts2 &cpu_to_le32 (0xfffe000 )) && - (tp->mac_version ==RTL_GIGA_MAC_VER_05 )) { - desc->opts2 =0 ; - cur_rx++; - } } count = cur_rx - tp->cur_rx;
drivers/net/ethernet/via/via-rhine.c +2 -6
@@ -1802,7 +1802,7 @@ static void rhine_tx(struct net_device *dev) rp->tx_skbuff[entry]->len, PCI_DMA_TODEVICE); } -dev_kfree_skb_irq (rp->tx_skbuff[entry]); +dev_kfree_skb (rp->tx_skbuff[entry]); rp->tx_skbuff[entry] =NULL ; entry = (++rp->dirty_tx) %TX_RING_SIZE ; }
@@ -2011,11 +2011,7 @@ static void rhine_slow_event_task(struct work_struct *work)if (intr_status & IntrPCIErr)netif_warn (rp, hw, dev,"PCI error\n" ); -napi_disable (&rp->napi); -rhine_irq_disable (rp); -/* Slow and safe. Consider __napi_schedule as a replacement ? */ -napi_enable (&rp->napi); -napi_schedule (&rp->napi); +iowrite16 (RHINE_EVENT &0xffff , rp->base + IntrEnable); out_unlock:mutex_unlock (&rp->task_lock);
drivers/net/loopback.c +5 -0
@@ -77,6 +77,11 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb,skb_orphan (skb); +/* Before queueing this packet to netif_rx(), +* make sure dst is refcounted. +*/ +skb_dst_force (skb); + skb->protocol =eth_type_trans (skb, dev);/* it's OK to use per_cpu_ptr() because BHs are off */
drivers/net/wireless/rtlwifi/base.c +4 -3
@@ -980,7 +980,8 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) is_tx ? "Tx" : "Rx");if (is_tx) { -rtl_lps_leave (hw); +schedule_work (&rtlpriv-> + works.lps_leave_work); ppsc->last_delaylps_stamp_jiffies = jiffies; }
@@ -990,7 +991,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) } }else if (ETH_P_ARP == ether_type) {if (is_tx) { -rtl_lps_leave (hw); +schedule_work (&rtlpriv->works.lps_leave_work); ppsc->last_delaylps_stamp_jiffies = jiffies; }
@@ -1000,7 +1001,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) "802.1X %s EAPOL pkt!!\n", is_tx ? "Tx" : "Rx");if (is_tx) { -rtl_lps_leave (hw); +schedule_work (&rtlpriv->works.lps_leave_work); ppsc->last_delaylps_stamp_jiffies = jiffies; }
drivers/net/wireless/rtlwifi/usb.c +2 -2
@@ -542,8 +542,8 @@ static void _rtl_rx_pre_process(struct ieee80211_hw *hw, struct sk_buff *skb)WARN_ON (skb_queue_empty (&rx_queue));while (!skb_queue_empty (&rx_queue)) { _skb =skb_dequeue (&rx_queue); -_rtl_usb_rx_process_agg (hw, skb); -ieee80211_rx_irqsafe (hw, skb); +_rtl_usb_rx_process_agg (hw, _skb); +ieee80211_rx_irqsafe (hw, _skb); } }
drivers/net/xen-netback/common.h +3 -0
@@ -151,6 +151,9 @@ void xen_netbk_queue_tx_skb(struct xenvif *vif, struct sk_buff *skb);/* Notify xenvif that ring now has space to send an skb to the frontend */ void xenvif_notify_tx_completion (struct xenvif *vif); +/* Prevent the device from generating any further traffic. */ +void xenvif_carrier_off (struct xenvif *vif); +/* Returns number of ring slots required to send an skb to the frontend */ unsigned int xen_netbk_count_skb_slots (struct xenvif *vif,struct sk_buff *skb);
drivers/net/xen-netback/interface.c +14 -9
@@ -343,17 +343,22 @@ err:return err; } -void xenvif_disconnect (struct xenvif *vif) +void xenvif_carrier_off (struct xenvif *vif) {struct net_device *dev = vif->dev; -if (netif_carrier_ok (dev)) { -rtnl_lock (); -netif_carrier_off (dev);/* discard queued packets */ -if (netif_running (dev)) -xenvif_down (vif); -rtnl_unlock (); -xenvif_put (vif); - } + +rtnl_lock (); +netif_carrier_off (dev);/* discard queued packets */ +if (netif_running (dev)) +xenvif_down (vif); +rtnl_unlock (); +xenvif_put (vif); +} + +void xenvif_disconnect (struct xenvif *vif) +{ +if (netif_carrier_ok (vif->dev)) +xenvif_carrier_off (vif);atomic_dec (&vif->refcnt);wait_event (vif->waiting_to_free,atomic_read (&vif->refcnt) ==0 );
drivers/net/xen-netback/netback.c +71 -44
288 lines not on this page · raw message
drivers/platform/x86/ibm_rtl.c +1 -1
@@ -244,7 +244,7 @@ static int __init ibm_rtl_init(void) {if (force)pr_warn ("module loaded by force\n" );/* first ensure that we are running on IBM HW */ -else if (efi_enabled || !dmi_check_system (ibm_rtl_dmi_table)) +else if (efi_enabled (EFI_BOOT ) || !dmi_check_system (ibm_rtl_dmi_table))return -ENODEV ;/* Get the address for the Extended BIOS Data Area */
drivers/platform/x86/samsung-laptop.c +4 -0
@@ -26,6 +26,7 @@#include <linux/seq_file.h> #include <linux/debugfs.h> #include <linux/ctype.h> +#include <linux/efi.h> #if (definedCONFIG_ACPI_VIDEO || definedCONFIG_ACPI_VIDEO_MODULE )#include <acpi/video.h> #endif
@@ -1527,6 +1528,9 @@ static int __init samsung_init(void)struct samsung_laptop *samsung;int ret; +if (efi_enabled (EFI_BOOT )) +return -ENODEV ; + quirks = &samsung_unknown;if (!force && !dmi_check_system (samsung_dmi_table))return -ENODEV ;
drivers/scsi/isci/init.c +1 -1
@@ -470,7 +470,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devicreturn -ENOMEM ;pci_set_drvdata (pdev, pci_info); -if (efi_enabled) +if (efi_enabled (EFI_RUNTIME_SERVICES )) orom =isci_get_efi_var (pdev);if (!orom)
include/linux/efi.h +18 -6
@@ -539,18 +539,30 @@ extern int __init efi_setup_pcdp_console(char *);#endif /* -* We play games with efi_enabled so that the compiler will, if possible, remove -* EFI-related code altogether. +* We play games with efi_enabled so that the compiler will, if +* possible, remove EFI-related code altogether. */ +#define EFI_BOOT 0/* Were we booted from EFI? */ +#define EFI_SYSTEM_TABLES 1/* Can we use EFI system tables? */ +#define EFI_CONFIG_TABLES 2/* Can we use EFI config tables? */ +#define EFI_RUNTIME_SERVICES 3/* Can we use runtime services? */ +#define EFI_MEMMAP 4/* Can we use EFI memory map? */ +#define EFI_64BIT 5/* Is the firmware 64-bit? */ +#ifdef CONFIG_EFI # ifdef CONFIG_X86 -extern int efi_enabled; -extern bool efi_64bit; +extern int efi_enabled (int facility);# else -# define efi_enabled 1 +static inline int efi_enabled (int facility) +{ +return 1 ; +}# endif #else -# define efi_enabled 0 +static inline int efi_enabled (int facility) +{ +return 0 ; +}#endif /*
init/main.c +2 -2
@@ -602,7 +602,7 @@ asmlinkage void __init start_kernel(void)pidmap_init ();anon_vma_init ();#ifdef CONFIG_X86 -if (efi_enabled) +if (efi_enabled (EFI_RUNTIME_SERVICES ))efi_enter_virtual_mode ();#endif thread_info_cache_init ();
@@ -630,7 +630,7 @@ asmlinkage void __init start_kernel(void)acpi_early_init ();/* before LAPIC and SMP init */ sfi_init_late (); -if (efi_enabled) +if (efi_enabled (EFI_RUNTIME_SERVICES ))efi_free_boot_services ();ftrace_init ();
kernel/resource.c +38 -12
65 lines not on this page · raw message
net/bluetooth/smp.c +13 -0
@@ -852,6 +852,19 @@ int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb)skb_pull (skb,sizeof (code)); +/* +* The SMP context must be initialized for all other PDUs except +* pairing and security requests. If we get any other PDU when +* not initialized simply disconnect (done if this function +* returns an error). +*/ +if (code !=SMP_CMD_PAIRING_REQ && code !=SMP_CMD_SECURITY_REQ && + !conn->smp_chan) { +BT_ERR ("Unexpected SMP command 0x%02x. Disconnecting." , code); +kfree_skb (skb); +return -ENOTSUPP ; + } +switch (code) {case SMP_CMD_PAIRING_REQ : reason =smp_cmd_pairing_req (conn, skb);
net/bridge/br_netfilter.c +3 -0
@@ -254,6 +254,9 @@ static int br_parse_ip_options(struct sk_buff *skb)struct net_device *dev = skb->dev;u32 len; +if (!pskb_may_pull (skb,sizeof (struct iphdr ))) + goto inhdr_error; + iph =ip_hdr (skb); opt = &(IPCB (skb)->opt);
net/core/pktgen.c +6 -3
@@ -1802,10 +1802,13 @@ static ssize_t pktgen_thread_write(struct file *file,return -EFAULT ; i += len;mutex_lock (&pktgen_thread_lock); -pktgen_add_device (t, f); + ret =pktgen_add_device (t, f);mutex_unlock (&pktgen_thread_lock); - ret = count; -sprintf (pg_result,"OK: add_device=%s" , f); +if (!ret) { + ret = count; +sprintf (pg_result,"OK: add_device=%s" , f); + }else +sprintf (pg_result,"ERROR: can not add device %s" , f); goto out; }
net/ipv4/ip_sockglue.c +1 -1
@@ -589,7 +589,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,case IP_TTL :if (optlen <1 ) goto e_inval; -if (val !=-1 && (val <0 || val >255 )) +if (val !=-1 && (val <1 || val >255 )) goto e_inval; inet->uc_ttl = val;break ;
net/ipv4/tcp_input.c +5 -0
@@ -3639,6 +3639,11 @@ static int tcp_process_frto(struct sock *sk, int flag) } }else {if (!(flag &FLAG_DATA_ACKED ) && (tp->frto_counter ==1 )) { +if (!tcp_packets_in_flight (tp)) { +tcp_enter_frto_loss (sk,2 , flag); +return true; + } +/* Prevent sending of new data. */ tp->snd_cwnd =min (tp->snd_cwnd,tcp_packets_in_flight (tp));
net/ipv6/addrconf.c +1 -1
@@ -1736,7 +1736,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,continue ;if ((rt->rt6i_flags & flags) != flags)continue ; -if ((noflags !=0 ) && ((rt->rt6i_flags & flags) !=0 )) +if ((rt->rt6i_flags & noflags) !=0 )continue ;dst_hold (&rt->dst);break ;
net/ipv6/ip6_output.c +2 -2
@@ -1287,10 +1287,10 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, cork->length =0 ; sk->sk_sndmsg_page =NULL ; sk->sk_sndmsg_off =0 ; - exthdrlen = (opt ? opt->opt_flen :0 ) - rt->rt6i_nfheader_len; + exthdrlen = (opt ? opt->opt_flen :0 ); length += exthdrlen; transhdrlen += exthdrlen; - dst_exthdrlen = rt->dst.header_len; + dst_exthdrlen = rt->dst.header_len - rt->rt6i_nfheader_len; }else { rt = (struct rt6_info *)cork->dst; fl6 = &inet->cork.fl.u.ip6;
net/ipv6/route.c +2 -1
@@ -846,7 +846,8 @@ restart:dst_hold (&rt->dst);read_unlock_bh (&table->tb6_lock); -if (!dst_get_neighbour_noref_raw (&rt->dst) && !(rt->rt6i_flags &RTF_NONEXTHOP )) +if (!dst_get_neighbour_noref_raw (&rt->dst) && + !(rt->rt6i_flags & (RTF_NONEXTHOP |RTF_LOCAL ))) nrt =rt6_alloc_cow (rt, &fl6->daddr, &fl6->saddr);else if (!(rt->dst.flags &DST_HOST )) nrt =rt6_alloc_clone (rt, &fl6->daddr);
net/packet/af_packet.c +6 -4
@@ -2450,13 +2450,15 @@ static int packet_release(struct socket *sock)packet_flush_mclist (sk); -memset (&req_u,0 ,sizeof (req_u)); - -if (po->rx_ring.pg_vec) +if (po->rx_ring.pg_vec) { +memset (&req_u,0 ,sizeof (req_u));packet_set_ring (sk, &req_u,1 ,0 ); + } -if (po->tx_ring.pg_vec) +if (po->tx_ring.pg_vec) { +memset (&req_u,0 ,sizeof (req_u));packet_set_ring (sk, &req_u,1 ,1 ); + }fanout_release (sk);
net/sctp/endpointola.c +5 -0
@@ -248,6 +248,8 @@ void sctp_endpoint_free(struct sctp_endpoint *ep)/* Final destructor for endpoint. */ static void sctp_endpoint_destroy (struct sctp_endpoint *ep) { +int i; +SCTP_ASSERT (ep->base.dead,"Endpoint is not dead" , return);/* Free up the HMAC transform. */
@@ -270,6 +272,9 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep)sctp_inq_free (&ep->base.inqueue);sctp_bind_addr_free (&ep->base.bind_addr); +for (i =0 ; i <SCTP_HOW_MANY_SECRETS ; ++i) +memset (&ep->secret_key[i],0 ,SCTP_SECRET_SIZE ); +/* Remove and free the port */ if (sctp_sk (ep->base.sk)->bind_hash)sctp_put_port (ep->base.sk);
net/sctp/outqueue.c +8 -4
@@ -223,7 +223,7 @@ void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q)/* Free the outqueue structure and any related pending chunks. */ -void sctp_outq_teardown (struct sctp_outq *q) +static void __sctp_outq_teardown (struct sctp_outq *q) {struct sctp_transport *transport;struct list_head *lchunk, *temp;
@@ -276,8 +276,6 @@ void sctp_outq_teardown(struct sctp_outq *q)sctp_chunk_free (chunk); } - q->error =0 ; -/* Throw away any leftover control chunks. */ list_for_each_entry_safe (chunk, tmp, &q->control_chunk_list, list) {list_del_init (&chunk->list);
@@ -285,11 +283,17 @@ void sctp_outq_teardown(struct sctp_outq *q) } } +void sctp_outq_teardown (struct sctp_outq *q) +{ +__sctp_outq_teardown (q); +sctp_outq_init (q->asoc, q); +} +/* Free the outqueue structure and any related pending chunks. */ void sctp_outq_free (struct sctp_outq *q) {/* Throw away leftover chunks. */ -sctp_outq_teardown (q); +__sctp_outq_teardown (q);/* If we were kmalloc()'d, free the memory. */ if (q->malloced)
net/sctp/socket.c +1 -1
@@ -3375,7 +3375,7 @@ static int sctp_setsockopt_auth_key(struct sock *sk, ret =sctp_auth_set_key (sctp_sk (sk)->ep, asoc, authkey); out: -kfree (authkey); +kzfree (authkey);return ret; }