Linux 3.0.31
Greg KH
maintainerI'm announcing the release of the 3.0.31 kernel.
All users of the 3.0 kernel series must upgrade.
---NOTE---
Note, No one actually tested the 3.0.31-rc1 patch I released, as it was broken (I generated it incorrectly), so if there are any bugs in this release, well...
I know the "this patch is in this release" emails are good for the review process, but does anyone even care about the -rc patches anymore? Are they just a waste of disk space and energy on my side in creating them?
----------
The updated 3.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.0.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/include/asm/tls.h | 4 arch/x86/kernel/apic/apic.c | 34 ++- arch/x86/xen/smp.c | 15 + arch/x86/xen/xen-asm.S | 2 drivers/ata/libata-eh.c | 3 drivers/dma/at_hdmac.c | 4 drivers/firmware/efivars.c | 222 ++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 drivers/gpu/drm/i915/intel_sdvo.c | 34 ++- drivers/hwmon/coretemp.c | 6 drivers/hwmon/fam15h_power.c | 42 ++++ drivers/i2c/busses/i2c-pnx.c | 3 drivers/mmc/host/sdhci-esdhc-imx.c | 3 drivers/net/wireless/ipw2x00/ipw2200.c | 13 + drivers/net/wireless/rtlwifi/pci.c | 1 drivers/net/wireless/wl1251/main.c | 1 drivers/net/wireless/wl1251/sdio.c | 2 drivers/scsi/libsas/sas_expander.c | 26 ++- drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | 3 drivers/staging/brcm80211/brcmsmac/wlc_bmac.h | 1 drivers/staging/brcm80211/brcmsmac/wlc_main.c | 8 drivers/usb/class/cdc-wdm.c | 7 drivers/usb/core/hcd-pci.c | 9 + drivers/usb/gadget/f_mass_storage.c | 2 drivers/usb/gadget/file_storage.c | 2 drivers/usb/gadget/uvc.h | 2 drivers/usb/gadget/uvc_v4l2.c | 2 drivers/usb/host/ehci-hcd.c | 2 drivers/usb/host/ehci-pci.c | 8 drivers/usb/host/fsl-mph-dr-of.c | 1 fs/autofs4/autofs_i.h | 12 + fs/autofs4/dev-ioctl.c | 3 fs/autofs4/inode.c | 4 fs/autofs4/waitq.c | 20 -- fs/hfsplus/catalog.c | 4 fs/hfsplus/dir.c | 11 + fs/nfs/nfs4proc.c | 23 ++ fs/nfs/super.c | 8 fs/nfsd/nfs4proc.c | 7 fs/nfsd/nfs4state.c | 23 +- fs/pipe.c | 31 +++ include/linux/efi.h | 13 + include/linux/kvm_host.h | 6 include/linux/pipe_fs_i.h | 1 include/linux/usb/hcd.h | 2 kernel/sched.c | 53 +++--- net/mac80211/tx.c | 3 net/wireless/nl80211.c | 29 +-- scripts/mod/file2alias.c | 4 sound/soc/soc-dapm.c | 2 virt/kvm/iommu.c | 12 - virt/kvm/kvm_main.c | 5 53 files changed, 584 insertions(+), 164 deletions(-)
Al Viro (2):
nfsd: fix b0rken error value for setattr on read-only mount
nfsd: fix error values returned by nfsd4_lockt() when nfsd_open() fails
Alan Stern (3):
EHCI: fix criterion for resuming the root hub
USB: EHCI: fix crash during suspend on ASUS computers
USB: gadget: storage gadgets send wrong error code for unknown commands
Alex Williamson (1):
KVM: unmap pages from the iommu when slots are removed
Andre Przywara (1):
hwmon: fam15h_power: fix bogus values with current BIOSes
Arend van Spriel (1):
brcm80211: smac: resume transmit fifo upon receiving frames
Bryan O'Donoghue (1):
x86, apic: APIC code touches invalid MSR on P5 class machines
Dan Williams (1):
SCSI: libsas: fix false positive 'device attached' conditions
Daniel Vetter (1):
drm/i915: handle input/output sdvo timings separately in mode_set
David Miller (1):
Fix modpost failures in fedora 17
David Vrabel (1):
xen: correctly check for pending events when restoring irq flags
Eric Bénard (1):
mmc: unbreak sdhci-esdhc-imx on i.MX25
Felix Fietkau (1):
mac80211: fix AP mode EAP tx for VLAN stations
Grazvydas Ignotas (2):
wl1251: fix crash on remove due to premature kfree
wl1251: fix crash on remove due to leftover work item
Greg Kroah-Hartman (3):
Revert "usb: Fix build error due to dma_mask is not at pdev_archdata at ARM"
hfsplus: Fix potential buffer overflows
Linux 3.0.31
Guenter Roeck (2):
hwmon: (fam15h_power) Fix pci_device_id array
hwmon: (coretemp) Increase CPU core limit
Jan Kara (1):
nfs: Enclose hostname in brackets when needed in nfs_do_root_mount
Johannes Berg (1):
nl80211: ensure interface is up in various APIs
Kirill A. Shutemov (1):
hwmon: (coretemp) fix oops on cpu unplug
Konrad Rzeszutek Wilk (1):
xen/smp: Fix crash when booting with ACPI hotplug CPUs.
Larry Finger (1):
rtlwifi: Fix oops on unload
Laurent Pinchart (1):
usb gadget: uvc: uvc_request_data::length field must be signed
Lin Ming (1):
libata: skip old error history when counting probe trials
Linus Torvalds (3):
Revert "autofs: work around unhappy compat problem on x86-64"
pipes: add a "packetized pipe" mode for writing
autofs: make the autofsv5 packet file descriptor use a packetized pipe
Mark Brown (1):
ASoC: dapm: Ensure power gets managed for line widgets
Matthew Garrett (3):
efi: Add new variable attributes
efi: Validate UEFI boot variables
efivars: Improve variable validation
Mike Waychison (1):
efivars: String functions
Nicolas Ferre (1):
dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
Oliver Neukum (1):
USB: cdc-wdm: fix race leading leading to memory corruption
Peter Zijlstra (1):
sched: Fix nohz load accounting -- again!
Roland Stigge (1):
i2c: pnx: Disable clk in suspend
Stanislav Yakovlev (1):
ipw2200: Fix race condition in the command completion acknowledge
Thomas Jackson (1):
SCSI: libsas: fix sas_find_bcast_phy() in the presence of 'vacant' phys
Tony Luck (1):
efivars: fix warnings when CONFIG_PSTORE=n
Trond Myklebust (2):
NFSv4: Ensure that the LOCK code sets exception->inode
NFSv4: Ensure that we check lock exclusive/shared type against open modes
Will Deacon (1):
ARM: 7403/1: tls: remove covert channel via TPIDRURW
Xi Wang (2):
drm/i915: fix integer overflow in i915_gem_execbuffer2() drm/i915: fix integer overflow in i915_gem_do_execbuffer()
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 30 +SUBLEVEL = 31 EXTRAVERSION = NAME = Sneaky Weasel
arch/arm/include/asm/tls.h +4 -0
@@ -7,6 +7,8 @@ .macro set_tls_v6k, tp, tmp1, tmp2 mcr p15, 0, \tp, c13, c0, 3 @ set TLS register + mov \tmp1, #0 + mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register .endm .macro set_tls_v6, tp, tmp1, tmp2
@@ -15,6 +17,8 @@ mov \tmp2, #0xffff0fff tst \tmp1, #HWCAP_TLS @ hardware TLS available? mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register + movne \tmp1, #0 + mcrne p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 .endm
arch/x86/kernel/apic/apic.c +20 -14
@@ -1558,9 +1558,11 @@ static int __init apic_verify(void) mp_lapic_addr =APIC_DEFAULT_PHYS_BASE ;/* The BIOS may have set up the APIC at some other address */ -rdmsr (MSR_IA32_APICBASE , l, h); -if (l &MSR_IA32_APICBASE_ENABLE ) - mp_lapic_addr = l &MSR_IA32_APICBASE_BASE ; +if (boot_cpu_data.x86 >=6 ) { +rdmsr (MSR_IA32_APICBASE , l, h); +if (l &MSR_IA32_APICBASE_ENABLE ) + mp_lapic_addr = l &MSR_IA32_APICBASE_BASE ; + }pr_info ("Found and enabled local APIC!\n" );return 0 ;
@@ -1578,13 +1580,15 @@ int __init apic_force_enable(unsigned long addr)* MSR. This can only be done in software for Intel P6 or later * and AMD K7 (Model > 1) or later. */ -rdmsr (MSR_IA32_APICBASE , l, h); -if (!(l &MSR_IA32_APICBASE_ENABLE )) { -pr_info ("Local APIC disabled by BIOS -- reenabling.\n" ); - l &= ~MSR_IA32_APICBASE_BASE ; - l |=MSR_IA32_APICBASE_ENABLE | addr; -wrmsr (MSR_IA32_APICBASE , l, h); - enabled_via_apicbase =1 ; +if (boot_cpu_data.x86 >=6 ) { +rdmsr (MSR_IA32_APICBASE , l, h); +if (!(l &MSR_IA32_APICBASE_ENABLE )) { +pr_info ("Local APIC disabled by BIOS -- reenabling.\n" ); + l &= ~MSR_IA32_APICBASE_BASE ; + l |=MSR_IA32_APICBASE_ENABLE | addr; +wrmsr (MSR_IA32_APICBASE , l, h); + enabled_via_apicbase =1 ; + } }return apic_verify (); }
@@ -2112,10 +2116,12 @@ static void lapic_resume(void)* FIXME! This will be wrong if we ever support suspend on * SMP! We'll need to do this as part of the CPU restore! */ -rdmsr (MSR_IA32_APICBASE , l, h); - l &= ~MSR_IA32_APICBASE_BASE ; - l |=MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; -wrmsr (MSR_IA32_APICBASE , l, h); +if (boot_cpu_data.x86 >=6 ) { +rdmsr (MSR_IA32_APICBASE , l, h); + l &= ~MSR_IA32_APICBASE_BASE ; + l |=MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; +wrmsr (MSR_IA32_APICBASE , l, h); + } } maxlvt =lapic_get_maxlvt ();
arch/x86/xen/smp.c +15 -0
@@ -172,6 +172,7 @@ static void __init xen_fill_possible_map(void)static void __init xen_filter_cpu_maps (void ) {int i, rc; +unsigned int subtract =0 ;if (!xen_initial_domain ())return ;
@@ -186,8 +187,22 @@ static void __init xen_filter_cpu_maps(void) }else {set_cpu_possible (i, false);set_cpu_present (i, false); + subtract++; } } +#ifdef CONFIG_HOTPLUG_CPU +/* This is akin to using 'nr_cpus' on the Linux command line. +* Which is OK as when we use 'dom0_max_vcpus=X' we can only +* have up to X, while nr_cpu_ids is greater than X. This +* normally is not a problem, except when CPU hotplugging +* is involved and then there might be more than X CPUs +* in the guest - which will not work as there is no +* hypercall to expand the max number of VCPUs an already +* running guest has. So cap it up to X. */ +if (subtract) + nr_cpu_ids = nr_cpu_ids - subtract; +#endif + }static void __init xen_smp_prepare_boot_cpu (void )
arch/x86/xen/xen-asm.S +1 -1
@@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct) /* check for unmasked and pending */ cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending - jz 1f + jnz 1f 2: call check_events 1: ENDPATCH(xen_restore_fl_direct)
drivers/ata/libata-eh.c +2 -1
@@ -3487,7 +3487,8 @@ static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_argu64 now =get_jiffies_64 ();int *trials = void_arg; -if (ent->timestamp < now -min (now, interval)) +if ((ent->eflags &ATA_EFLAG_OLD_ER ) || + (ent->timestamp < now -min (now, interval)))return -1 ; (*trials)++;
drivers/dma/at_hdmac.c +0 -4
@@ -237,10 +237,6 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first)vdbg_dump_regs (atchan); -/* clear any pending interrupt */ -while (dma_readl (atdma,EBCISR )) -cpu_relax (); -channel_writel (atchan,SADDR ,0 );channel_writel (atchan,DADDR ,0 );channel_writel (atchan,CTRLA ,0 );
drivers/firmware/efivars.c +212 -10
271 lines not on this page · raw message
drivers/gpu/drm/i915/i915_gem_execbuffer.c +7 -1
@@ -1046,6 +1046,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,return -EINVAL ; } +if (args->num_cliprects >UINT_MAX /sizeof (*cliprects)) { +DRM_DEBUG ("execbuf with %u cliprects\n" , + args->num_cliprects); +return -EINVAL ; + } cliprects =kmalloc (args->num_cliprects *sizeof (*cliprects),GFP_KERNEL );if (cliprects ==NULL ) {
@@ -1296,7 +1301,8 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,struct drm_i915_gem_exec_object2 *exec2_list =NULL ;int ret; -if (args->buffer_count <1 ) { +if (args->buffer_count <1 || + args->buffer_count >UINT_MAX /sizeof (*exec2_list)) {DRM_ERROR ("execbuf2 with %d buffers\n" , args->buffer_count);return -EINVAL ; }
drivers/gpu/drm/i915/intel_sdvo.c +18 -16
@@ -724,6 +724,7 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd,uint16_t width, height;uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len;uint16_t h_sync_offset, v_sync_offset; +int mode_clock; width = mode->crtc_hdisplay; height = mode->crtc_vdisplay;
@@ -738,7 +739,11 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd, h_sync_offset = mode->crtc_hsync_start - mode->crtc_hblank_start; v_sync_offset = mode->crtc_vsync_start - mode->crtc_vblank_start; - dtd->part1.clock = mode->clock /10 ; + mode_clock = mode->clock; + mode_clock /=intel_mode_get_pixel_multiplier (mode) ?:1 ; + mode_clock /=10 ; + dtd->part1.clock = mode_clock; + dtd->part1.h_active = width &0xff ; dtd->part1.h_blank = h_blank_len &0xff ; dtd->part1.h_high = (((width >> 8) & 0xf) << 4) |
@@ -990,7 +995,7 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,struct intel_sdvo *intel_sdvo =to_intel_sdvo (encoder);u32 sdvox;struct intel_sdvo_in_out_map in_out; -struct intel_sdvo_dtd input_dtd; +struct intel_sdvo_dtd input_dtd, output_dtd;int pixel_multiplier =intel_mode_get_pixel_multiplier (adjusted_mode);int rate;
@@ -1015,20 +1020,13 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, intel_sdvo->attached_output))return ; -/* We have tried to get input timing in mode_fixup, and filled into -* adjusted_mode. -*/ -if (intel_sdvo->is_tv || intel_sdvo->is_lvds) { - input_dtd = intel_sdvo->input_dtd; - }else { -/* Set the output timing to the screen */ -if (!intel_sdvo_set_target_output (intel_sdvo, - intel_sdvo->attached_output)) -return ; - -intel_sdvo_get_dtd_from_mode (&input_dtd, adjusted_mode); - (void )intel_sdvo_set_output_timing (intel_sdvo, &input_dtd); - } +/* lvds has a special fixed output timing. */ +if (intel_sdvo->is_lvds) +intel_sdvo_get_dtd_from_mode (&output_dtd, + intel_sdvo->sdvo_lvds_fixed_mode); +else +intel_sdvo_get_dtd_from_mode (&output_dtd, mode); + (void )intel_sdvo_set_output_timing (intel_sdvo, &output_dtd);/* Set the input timing to the screen. Assume always input 0. */ if (!intel_sdvo_set_target_input (intel_sdvo))
@@ -1046,6 +1044,10 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, !intel_sdvo_set_tv_format(intel_sdvo))return ; +/* We have tried to get input timing in mode_fixup, and filled into +* adjusted_mode. +*/ +intel_sdvo_get_dtd_from_mode (&input_dtd, adjusted_mode); (void )intel_sdvo_set_input_timing (intel_sdvo, &input_dtd);switch (pixel_multiplier) {
drivers/hwmon/coretemp.c +5 -1
@@ -42,7 +42,7 @@#define DRVNAME "coretemp"#define BASE_SYSFS_ATTR_NO 2/* Sysfs Base attr no for coretemp */ -#define NUM_REAL_CORES 16/* Number of Real cores per cpu */ +#define NUM_REAL_CORES 32/* Number of Real cores per cpu */ #define CORETEMP_NAME_LENGTH 17/* String Length of attrs */ #define MAX_ATTRS 5/* Maximum no of per-core attrs */ #define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
@@ -752,6 +752,10 @@ static void __cpuinit put_core_offline(unsigned int cpu) indx =TO_ATTR_NO (cpu); +/* The core id is too big, just return */ +if (indx >MAX_CORE_DATA -1 ) +return ; +if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu)coretemp_remove_core (pdata, &pdev->dev, indx);
drivers/hwmon/fam15h_power.c +42 -0
54 lines not on this page · raw message
drivers/i2c/busses/i2c-pnx.c +1 -2
@@ -546,8 +546,7 @@ static int i2c_pnx_controller_suspend(struct platform_device *pdev, {struct i2c_pnx_algo_data *alg_data =platform_get_drvdata (pdev); -/* FIXME: shouldn't this be clk_disable? */ -clk_enable (alg_data->clk); +clk_disable (alg_data->clk);return 0 ; }
drivers/mmc/host/sdhci-esdhc-imx.c +1 -2
@@ -245,8 +245,7 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd } pltfm_host->priv = imx_data; -if (!cpu_is_mx25 ()) - host->quirks |=SDHCI_QUIRK_BROKEN_TIMEOUT_VAL ; + host->quirks |=SDHCI_QUIRK_BROKEN_TIMEOUT_VAL ;if (cpu_is_mx25 () ||cpu_is_mx35 ()) {/* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */
drivers/net/wireless/ipw2x00/ipw2200.c +12 -1
@@ -2182,6 +2182,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) {int rc =0 ;unsigned long flags; +unsigned long now, end;spin_lock_irqsave (&priv->lock, flags);if (priv->status &STATUS_HCMD_ACTIVE ) {
@@ -2223,10 +2224,20 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) }spin_unlock_irqrestore (&priv->lock, flags); + now = jiffies; + end = now +HOST_COMPLETE_TIMEOUT ; +again: rc =wait_event_interruptible_timeout (priv->wait_command_queue, !(priv-> status &STATUS_HCMD_ACTIVE ), -HOST_COMPLETE_TIMEOUT ); + end - now); +if (rc <0 ) { + now = jiffies; +if (time_before (now, end)) + goto again; + rc =0 ; + } +if (rc ==0 ) {spin_lock_irqsave (&priv->lock, flags);if (priv->status &STATUS_HCMD_ACTIVE ) {
drivers/net/wireless/rtlwifi/pci.c +1 -0
@@ -1988,6 +1988,7 @@ void rtl_pci_disconnect(struct pci_dev *pdev)rtl_deinit_deferred_work (hw); rtlpriv->intf_ops->adapter_stop (hw); } + rtlpriv->cfg->ops->disable_interrupt (hw);/*deinit rfkill */ rtl_deinit_rfkill (hw);
drivers/net/wireless/wl1251/main.c +1 -0
@@ -479,6 +479,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)cancel_work_sync (&wl->irq_work);cancel_work_sync (&wl->tx_work);cancel_work_sync (&wl->filter_work); +cancel_delayed_work_sync (&wl->elp_work);mutex_lock (&wl->mutex);
drivers/net/wireless/wl1251/sdio.c +1 -1
@@ -314,8 +314,8 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func)if (wl->irq)free_irq (wl->irq, wl); -kfree (wl_sdio);wl1251_free_hw (wl); +kfree (wl_sdio);sdio_claim_host (func);sdio_release_irq (func);
drivers/scsi/libsas/sas_expander.c +20 -6
@@ -192,7 +192,14 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, phy->attached_sata_ps = dr->attached_sata_ps; phy->attached_iproto = dr->iproto <<1 ; phy->attached_tproto = dr->tproto <<1 ; -memcpy (phy->attached_sas_addr, dr->attached_sas_addr,SAS_ADDR_SIZE ); +/* help some expanders that fail to zero sas_address in the 'no +* device' case +*/ +if (phy->attached_dev_type ==NO_DEVICE || + phy->linkrate <SAS_LINK_RATE_1_5_GBPS ) +memset (phy->attached_sas_addr,0 ,SAS_ADDR_SIZE ); +else +memcpy (phy->attached_sas_addr, dr->attached_sas_addr,SAS_ADDR_SIZE ); phy->attached_phy_id = dr->attached_phy_id; phy->phy_change_count = dr->change_count; phy->routing_attr = dr->routing_attr;
@@ -1632,9 +1639,17 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,int phy_change_count =0 ; res =sas_get_phy_change_count (dev, i, &phy_change_count); -if (res) - goto out; -else if (phy_change_count != ex->ex_phy[i].phy_change_count) { +switch (res) { +case SMP_RESP_PHY_VACANT : +case SMP_RESP_NO_PHY : +continue ; +case SMP_RESP_FUNC_ACC : +break ; +default : +return res; + } + +if (phy_change_count != ex->ex_phy[i].phy_change_count) {if (update) ex->ex_phy[i].phy_change_count = phy_change_count;
@@ -1642,8 +1657,7 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,return 0 ; } } -out: -return res; +return 0 ; }static int sas_get_ex_change_count (struct domain_device *dev,int *ecc)
drivers/staging/brcm80211/brcmsmac/wlc_bmac.c +1 -2
@@ -143,7 +143,6 @@ static bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw);static char *wlc_get_macaddr (struct wlc_hw_info *wlc_hw);static void wlc_mhfdef (struct wlc_info *wlc,u16 *mhfs,u16 mhf2_init);static void wlc_mctrl_write (struct wlc_hw_info *wlc_hw); -static void wlc_bmac_mute (struct wlc_hw_info *wlc_hw,bool want,mbool flags);static void wlc_ucode_mute_override_set (struct wlc_hw_info *wlc_hw);static void wlc_ucode_mute_override_clear (struct wlc_hw_info *wlc_hw);static u32 wlc_wlintrsoff (struct wlc_info *wlc);
@@ -2725,7 +2724,7 @@ void wlc_intrsrestore(struct wlc_info *wlc, u32 macintmask)W_REG (&wlc_hw->regs->macintmask, wlc->macintmask); } -static void wlc_bmac_mute (struct wlc_hw_info *wlc_hw,bool on,mbool flags) +void wlc_bmac_mute (struct wlc_hw_info *wlc_hw,bool on,mbool flags) {u8 null_ether_addr[ETH_ALEN ] = {0 ,0 ,0 ,0 ,0 ,0 };
drivers/staging/brcm80211/brcmsmac/wlc_bmac.h +1 -0
@@ -103,6 +103,7 @@ extern void wlc_bmac_macphyclk_set(struct wlc_hw_info *wlc_hw, bool clk);extern void wlc_bmac_phy_reset (struct wlc_hw_info *wlc_hw);extern void wlc_bmac_corereset (struct wlc_hw_info *wlc_hw,u32 flags);extern void wlc_bmac_reset (struct wlc_hw_info *wlc_hw); +extern void wlc_bmac_mute (struct wlc_hw_info *wlc_hw,bool want,mbool flags);extern void wlc_bmac_init (struct wlc_hw_info *wlc_hw,chanspec_t chanspec,bool mute);extern int wlc_bmac_up_prep (struct wlc_hw_info *wlc_hw);
drivers/staging/brcm80211/brcmsmac/wlc_main.c +8 -0
@@ -6145,6 +6145,7 @@ wlc_recvctl(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p) {int len_mpdu;struct ieee80211_rx_status rx_status; +struct ieee80211_hdr *hdr;memset (&rx_status,0 ,sizeof (rx_status));prep_mac80211_status (wlc, rxh, p, &rx_status);
@@ -6154,6 +6155,13 @@ wlc_recvctl(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p)skb_pull (p,D11_PHY_HDR_LEN );__skb_trim (p, len_mpdu); +/* unmute transmit */ +if (wlc->hw->suspended_fifos) { + hdr = (struct ieee80211_hdr *)p->data; +if (ieee80211_is_beacon (hdr->frame_control)) +wlc_bmac_mute (wlc->hw, false,0 ); + } +memcpy (IEEE80211_SKB_RXCB (p), &rx_status,sizeof (rx_status));ieee80211_rx_irqsafe (wlc->pub->ieee_hw, p);return ;
drivers/usb/class/cdc-wdm.c +5 -2
@@ -108,8 +108,9 @@ static void wdm_out_callback(struct urb *urb)spin_lock (&desc->iuspin); desc->werr = urb->status;spin_unlock (&desc->iuspin); -clear_bit (WDM_IN_USE , &desc->flags);kfree (desc->outbuf); + desc->outbuf =NULL ; +clear_bit (WDM_IN_USE , &desc->flags);wake_up (&desc->wait); }
@@ -312,7 +313,7 @@ static ssize_t wdm_writeif (we <0 )return -EIO ; - desc->outbuf = buf =kmalloc (count,GFP_KERNEL ); + buf =kmalloc (count,GFP_KERNEL );if (!buf) { rv = -ENOMEM ; goto outnl;
@@ -376,10 +377,12 @@ static ssize_t wdm_write req->wIndex = desc->inum; req->wLength =cpu_to_le16 (count);set_bit (WDM_IN_USE , &desc->flags); + desc->outbuf = buf; rv =usb_submit_urb (desc->command,GFP_KERNEL );if (rv <0 ) {kfree (buf); + desc->outbuf =NULL ;clear_bit (WDM_IN_USE , &desc->flags);dev_err (&desc->intf->dev,"Tx URB error: %d\n" , rv); }else {
drivers/usb/core/hcd-pci.c +9 -0
@@ -495,6 +495,15 @@ static int hcd_pci_suspend_noirq(struct device *dev)pci_save_state (pci_dev); +/* +* Some systems crash if an EHCI controller is in D3 during +* a sleep transition. We have to leave such controllers in D0. +*/ +if (hcd->broken_pci_sleep) { +dev_dbg (dev,"Staying in PCI D0\n" ); +return retval; + } +/* If the root hub is dead rather than suspended, disallow remote * wakeup. usb_hc_died() should ensure that both hosts are marked as * dying, so we only need to check the primary roothub.
drivers/usb/gadget/f_mass_storage.c +1 -1
@@ -2187,7 +2187,7 @@ unknown_cmnd: common->data_size_from_cmnd =0 ;sprintf (unknown,"Unknown x%02x" , common->cmnd[0 ]); reply =check_command (common, common->cmnd_size, -DATA_DIR_UNKNOWN ,0xff ,0 , unknown); +DATA_DIR_UNKNOWN , ~0 ,0 , unknown);if (reply ==0 ) { common->curlun->sense_data =SS_INVALID_COMMAND ; reply = -EINVAL ;
drivers/usb/gadget/file_storage.c +1 -1
@@ -2553,7 +2553,7 @@ static int do_scsi_command(struct fsg_dev *fsg) fsg->data_size_from_cmnd =0 ;sprintf (unknown,"Unknown x%02x" , fsg->cmnd[0 ]);if ((reply =check_command (fsg, fsg->cmnd_size, -DATA_DIR_UNKNOWN ,0xff ,0 , unknown)) ==0 ) { +DATA_DIR_UNKNOWN , ~0 ,0 , unknown)) ==0 ) { fsg->curlun->sense_data =SS_INVALID_COMMAND ; reply = -EINVAL ; }
drivers/usb/gadget/uvc.h +1 -1
@@ -29,7 +29,7 @@struct uvc_request_data { -unsigned int length; +__s32 length;__u8 data[60 ]; };
drivers/usb/gadget/uvc_v4l2.c +1 -1
@@ -41,7 +41,7 @@ uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data)if (data->length <0 )return usb_ep_set_halt (cdev->gadget->ep0); - req->length =min (uvc->event_length, data->length); + req->length = min_t(unsigned int, uvc->event_length, data->length); req->zero = data->length < uvc->event_length; req->dma =DMA_ADDR_INVALID ;
drivers/usb/host/ehci-hcd.c +1 -1
@@ -865,7 +865,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) pcd_status = status;/* resume root hub? */ -if (!(cmd &CMD_RUN )) +if (hcd->state ==HC_STATE_SUSPENDED )usb_hcd_resume_root_hub (hcd);/* get per-port change detect bits */
drivers/usb/host/ehci-pci.c +8 -0
@@ -144,6 +144,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd) hcd->has_tt =1 ;tdi_reset (ehci); } +if (pdev->subsystem_vendor ==PCI_VENDOR_ID_ASUSTEK ) { +/* EHCI #1 or #2 on 6 Series/C200 Series chipset */ +if (pdev->device ==0x1c26 || pdev->device ==0x1c2d ) { +ehci_info (ehci,"broken D3 during system sleep on ASUS\n" ); + hcd->broken_pci_sleep =1 ; +device_set_wakeup_capable (&pdev->dev, false); + } + }break ;case PCI_VENDOR_ID_TDI :if (pdev->device ==PCI_DEVICE_ID_TDI_EHCI ) {
drivers/usb/host/fsl-mph-dr-of.c +1 -0
@@ -93,6 +93,7 @@ struct platform_device * __devinit fsl_usb2_device_register( pdev->dev.parent = &ofdev->dev; pdev->dev.coherent_dma_mask = ofdev->dev.coherent_dma_mask; + pdev->dev.dma_mask = &pdev->archdata.dma_mask; *pdev->dev.dma_mask = *ofdev->dev.dma_mask; retval =platform_device_add_data (pdev, pdata,sizeof (*pdata));
fs/autofs4/autofs_i.h +11 -1
@@ -120,7 +120,6 @@ struct autofs_sb_info {int sub_version;int min_proto;int max_proto; -int compat_daemon;unsigned long exp_timeout;unsigned int type;int reghost_enabled;
@@ -279,6 +278,17 @@ int autofs4_fill_super(struct super_block *, void *, int);struct autofs_info *autofs4_new_ino (struct autofs_sb_info *);void autofs4_clean_ino (struct autofs_info *); +static inline int autofs_prepare_pipe (struct file *pipe) +{ +if (!pipe->f_op || !pipe->f_op->write) +return -EINVAL ; +if (!S_ISFIFO (pipe->f_dentry->d_inode->i_mode)) +return -EINVAL ; +/* We want a packet pipe */ + pipe->f_flags |=O_DIRECT ; +return 0 ; +} +/* Queue management functions */ int autofs4_wait (struct autofs_sb_info *,struct dentry *,enum autofs_notify );
fs/autofs4/dev-ioctl.c +1 -2
@@ -376,7 +376,7 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, err = -EBADF ; goto out; } -if (!pipe->f_op || !pipe->f_op->write) { +if (autofs_prepare_pipe (pipe) <0 ) { err = -EPIPE ;fput (pipe); goto out;
@@ -385,7 +385,6 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, sbi->pipefd = pipefd; sbi->pipe = pipe; sbi->catatonic =0 ; - sbi->compat_daemon =is_compat_task (); } out:mutex_unlock (&sbi->wq_mutex);
fs/autofs4/inode.c +1 -3
@@ -19,7 +19,6 @@#include <linux/parser.h> #include <linux/bitops.h> #include <linux/magic.h> -#include <linux/compat.h> #include "autofs_i.h" #include <linux/module.h>
@@ -225,7 +224,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)set_autofs_type_indirect (&sbi->type); sbi->min_proto =0 ; sbi->max_proto =0 ; - sbi->compat_daemon =is_compat_task ();mutex_init (&sbi->wq_mutex);spin_lock_init (&sbi->fs_lock); sbi->queues =NULL ;
@@ -294,7 +292,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)printk ("autofs: could not open pipe file descriptor\n" ); goto fail_dput; } -if (!pipe->f_op || !pipe->f_op->write) +if (autofs_prepare_pipe (pipe) <0 ) goto fail_fput; sbi->pipe = pipe; sbi->pipefd = pipefd;
fs/autofs4/waitq.c +2 -18
@@ -91,23 +91,6 @@ static int autofs4_write(struct file *file, const void *addr, int bytes)return (bytes >0 ); } -/* -* The autofs_v5 packet was misdesigned. -* -* The packets are identical on x86-32 and x86-64, but have different -* alignment. Which means that 'sizeof()' will give different results. -* Fix it up for the case of running 32-bit user mode on a 64-bit kernel. -*/ -static noinline size_t autofs_v5_packet_size(struct autofs_sb_info *sbi) -{ -size_t pktsz =sizeof (struct autofs_v5_packet ); -#if defined(CONFIG_X86_64 ) && defined(CONFIG_COMPAT ) -if (sbi->compat_daemon >0 ) - pktsz -=4 ; -#endif -return pktsz; -} -static void autofs4_notify_daemon (struct autofs_sb_info *sbi,struct autofs_wait_queue *wq,int type)
@@ -164,7 +147,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, {struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet; - pktsz =autofs_v5_packet_size (sbi); + pktsz =sizeof (*packet); + packet->wait_queue_token = wq->wait_queue_token; packet->len = wq->name.len;memcpy (packet->name, wq->name.name, wq->name.len);
fs/hfsplus/catalog.c +4 -0
@@ -360,6 +360,10 @@ int hfsplus_rename_cat(u32 cnid, err =hfs_brec_find (&src_fd);if (err) goto out; +if (src_fd.entrylength >sizeof (entry) || src_fd.entrylength <0 ) { + err = -EIO ; + goto out; + }hfs_bnode_read (src_fd.bnode, &entry, src_fd.entryoffset, src_fd.entrylength);
fs/hfsplus/dir.c +11 -0
@@ -146,6 +146,11 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) filp->f_pos++;/* fall through */ case 1 : +if (fd.entrylength >sizeof (entry) || fd.entrylength <0 ) { + err = -EIO ; + goto out; + } +hfs_bnode_read (fd.bnode, &entry, fd.entryoffset, fd.entrylength);if (be16_to_cpu (entry.type) !=HFSPLUS_FOLDER_THREAD ) {
@@ -177,6 +182,12 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) err = -EIO ; goto out; } + +if (fd.entrylength >sizeof (entry) || fd.entrylength <0 ) { + err = -EIO ; + goto out; + } +hfs_bnode_read (fd.bnode, &entry, fd.entryoffset, fd.entrylength); type =be16_to_cpu (entry.type);
fs/nfs/nfs4proc.c +21 -2
@@ -4424,7 +4424,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *fstatic int nfs4_lock_reclaim (struct nfs4_state *state,struct file_lock *request) {struct nfs_server *server =NFS_SERVER (state->inode); -struct nfs4_exception exception = { }; +struct nfs4_exception exception = { + .inode = state->inode, + };int err; do {
@@ -4442,7 +4444,9 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *requeststatic int nfs4_lock_expired (struct nfs4_state *state,struct file_lock *request) {struct nfs_server *server =NFS_SERVER (state->inode); -struct nfs4_exception exception = { }; +struct nfs4_exception exception = { + .inode = state->inode, + };int err; err =nfs4_set_lock_state (state, request);
@@ -4508,6 +4512,7 @@ static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock * {struct nfs4_exception exception = { .state = state, + .inode = state->inode, };int err;
@@ -4553,6 +4558,20 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)if (state ==NULL )return -ENOLCK ; +/* +* Don't rely on the VFS having checked the file open mode, +* since it won't do this for flock() locks. +*/ +switch (request->fl_type & (F_RDLCK |F_WRLCK |F_UNLCK )) { +case F_RDLCK : +if (!(filp->f_mode &FMODE_READ )) +return -EBADF ; +break ; +case F_WRLCK : +if (!(filp->f_mode &FMODE_WRITE )) +return -EBADF ; + } + do { status = nfs4_proc_setlk(state, cmd, request); if ((status != -EAGAIN) || IS_SETLK(cmd))
fs/nfs/super.c +6 -2
@@ -2694,11 +2694,15 @@ static struct vfsmount *nfs_do_root_mount(struct file_system_type *fs_type,char *root_devname;size_t len; - len =strlen (hostname) +3 ; + len =strlen (hostname) +5 ; root_devname =kmalloc (len,GFP_KERNEL );if (root_devname ==NULL )return ERR_PTR (-ENOMEM ); -snprintf (root_devname, len,"%s:/" , hostname); +/* Does hostname needs to be enclosed in brackets? */ +if (strchr (hostname,':' )) +snprintf (root_devname, len,"[%s]:/" , hostname); +else +snprintf (root_devname, len,"%s:/" , hostname); root_mnt =vfs_kern_mount (fs_type, flags, root_devname, data);kfree (root_devname);return root_mnt;
fs/nfsd/nfs4proc.c +4 -3
@@ -812,6 +812,7 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_setattr *setattr) {__be32 status = nfs_ok; +int err;if (setattr->sa_iattr.ia_valid &ATTR_SIZE ) {nfs4_lock_state ();
@@ -823,9 +824,9 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,return status; } } - status =mnt_want_write (cstate->current_fh.fh_export->ex_path.mnt); -if (status) -return status; + err =mnt_want_write (cstate->current_fh.fh_export->ex_path.mnt); +if (err) +return nfserrno (err); status = nfs_ok; status = check_attr_support(rqstp, cstate, setattr->sa_bmval,
fs/nfsd/nfs4state.c +9 -14
@@ -3956,16 +3956,14 @@ out:* vfs_test_lock. (Arguably perhaps test_lock should be done with an * inode operation.) */ -static int nfsd_test_lock (struct svc_rqst *rqstp,struct svc_fh *fhp,struct file_lock *lock) +static __be32 nfsd_test_lock (struct svc_rqst *rqstp,struct svc_fh *fhp,struct file_lock *lock) {struct file *file; -int err; - - err =nfsd_open (rqstp, fhp,S_IFREG ,NFSD_MAY_READ , &file); -if (err) -return err; - err =vfs_test_lock (file, lock); -nfsd_close (file); +__be32 err =nfsd_open (rqstp, fhp,S_IFREG ,NFSD_MAY_READ , &file); +if (!err) { + err =nfserrno (vfs_test_lock (file, lock)); +nfsd_close (file); + }return err; }
@@ -3978,7 +3976,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, {struct inode *inode;struct file_lock file_lock; -int error;__be32 status;if (locks_in_grace ())
@@ -4030,12 +4027,10 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,nfs4_transform_lock_offset (&file_lock); - status = nfs_ok; - error =nfsd_test_lock (rqstp, &cstate->current_fh, &file_lock); -if (error) { - status =nfserrno (error); + status =nfsd_test_lock (rqstp, &cstate->current_fh, &file_lock); +if (status) goto out; - } +if (file_lock.fl_type !=F_UNLCK ) { status = nfserr_denied;nfs4_set_lock_denied (&file_lock, &lockt->lt_denied);
fs/pipe.c +29 -2
@@ -345,6 +345,16 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { .get = generic_pipe_buf_get, }; +static const struct pipe_buf_operations packet_pipe_buf_ops = { + .can_merge =0 , + .map = generic_pipe_buf_map, + .unmap = generic_pipe_buf_unmap, + .confirm = generic_pipe_buf_confirm, + .release = anon_pipe_buf_release, + .steal = generic_pipe_buf_steal, + .get = generic_pipe_buf_get, +}; +static ssize_t pipe_read (struct kiocb *iocb,const struct iovec *_iov,unsigned long nr_segs,loff_t pos)
@@ -406,6 +416,13 @@ redo: ret += chars; buf->offset += chars; buf->len -= chars; + +/* Was it a packet buffer? Clean up and exit */ +if (buf->flags &PIPE_BUF_FLAG_PACKET ) { + total_len = chars; + buf->len =0 ; + } +if (!buf->len) { buf->ops =NULL ; ops->release (pipe, buf);
@@ -458,6 +475,11 @@ redo:return ret; } +static inline int is_packetized (struct file *file) +{ +return (file->f_flags &O_DIRECT ) !=0 ; +} +static ssize_t pipe_write (struct kiocb *iocb,const struct iovec *_iov,unsigned long nr_segs,loff_t ppos)
@@ -592,6 +614,11 @@ redo2: buf->ops = &anon_pipe_buf_ops; buf->offset =0 ; buf->len = chars; + buf->flags =0 ; +if (is_packetized (filp)) { + buf->ops = &packet_pipe_buf_ops; + buf->flags =PIPE_BUF_FLAG_PACKET ; + } pipe->nrbufs = ++bufs; pipe->tmp_page =NULL ;
@@ -1012,7 +1039,7 @@ struct file *create_write_pipe(int flags) goto err_dentry; f->f_mapping = inode->i_mapping; - f->f_flags =O_WRONLY | (flags &O_NONBLOCK ); + f->f_flags =O_WRONLY | (flags & (O_NONBLOCK |O_DIRECT )); f->f_version =0 ;return f;
@@ -1056,7 +1083,7 @@ int do_pipe_flags(int *fd, int flags)int error;int fdw, fdr; -if (flags & ~(O_CLOEXEC |O_NONBLOCK )) +if (flags & ~(O_CLOEXEC |O_NONBLOCK |O_DIRECT ))return -EINVAL ; fw =create_write_pipe (flags);
include/linux/efi.h +12 -1
@@ -347,7 +347,18 @@ extern int __init efi_setup_pcdp_console(char *);#define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002#define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004 - +#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x0000000000000008 +#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x0000000000000010 +#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x0000000000000020 +#define EFI_VARIABLE_APPEND_WRITE 0x0000000000000040 + +#define EFI_VARIABLE_MASK (EFI_VARIABLE_NON_VOLATILE | \ + EFI_VARIABLE_BOOTSERVICE_ACCESS | \ + EFI_VARIABLE_RUNTIME_ACCESS | \ + EFI_VARIABLE_HARDWARE_ERROR_RECORD | \ + EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ + EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \ + EFI_VARIABLE_APPEND_WRITE)/* * EFI Device Path information */
include/linux/kvm_host.h +6 -0
@@ -554,6 +554,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id);#ifdef CONFIG_IOMMU_API int kvm_iommu_map_pages (struct kvm *kvm,struct kvm_memory_slot *slot); +void kvm_iommu_unmap_pages (struct kvm *kvm,struct kvm_memory_slot *slot);int kvm_iommu_map_guest (struct kvm *kvm);int kvm_iommu_unmap_guest (struct kvm *kvm); int kvm_assign_device(struct kvm *kvm,
@@ -567,6 +568,11 @@ static inline int kvm_iommu_map_pages(struct kvm *kvm,return 0 ; } +static inline void kvm_iommu_unmap_pages (struct kvm *kvm, +struct kvm_memory_slot *slot) +{ +} +static inline int kvm_iommu_map_guest (struct kvm *kvm) {return -ENODEV ;
include/linux/pipe_fs_i.h +1 -0
@@ -8,6 +8,7 @@#define PIPE_BUF_FLAG_LRU 0x01/* page is on the LRU */ #define PIPE_BUF_FLAG_ATOMIC 0x02/* was atomically mapped */ #define PIPE_BUF_FLAG_GIFT 0x04/* page is a gift */ +#define PIPE_BUF_FLAG_PACKET 0x08/* read() as a packet */ /** * struct pipe_buffer - a linux kernel pipe buffer
include/linux/usb/hcd.h +2 -0
@@ -128,6 +128,8 @@ struct usb_hcd { unsigned wireless:1; /* Wireless USB HCD */ unsigned authorized_default:1; unsigned has_tt:1; /* Integrated TT in root hub */ + unsigned broken_pci_sleep:1; /* Don't put the +controller in PCI-D3 for system sleep */ int irq;/* irq allocated */ void __iomem *regs;/* device memory/io */
kernel/sched.c +26 -27
91 lines not on this page · raw message
net/mac80211/tx.c +2 -1
@@ -1222,7 +1222,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, tx->sta =rcu_dereference (sdata->u.vlan.sta);if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)return TX_DROP ; - }else if (info->flags &IEEE80211_TX_CTL_INJECTED ) { + }else if (info->flags &IEEE80211_TX_CTL_INJECTED || + tx->sdata->control_port_protocol == tx->skb->protocol) { tx->sta =sta_info_get_bss (sdata, hdr->addr1); }if (!tx->sta)
net/wireless/nl80211.c +17 -12
@@ -1181,6 +1181,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) goto bad_res; } +if (!netif_running (netdev)) { + result = -ENETDOWN ; + goto bad_res; + } +nla_for_each_nested (nl_txq_params, info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS ], rem_txq_params) {
@@ -5432,7 +5437,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_get_key, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5464,7 +5469,7 @@ static struct genl_ops nl80211_ops[] = { .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, .doit = nl80211_addset_beacon, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5472,7 +5477,7 @@ static struct genl_ops nl80211_ops[] = { .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, .doit = nl80211_addset_beacon, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5496,7 +5501,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_set_station, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5512,7 +5517,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_del_station, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5545,7 +5550,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_del_mpath, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5553,7 +5558,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_set_bss, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5579,7 +5584,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_get_mesh_config, .policy = nl80211_policy, /* can be retrieved by unprivileged users */ - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5711,7 +5716,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_setdel_pmksa, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5719,7 +5724,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_setdel_pmksa, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5727,7 +5732,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_flush_pmksa, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -5815,7 +5820,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_set_wds_peer, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
scripts/mod/file2alias.c +4 -0
@@ -905,6 +905,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,if (!sym->st_shndx ||get_secindex (info, sym) >= info->num_sections)return ; +/* We're looking for an object */ +if (ELF_ST_TYPE (sym->st_info) !=STT_OBJECT ) +return ; +/* Handle all-NULL symbols allocated into .bss */ if (info->sechdrs[get_secindex (info, sym)].sh_type &SHT_NOBITS ) { zeros =calloc (1 , sym->st_size);
sound/soc/soc-dapm.c +2 -0
@@ -67,6 +67,7 @@ static int dapm_up_seq[] = { [snd_soc_dapm_out_drv] = 10, [snd_soc_dapm_hp] = 10, [snd_soc_dapm_spk] = 10, + [snd_soc_dapm_line] = 10, [snd_soc_dapm_post] = 11, };
@@ -75,6 +76,7 @@ static int dapm_down_seq[] = { [snd_soc_dapm_adc] = 1, [snd_soc_dapm_hp] = 2, [snd_soc_dapm_spk] = 2, + [snd_soc_dapm_line] = 2, [snd_soc_dapm_out_drv] = 2, [snd_soc_dapm_pga] = 4, [snd_soc_dapm_mixer_named_ctl] = 5,
virt/kvm/iommu.c +8 -4
@@ -285,6 +285,11 @@ static void kvm_iommu_put_pages(struct kvm *kvm, } } +void kvm_iommu_unmap_pages (struct kvm *kvm,struct kvm_memory_slot *slot) +{ +kvm_iommu_put_pages (kvm, slot->base_gfn, slot->npages); +} +static int kvm_iommu_unmap_memslots (struct kvm *kvm) {int i, idx;
@@ -293,10 +298,9 @@ static int kvm_iommu_unmap_memslots(struct kvm *kvm) idx =srcu_read_lock (&kvm->srcu); slots =kvm_memslots (kvm); -for (i =0 ; i < slots->nmemslots; i++) { -kvm_iommu_put_pages (kvm, slots->memslots[i].base_gfn, - slots->memslots[i].npages); - } +for (i =0 ; i < slots->nmemslots; i++) +kvm_iommu_unmap_pages (kvm, &slots->memslots[i]); +srcu_read_unlock (&kvm->srcu, idx);return 0 ;
virt/kvm/kvm_main.c +3 -2
@@ -796,12 +796,13 @@ skip_lpage:if (r) goto out_free; -/* map the pages in iommu page table */ +/* map/unmap the pages in iommu page table */ if (npages) { r =kvm_iommu_map_pages (kvm, &new);if (r) goto out_free; - } + }else +kvm_iommu_unmap_pages (kvm, &old); r = -ENOMEM ; slots =kzalloc (sizeof (struct kvm_memslots ),GFP_KERNEL );