Linux 3.4.29
Greg KH
maintainerI'm announcing the release of the 3.4.29 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
------------
Makefile | 2 - arch/arm/mach-at91/setup.c | 2 + arch/arm/mm/dma-mapping.c | 18 +++++---- arch/arm/vfp/entry.S | 6 +-- arch/arm/vfp/vfphw.S | 4 +- arch/x86/kernel/msr.c | 3 + arch/x86/kernel/setup.c | 2 + arch/x86/platform/efi/efi.c | 2 - arch/x86/platform/efi/efi_64.c | 22 ++++++++--- drivers/edac/edac_pci_sysfs.c | 2 - drivers/gpu/drm/radeon/radeon_cursor.c | 3 + drivers/gpu/drm/radeon/radeon_display.c | 2 - drivers/iommu/amd_iommu_init.c | 34 +++++++++++++++++ drivers/iommu/intel-iommu.c | 21 +++++++--- drivers/net/can/c_can/c_can.c | 4 +- drivers/net/can/pch_can.c | 2 - drivers/net/can/ti_hecc.c | 4 +- drivers/net/wireless/ath/ath9k/beacon.c | 1 drivers/net/wireless/ath/ath9k/htc_hst.c | 2 + drivers/net/wireless/ath/ath9k/recv.c | 10 +++-- drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 7 ++- drivers/net/wireless/iwlegacy/common.c | 35 +++++++----------- drivers/net/wireless/mwifiex/pcie.c | 2 - drivers/target/target_core_fabric_configfs.c | 11 ++--- fs/cifs/cifs_dfs_ref.c | 2 + fs/nfs/namespace.c | 20 ++++++++++ fs/xfs/xfs_aops.c | 2 - kernel/smp.c | 13 ++++++ net/bluetooth/hci_event.c | 2 - net/bluetooth/hidp/core.c | 2 - net/mac80211/cfg.c | 12 +++++- net/mac80211/ieee80211_i.h | 6 +-- net/mac80211/offchannel.c | 17 +++----- net/mac80211/scan.c | 15 ++----- net/mac80211/work.c | 4 +- sound/pci/hda/patch_realtek.c | 1 sound/soc/codecs/wm2200.c | 3 - sound/usb/mixer.c | 17 ++++++-- 38 files changed, 208 insertions(+), 109 deletions(-)
Alan Cox (1):
x86/msr: Add capabilities check
Anderson Lizardo (1):
Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()
Avinash Patil (1):
mwifiex: fix typo in PCIe adapter NULL check
Chris Rattray (1):
ASoC: wm2200: correct mixer values and text
Clemens Ladisch (1):
ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices
Cong Ding (1):
fs/cifs/cifs_dfs_ref.c: fix potential memory leakage
Dan Carpenter (1):
EDAC: Test correct variable in ->store function
Daniel Vetter (1):
iommu/intel: disable DMAR for g4x integrated gfx
Felix Fietkau (2):
ath9k: do not link receive buffers during flush
ath9k: fix double-free bug on beacon generate failure
Greg Kroah-Hartman (1):
Linux 3.4.29
H. Peter Anvin (1):
x86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI
Jan Kara (1):
xfs: Fix possible use-after-free with AIO
Jean-Christophe PLAGNIOL-VILLARD (1):
ARM: at91: rm9200: remake the BGA as default version
Jerome Glisse (1):
drm/radeon: fix cursor corruption on DCE6 and newer
Johannes Berg (1):
mac80211: fix FT roaming
Matt Fleming (1):
x86, efi: Set runtime_version to the EFI spec revision
Nathan Zimmer (1):
efi, x86: Pass a proper identity mapping in efi_call_phys_prelog
Nicholas Bellinger (1):
target: fix regression with dev_link_magic in target_fabric_port_link
Olivier Sobrie (3):
can: c_can: fix invalid error codes
can: ti_hecc: fix invalid error codes
can: pch_can: fix invalid error codes
Piotr Haber (1):
brcmsmac: increase timer reference count for new timers only
Russell King (1):
ARM: DMA: Fix struct page iterator in dma_cache_maint() to work with sparsemem
Stanislaw Gruszka (2):
iwlegacy: fix IBSS cleanup
mac80211: synchronize scan off/on-channel and PS states
Stephen Boyd (1):
ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone
Sujith Manoharan (1):
ath9k_htc: Fix memory leak
Suravee Suthikulpanit (1):
IOMMU, AMD Family15h Model10-1Fh erratum 746 Workaround
Szymon Janc (1):
Bluetooth: Fix sending HCI commands after reset
Takashi Iwai (1):
ALSA: hda - Add a fixup for Packard-Bell desktop with ALC880
Trond Myklebust (1):
NFS: Don't silently fail setattr() requests on mountpoints
Wang YanQing (1):
smp: Fix SMP function call empty cpu mask race
xueminsu (1):
radeon_display: Use pointer return error codes
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 28 +SUBLEVEL = 29 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/mach-at91/setup.c +2 -0
@@ -104,6 +104,8 @@ static void __init soc_detect(u32 dbgu_base)switch (socid) {case ARCH_ID_AT91RM9200 : at91_soc_initdata.type =AT91_SOC_RM9200 ; +if (at91_soc_initdata.subtype ==AT91_SOC_SUBTYPE_NONE ) + at91_soc_initdata.subtype =AT91_SOC_RM9200_BGA ; at91_boot_soc = at91rm9200_soc;break ;
arch/arm/mm/dma-mapping.c +10 -8
@@ -503,25 +503,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, void (*op)(const void *, size_t, int)) { + unsigned long pfn; +size_t left = size; + + pfn =page_to_pfn (page) + offset /PAGE_SIZE ; + offset %=PAGE_SIZE ; +/* * A single sg entry may refer to multiple physically contiguous * pages. But we still need to process highmem pages individually. * If highmem is not configured then the bulk of this loop gets * optimized out. */ -size_t left = size; do { size_t len = left; void *vaddr; + page = pfn_to_page(pfn); + if (PageHighMem(page)) { - if (len + offset > PAGE_SIZE) { - if (offset >= PAGE_SIZE) { - page += offset / PAGE_SIZE; - offset %= PAGE_SIZE; - } + if (len + offset > PAGE_SIZE) len = PAGE_SIZE - offset; - } vaddr = kmap_high_get(page); if (vaddr) { vaddr += offset;
@@ -538,7 +540,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,op (vaddr, len, dir); } offset =0 ; - page++; + pfn++; left -= len; }while (left); }
arch/arm/vfp/entry.S +3 -3
@@ -22,7 +22,7 @@ @ IRQs disabled. @ ENTRY(do_vfp) -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT ldr r4, [r10, #TI_PREEMPT] @ get preempt count add r11, r4, #1 @ increment it str r11, [r10, #TI_PREEMPT]
@@ -35,7 +35,7 @@ ENTRY(do_vfp) ENDPROC(do_vfp) ENTRY(vfp_null_entry) -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it
@@ -53,7 +53,7 @@ ENDPROC(vfp_null_entry) __INIT ENTRY(vfp_testing_entry) -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it
arch/arm/vfp/vfphw.S +2 -2
@@ -167,7 +167,7 @@ vfp_hw_state_valid: @ else it's one 32-bit instruction, so @ always subtract 4 from the following @ instruction address. -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it
@@ -191,7 +191,7 @@ look_for_VFP_exceptions: @ not recognised by VFP DBGSTR "not VFP" -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it
arch/x86/kernel/msr.c +3 -0
@@ -174,6 +174,9 @@ static int msr_open(struct inode *inode, struct file *file)unsigned int cpu;struct cpuinfo_x86 *c; +if (!capable (CAP_SYS_RAWIO )) +return -EPERM ; + cpu =iminor (file->f_path.dentry->d_inode);if (cpu >= nr_cpu_ids || !cpu_online (cpu))return -ENXIO ;/* No such CPU */
arch/x86/kernel/setup.c +2 -0
@@ -622,6 +622,7 @@ static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;static bool __init snb_gfx_workaround_needed (void ) { +#ifdef CONFIG_PCI int i;u16 vendor, devid; static const u16 snb_ids[] = {
@@ -646,6 +647,7 @@ static bool __init snb_gfx_workaround_needed(void)for (i =0 ; i <ARRAY_SIZE (snb_ids); i++)if (devid == snb_ids[i])return true; +#endif return false; }
arch/x86/platform/efi/efi.c +1 -1
@@ -900,7 +900,7 @@ void __init efi_enter_virtual_mode(void)* * Call EFI services through wrapper functions. */ - efi.runtime_version = efi_systab.fw_revision; + efi.runtime_version = efi_systab.hdr.revision; efi.get_time = virt_efi_get_time; efi.set_time = virt_efi_set_time; efi.get_wakeup_time = virt_efi_get_wakeup_time;
arch/x86/platform/efi/efi_64.c +17 -5
@@ -38,7 +38,7 @@#include <asm/cacheflush.h> #include <asm/fixmap.h> -static pgd_t save_pgd__initdata ; +static pgd_t *save_pgd__initdata ;static unsigned long efi_flags__initdata ;static void __init early_code_mapping_set_exec (int executable)
@@ -61,12 +61,20 @@ static void __init early_code_mapping_set_exec(int executable)void __init efi_call_phys_prelog (void ) {unsigned long vaddress; +int pgd; +int n_pgds;early_code_mapping_set_exec (1 );local_irq_save (efi_flags); - vaddress = (unsigned long )__va (0x0UL ); - save_pgd = *pgd_offset_k (0x0UL ); -set_pgd (pgd_offset_k (0x0UL ), *pgd_offset_k (vaddress)); + + n_pgds =DIV_ROUND_UP ((max_pfn <<PAGE_SHIFT ),PGDIR_SIZE ); + save_pgd =kmalloc (n_pgds *sizeof (pgd_t),GFP_KERNEL ); + +for (pgd =0 ; pgd < n_pgds; pgd++) { + save_pgd[pgd] = *pgd_offset_k (pgd *PGDIR_SIZE ); + vaddress = (unsigned long )__va (pgd *PGDIR_SIZE ); +set_pgd (pgd_offset_k (pgd *PGDIR_SIZE ), *pgd_offset_k (vaddress)); + }__flush_tlb_all (); }
@@ -75,7 +83,11 @@ void __init efi_call_phys_epilog(void)/* * After the lock is released, the original page table is restored. */ -set_pgd (pgd_offset_k (0x0UL ), save_pgd); +int pgd; +int n_pgds =DIV_ROUND_UP ((max_pfn <<PAGE_SHIFT ) ,PGDIR_SIZE ); +for (pgd =0 ; pgd < n_pgds; pgd++) +set_pgd (pgd_offset_k (pgd *PGDIR_SIZE ), save_pgd[pgd]); +kfree (save_pgd);__flush_tlb_all ();local_irq_restore (efi_flags);early_code_mapping_set_exec (0 );
drivers/edac/edac_pci_sysfs.c +1 -1
@@ -257,7 +257,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,struct edac_pci_dev_attribute *edac_pci_dev; edac_pci_dev = (struct edac_pci_dev_attribute *)attr; -if (edac_pci_dev->show) +if (edac_pci_dev->store)return edac_pci_dev->store (edac_pci_dev->value, buffer, count);return -EIO ; }
drivers/gpu/drm/radeon/radeon_cursor.c +2 -1
@@ -238,7 +238,8 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, y =0 ; } -if (ASIC_IS_AVIVO (rdev)) { +/* fixed on DCE6 and newer */ +if (ASIC_IS_AVIVO (rdev) && !ASIC_IS_DCE6 (rdev)) {int i =0 ;struct drm_crtc *crtc_p;
drivers/gpu/drm/radeon/radeon_display.c +1 -1
@@ -1136,7 +1136,7 @@ radeon_user_framebuffer_create(struct drm_device *dev,if (ret) {kfree (radeon_fb);drm_gem_object_unreference_unlocked (obj); -return NULL ; +return ERR_PTR (ret); }return &radeon_fb->base;
drivers/iommu/amd_iommu_init.c +34 -0
@@ -1002,6 +1002,38 @@ static void __init free_iommu_all(void) }/* +* Family15h Model 10h-1fh erratum 746 (IOMMU Logging May Stall Translations) +* Workaround: +* BIOS should disable L2B micellaneous clock gating by setting +* L2_L2B_CK_GATE_CONTROL[CKGateL2BMiscDisable](D0F2xF4_x90[2]) = 1b +*/ +static void __init amd_iommu_erratum_746_workaround (struct amd_iommu *iommu) +{ +u32 value; + +if ((boot_cpu_data.x86 !=0x15 ) || + (boot_cpu_data.x86_model <0x10 ) || + (boot_cpu_data.x86_model >0x1f )) +return ; + +pci_write_config_dword (iommu->dev,0xf0 ,0x90 ); +pci_read_config_dword (iommu->dev,0xf4 , &value); + +if (value &BIT (2 )) +return ; + +/* Select NB indirect register 0x90 and enable writing */ +pci_write_config_dword (iommu->dev,0xf0 ,0x90 | (1 <<8 )); + +pci_write_config_dword (iommu->dev,0xf4 , value |0x4 ); +pr_info ("AMD-Vi: Applying erratum 746 workaround for IOMMU at %s\n" , +dev_name (&iommu->dev->dev)); + +/* Clear the enable writing bit */ +pci_write_config_dword (iommu->dev,0xf0 ,0x90 ); +} + +/* * This function clues the initialization function for one IOMMU * together and also allocates the command buffer and programs the * hardware. It does NOT enable the IOMMU. This is done afterwards.
@@ -1062,6 +1094,8 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h)if (iommu->cap & (1UL <<IOMMU_CAP_NPCACHE )) amd_iommu_np_cache = true; +amd_iommu_erratum_746_workaround (iommu); +return pci_enable_device (iommu->dev); }
drivers/iommu/intel-iommu.c +15 -6
@@ -4193,6 +4193,21 @@ static struct iommu_ops intel_iommu_ops = { .pgsize_bitmap = INTEL_IOMMU_PGSIZES, }; +static void __devinit quirk_iommu_g4x_gfx (struct pci_dev *dev) +{ +/* G4x/GM45 integrated gfx dmar support is totally busted. */ +printk (KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n" ); + dmar_map_gfx =0 ; +} + +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2a40 , quirk_iommu_g4x_gfx); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2e00 , quirk_iommu_g4x_gfx); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2e10 , quirk_iommu_g4x_gfx); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2e20 , quirk_iommu_g4x_gfx); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2e30 , quirk_iommu_g4x_gfx); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2e40 , quirk_iommu_g4x_gfx); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2e90 , quirk_iommu_g4x_gfx); +static void __devinit quirk_iommu_rwbf (struct pci_dev *dev) {/*
@@ -4201,12 +4216,6 @@ static void __devinit quirk_iommu_rwbf(struct pci_dev *dev)*/ printk (KERN_INFO "DMAR: Forcing write-buffer flush capability\n" ); rwbf_quirk =1 ; - -/* https://bugzilla.redhat.com/show_bug.cgi?id=538163 */ -if (dev->revision ==0x07 ) { -printk (KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n" ); - dmar_map_gfx =0 ; - } }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2a40 , quirk_iommu_rwbf);
drivers/net/can/c_can/c_can.c +2 -2
@@ -914,7 +914,7 @@ static int c_can_handle_bus_err(struct net_device *dev,break ;case LEC_ACK_ERROR :netdev_dbg (dev,"ack error\n" ); - cf->data[2 ] |= (CAN_ERR_PROT_LOC_ACK | + cf->data[3 ] |= (CAN_ERR_PROT_LOC_ACK |CAN_ERR_PROT_LOC_ACK_DEL );break ;case LEC_BIT1_ERROR :
@@ -927,7 +927,7 @@ static int c_can_handle_bus_err(struct net_device *dev,break ;case LEC_CRC_ERROR :netdev_dbg (dev,"CRC error\n" ); - cf->data[2 ] |= (CAN_ERR_PROT_LOC_CRC_SEQ | + cf->data[3 ] |= (CAN_ERR_PROT_LOC_CRC_SEQ |CAN_ERR_PROT_LOC_CRC_DEL );break ;default :
drivers/net/can/pch_can.c +1 -1
@@ -560,7 +560,7 @@ static void pch_can_error(struct net_device *ndev, u32 status) stats->rx_errors++;break ;case PCH_CRC_ERR : - cf->data[2 ] |=CAN_ERR_PROT_LOC_CRC_SEQ | + cf->data[3 ] |=CAN_ERR_PROT_LOC_CRC_SEQ |CAN_ERR_PROT_LOC_CRC_DEL ; priv->can.can_stats.bus_error++; stats->rx_errors++;
drivers/net/can/ti_hecc.c +2 -2
@@ -746,12 +746,12 @@ static int ti_hecc_error(struct net_device *ndev, int int_status, }if (err_status &HECC_CANES_CRCE ) {hecc_set_bit (priv,HECC_CANES ,HECC_CANES_CRCE ); - cf->data[2 ] |=CAN_ERR_PROT_LOC_CRC_SEQ | + cf->data[3 ] |=CAN_ERR_PROT_LOC_CRC_SEQ |CAN_ERR_PROT_LOC_CRC_DEL ; }if (err_status &HECC_CANES_ACKE ) {hecc_set_bit (priv,HECC_CANES ,HECC_CANES_ACKE ); - cf->data[2 ] |=CAN_ERR_PROT_LOC_ACK | + cf->data[3 ] |=CAN_ERR_PROT_LOC_ACK |CAN_ERR_PROT_LOC_ACK_DEL ; } }
drivers/net/wireless/ath/ath9k/beacon.c +1 -0
@@ -154,6 +154,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, skb->len, DMA_TO_DEVICE);dev_kfree_skb_any (skb); bf->bf_buf_addr =0 ; + bf->bf_mpdu =NULL ; }/* Get a new beacon from mac80211 */
drivers/net/wireless/ath/ath9k/htc_hst.c +2 -0
@@ -342,6 +342,8 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle, endpoint->ep_callbacks.tx (endpoint->ep_callbacks.priv, skb, htc_hdr->endpoint_id, txok); + }else { +kfree_skb (skb); } }
drivers/net/wireless/ath/ath9k/recv.c +6 -4
@@ -778,6 +778,7 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc,return NULL ; } +list_del (&bf->list);if (!bf->bf_mpdu)return bf;
@@ -1966,14 +1967,15 @@ requeue_drop_frag: sc->rx.frag =NULL ; } requeue: +list_add_tail (&bf->list, &sc->rx.rxbuf); +if (flush) +continue ; +if (edma) { -list_add_tail (&bf->list, &sc->rx.rxbuf);ath_rx_edma_buf_link (sc, qtype); }else { -list_move_tail (&bf->list, &sc->rx.rxbuf);ath_rx_buf_link (sc, bf); -if (!flush) -ath9k_hw_rxena (ah); +ath9k_hw_rxena (ah); } }while (1 );
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +4 -3
@@ -1400,9 +1400,10 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic)#endif t->ms = ms; t->periodic = (bool ) periodic; - t->set = true; - -atomic_inc (&t->wl->callbacks); +if (!t->set) { + t->set = true; +atomic_inc (&t->wl->callbacks); + }ieee80211_queue_delayed_work (hw, &t->dly_wrk,msecs_to_jiffies (ms)); }
drivers/net/wireless/iwlegacy/common.c +14 -21
@@ -3957,17 +3957,21 @@ il_connection_init_rx_config(struct il_priv *il)memset (&il->staging,0 ,sizeof (il->staging)); -if (!il->vif) { +switch (il->iw_mode) { +case NL80211_IFTYPE_UNSPECIFIED : il->staging.dev_type =RXON_DEV_TYPE_ESS ; - }else if (il->vif->type ==NL80211_IFTYPE_STATION ) { +break ; +case NL80211_IFTYPE_STATION : il->staging.dev_type =RXON_DEV_TYPE_ESS ; il->staging.filter_flags =RXON_FILTER_ACCEPT_GRP_MSK ; - }else if (il->vif->type ==NL80211_IFTYPE_ADHOC ) { +break ; +case NL80211_IFTYPE_ADHOC : il->staging.dev_type =RXON_DEV_TYPE_IBSS ; il->staging.flags =RXON_FLG_SHORT_PREAMBLE_MSK ; il->staging.filter_flags =RXON_FILTER_BCON_AWARE_MSK |RXON_FILTER_ACCEPT_GRP_MSK ; - }else { +break ; +default :IL_ERR ("Unsupported interface type %d\n" , il->vif->type);return ; }
@@ -4550,8 +4554,7 @@ out:EXPORT_SYMBOL (il_mac_add_interface);static void -il_teardown_interface (struct il_priv *il,struct ieee80211_vif *vif, -bool mode_change) +il_teardown_interface (struct il_priv *il,struct ieee80211_vif *vif) {lockdep_assert_held (&il->mutex);
@@ -4560,9 +4563,7 @@ il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif,il_force_scan_end (il); } -if (!mode_change) -il_set_mode (il); - +il_set_mode (il); }void
@@ -4575,8 +4576,8 @@ il_mac_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)WARN_ON (il->vif != vif); il->vif =NULL ; - -il_teardown_interface (il, vif, false); + il->iw_mode =NL80211_IFTYPE_UNSPECIFIED ; +il_teardown_interface (il, vif);memset (il->bssid,0 ,ETH_ALEN );D_MAC80211 ("leave\n" );
@@ -4685,18 +4686,10 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, }/* success */ -il_teardown_interface (il, vif, true); vif->type = newtype; vif->p2p = false; - err =il_set_mode (il); -WARN_ON (err); -/* -* We've switched internally, but submitting to the -* device may have failed for some reason. Mask this -* error, because otherwise mac80211 will not switch -* (and set the interface type back) and we'll be -* out of sync with it. -*/ + il->iw_mode = newtype; +il_teardown_interface (il, vif); err =0 ; out:
drivers/net/wireless/mwifiex/pcie.c +1 -1
@@ -158,7 +158,7 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state)if (pdev) { card = (struct pcie_service_card *)pci_get_drvdata (pdev); -if (!card || card->adapter) { +if (!card || !card->adapter) {pr_err ("Card or adapter structure is not valid\n" );return 0 ; }
drivers/target/target_core_fabric_configfs.c +5 -6
@@ -752,12 +752,6 @@ static int target_fabric_port_link(struct target_fabric_configfs *tf;int ret; -if (dev->dev_link_magic !=SE_DEV_LINK_MAGIC ) { -pr_err ("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:" -" %p to struct se_device: %p\n" , se_dev_ci, dev); -return -EFAULT ; - } - tpg_ci = &lun_ci->ci_parent->ci_group->cg_item; se_tpg =container_of (to_config_group (tpg_ci), struct se_portal_group, tpg_group);
@@ -775,6 +769,11 @@ static int target_fabric_port_link( ret = -ENODEV ; goto out; } +if (dev->dev_link_magic !=SE_DEV_LINK_MAGIC ) { +pr_err ("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:" +" %p to struct se_device: %p\n" , se_dev_ci, dev); +return -EFAULT ; + } lun_p =core_dev_add_lun (se_tpg, dev->se_hba, dev, lun->unpacked_lun);
fs/cifs/cifs_dfs_ref.c +2 -0
@@ -226,6 +226,8 @@ compose_mount_options_out: compose_mount_options_err:kfree (mountdata); mountdata =ERR_PTR (rc); +kfree (*devname); + *devname =NULL ; goto compose_mount_options_out; }
fs/nfs/namespace.c +20 -0
@@ -253,11 +253,31 @@ out_nofree:return mnt; } +static int +nfs_namespace_getattr (struct vfsmount *mnt,struct dentry *dentry,struct kstat *stat) +{ +if (NFS_FH (dentry->d_inode)->size !=0 ) +return nfs_getattr (mnt, dentry, stat); +generic_fillattr (dentry->d_inode, stat); +return 0 ; +} + +static int +nfs_namespace_setattr (struct dentry *dentry,struct iattr *attr) +{ +if (NFS_FH (dentry->d_inode)->size !=0 ) +return nfs_setattr (dentry, attr); +return -EACCES ; +} +const struct inode_operations nfs_mountpoint_inode_operations = { .getattr = nfs_getattr, + .setattr = nfs_setattr, };const struct inode_operations nfs_referral_inode_operations = { + .getattr = nfs_namespace_getattr, + .setattr = nfs_namespace_setattr, };static void nfs_expire_automounts (struct work_struct *work)
fs/xfs/xfs_aops.c +1 -1
@@ -89,11 +89,11 @@ xfs_destroy_ioend( }if (ioend->io_iocb) { +inode_dio_done (ioend->io_inode);if (ioend->io_isasync) {aio_complete (ioend->io_iocb, ioend->io_error ? ioend->io_error : ioend->io_result,0 ); } -inode_dio_done (ioend->io_inode); }mempool_free (ioend, xfs_ioend_pool);
kernel/smp.c +12 -1
@@ -31,6 +31,7 @@ struct call_function_data {struct call_single_data csd;atomic_t refs;cpumask_var_t cpumask; +cpumask_var_t cpumask_ipi; }; static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_function_data, cfd_data);
@@ -54,6 +55,9 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)if (!zalloc_cpumask_var_node (&cfd->cpumask,GFP_KERNEL ,cpu_to_node (cpu)))return notifier_from_errno (-ENOMEM ); +if (!zalloc_cpumask_var_node (&cfd->cpumask_ipi,GFP_KERNEL , +cpu_to_node (cpu))) +return notifier_from_errno (-ENOMEM );break ;#ifdef CONFIG_HOTPLUG_CPU
@@ -63,6 +67,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)case CPU_DEAD :case CPU_DEAD_FROZEN :free_cpumask_var (cfd->cpumask); +free_cpumask_var (cfd->cpumask_ipi);break ;#endif };
@@ -524,6 +529,12 @@ void smp_call_function_many(const struct cpumask *mask,return ; } +/* +* After we put an entry into the list, data->cpumask +* may be cleared again when another CPU sends another IPI for +* a SMP function call, so data->cpumask will be zero. +*/ +cpumask_copy (data->cpumask_ipi, data->cpumask);raw_spin_lock_irqsave (&call_function.lock, flags);/* * Place entry at the _HEAD_ of the list, so that any cpu still
@@ -547,7 +558,7 @@ void smp_call_function_many(const struct cpumask *mask,smp_mb ();/* Send a message to all CPUs in the map */ -arch_send_call_function_ipi_mask (data->cpumask); +arch_send_call_function_ipi_mask (data->cpumask_ipi);/* Optionally wait for the CPUs to complete */ if (wait)
net/bluetooth/hci_event.c +1 -1
@@ -2366,7 +2366,7 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skif (ev->opcode !=HCI_OP_NOP )del_timer (&hdev->cmd_timer); -if (ev->ncmd) { +if (ev->ncmd && !test_bit (HCI_RESET , &hdev->flags)) {atomic_set (&hdev->cmd_cnt,1 );if (!skb_queue_empty (&hdev->cmd_q))queue_work (hdev->workqueue, &hdev->cmd_work);
net/bluetooth/hidp/core.c +1 -1
@@ -949,7 +949,7 @@ static int hidp_setup_hid(struct hidp_session *session, hid->version = req->version; hid->country = req->country; -strncpy (hid->name, req->name,128 ); +strncpy (hid->name, req->name,sizeof (req->name) -1 );strncpy (hid->phys,batostr (&bt_sk (session->ctrl_sock->sk)->src),64 );strncpy (hid->uniq,batostr (&bt_sk (session->ctrl_sock->sk)->dst),64 );
net/mac80211/cfg.c +11 -1
@@ -151,7 +151,17 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, sta =sta_info_get (sdata, mac_addr); else sta =sta_info_get_bss (sdata, mac_addr); -if (!sta) { +/* +* The ASSOC test makes sure the driver is ready to +* receive the key. When wpa_supplicant has roamed +* using FT, it attempts to set the key before +* association has completed, this rejects that attempt +* so it will set the key again after assocation. +* +* TODO: accept the key if we have a station entry and +* add it to the device after the station. +*/ +if (!sta || !test_sta_flag (sta,WLAN_STA_ASSOC )) {ieee80211_key_free (sdata->local, key); err = -ENOENT ; goto out_unlock;
net/mac80211/ieee80211_i.h +2 -4
@@ -1264,10 +1264,8 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);void ieee80211_sched_scan_stopped_work (struct work_struct *work);/* off-channel helpers */ -void ieee80211_offchannel_stop_vifs (struct ieee80211_local *local, -bool offchannel_ps_enable); -void ieee80211_offchannel_return (struct ieee80211_local *local, -bool offchannel_ps_disable); +void ieee80211_offchannel_stop_vifs (struct ieee80211_local *local); +void ieee80211_offchannel_return (struct ieee80211_local *local);void ieee80211_hw_roc_setup (struct ieee80211_local *local);/* interface handling */
net/mac80211/offchannel.c +6 -11
@@ -103,8 +103,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)ieee80211_sta_reset_conn_monitor (sdata); } -void ieee80211_offchannel_stop_vifs (struct ieee80211_local *local, -bool offchannel_ps_enable) +void ieee80211_offchannel_stop_vifs (struct ieee80211_local *local) {struct ieee80211_sub_if_data *sdata;
@@ -129,8 +128,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,if (sdata->vif.type !=NL80211_IFTYPE_MONITOR ) {netif_tx_stop_all_queues (sdata->dev); -if (offchannel_ps_enable && - (sdata->vif.type ==NL80211_IFTYPE_STATION ) && +if (sdata->vif.type ==NL80211_IFTYPE_STATION && sdata->u.mgd.associated)ieee80211_offchannel_ps_enable (sdata, true); }
@@ -138,8 +136,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,mutex_unlock (&local->iflist_mtx); } -void ieee80211_offchannel_return (struct ieee80211_local *local, -bool offchannel_ps_disable) +void ieee80211_offchannel_return (struct ieee80211_local *local) {struct ieee80211_sub_if_data *sdata;
@@ -152,11 +149,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,continue ;/* Tell AP we're back */ -if (offchannel_ps_disable && - sdata->vif.type ==NL80211_IFTYPE_STATION ) { -if (sdata->u.mgd.associated) -ieee80211_offchannel_ps_disable (sdata); - } +if (sdata->vif.type ==NL80211_IFTYPE_STATION && + sdata->u.mgd.associated) +ieee80211_offchannel_ps_disable (sdata);if (sdata->vif.type !=NL80211_IFTYPE_MONITOR ) {/*
net/mac80211/scan.c +5 -10
@@ -329,7 +329,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,if (!was_hw_scan) {ieee80211_configure_filter (local);drv_sw_scan_complete (local); -ieee80211_offchannel_return (local, true); +ieee80211_offchannel_return (local); }ieee80211_recalc_idle (local);
@@ -374,7 +374,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) local->next_scan_state =SCAN_DECISION ; local->scan_channel_idx =0 ; -ieee80211_offchannel_stop_vifs (local, true); +ieee80211_offchannel_stop_vifs (local);ieee80211_configure_filter (local);
@@ -629,12 +629,8 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local, local->scan_channel =NULL ;ieee80211_hw_config (local,IEEE80211_CONF_CHANGE_CHANNEL ); -/* -* Re-enable vifs and beaconing. Leave PS -* in off-channel state..will put that back -* on-channel at the end of scanning. -*/ -ieee80211_offchannel_return (local, false); +/* disable PS */ +ieee80211_offchannel_return (local); *next_delay =HZ /5 ;/* afterwards, resume scan & go to next channel */
@@ -644,8 +640,7 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local,static void ieee80211_scan_state_resume (struct ieee80211_local *local,unsigned long *next_delay) { -/* PS already is in off-channel mode */ -ieee80211_offchannel_stop_vifs (local, false); +ieee80211_offchannel_stop_vifs (local);if (local->ops->flush) {drv_flush (local, false);
net/mac80211/work.c +2 -2
@@ -148,7 +148,7 @@ static void ieee80211_work_work(struct work_struct *work) }if (!started && !local->tmp_channel) { -ieee80211_offchannel_stop_vifs (local, true); +ieee80211_offchannel_stop_vifs (local); local->tmp_channel = wk->chan; local->tmp_channel_type = wk->chan_type;
@@ -220,7 +220,7 @@ static void ieee80211_work_work(struct work_struct *work) local->tmp_channel =NULL ;ieee80211_hw_config (local,0 ); -ieee80211_offchannel_return (local, true); +ieee80211_offchannel_return (local);/* give connection some time to breathe */ run_again (local, jiffies +HZ /2 );
sound/pci/hda/patch_realtek.c +1 -0
@@ -4741,6 +4741,7 @@ static const struct snd_pci_quirk alc880_fixup_tbl[] = {SND_PCI_QUIRK (0x1584 ,0x9077 ,"Uniwill P53" ,ALC880_FIXUP_VOL_KNOB ),SND_PCI_QUIRK (0x161f ,0x203d ,"W810" ,ALC880_FIXUP_W810 ),SND_PCI_QUIRK (0x161f ,0x205d ,"Medion Rim 2150" ,ALC880_FIXUP_MEDION_RIM ), +SND_PCI_QUIRK (0x1631 ,0xe011 ,"PB 13201056" ,ALC880_FIXUP_6ST ),SND_PCI_QUIRK (0x1734 ,0x107c ,"FSC F1734" ,ALC880_FIXUP_F1734 ),SND_PCI_QUIRK (0x1734 ,0x1094 ,"FSC Amilo M1451G" ,ALC880_FIXUP_FUJITSU ), SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734),
sound/soc/codecs/wm2200.c +0 -3
@@ -897,8 +897,6 @@ static const char *wm2200_mixer_texts[] = {"EQR" ,"LHPF1" ,"LHPF2" , -"LHPF3" , -"LHPF4" ,"DSP1.1" ,"DSP1.2" , "DSP1.3",
@@ -931,7 +929,6 @@ static int wm2200_mixer_values[] = {0x25 ,0x50 ,/* EQ */ 0x51 , -0x52 ,0x60 ,/* LHPF1 */ 0x61 ,/* LHPF2 */ 0x68, /* DSP1 */
sound/usb/mixer.c +12 -5
@@ -1239,16 +1239,23 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void } channels = (hdr->bLength -7 ) / csize -1 ; bmaControls = hdr->bmaControls; +if (hdr->bLength <7 + csize) { +snd_printk (KERN_ERR "usbaudio: unit %u: " +"invalid UAC_FEATURE_UNIT descriptor\n" , + unitid); +return -EINVAL ; + } }else {struct uac2_feature_unit_descriptor *ftr = _ftr; csize =4 ; channels = (hdr->bLength -6 ) /4 -1 ; bmaControls = ftr->bmaControls; - } - -if (hdr->bLength <7 || !csize || hdr->bLength <7 + csize) { -snd_printk (KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n" , unitid); -return -EINVAL ; +if (hdr->bLength <6 + csize) { +snd_printk (KERN_ERR "usbaudio: unit %u: " +"invalid UAC_FEATURE_UNIT descriptor\n" , + unitid); +return -EINVAL ; + } }/* parse the source unit */