Linux 3.4.41
Greg KH
maintainerI'm announcing the release of the 3.4.41 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/x86/include/asm/paravirt.h | 5 ++- arch/x86/include/asm/paravirt_types.h | 2 + arch/x86/kernel/paravirt.c | 25 +++++++-------- arch/x86/lguest/boot.c | 1 arch/x86/mm/fault.c | 6 ++- arch/x86/xen/mmu.c | 1 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 - drivers/gpu/drm/udl/udl_connector.c | 4 ++ drivers/mtd/mtdchar.c | 56 +++++++++++++++++++++++++++++----- drivers/net/ethernet/realtek/r8169.c | 28 +++++++++++++++-- drivers/scsi/libsas/sas_expander.c | 12 +++++++ drivers/target/target_core_alua.c | 3 + fs/cifs/connect.c | 16 +++++++-- fs/inode.c | 2 - include/linux/kref.h | 21 ++++++++++++ kernel/sched/clock.c | 26 +++++++++++++++ kernel/sys.c | 3 + kernel/trace/ftrace.c | 1 lib/kobject.c | 9 ++++- sound/soc/codecs/wm8903.c | 2 + sound/usb/mixer_quirks.c | 4 +- sound/usb/quirks.c | 2 - 23 files changed, 195 insertions(+), 38 deletions(-)
Alban Bedel (1):
ASoC: wm8903: Fix the bypass to HP/LINEOUT when no DAC or ADC is running
Boris Ostrovsky (1):
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
Chris Wilson (1):
drm/i915: Use the correct size of the GTT for placing the per-process entries
Dave Airlie (1):
udl: handle EDID failure properly.
David Woodhouse (1):
mtd: Disable mtdchar mmap on MMU systems
Eldad Zack (1):
ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*
Greg Kroah-Hartman (1):
Linux 3.4.41
Hayes Wang (1):
r8169: fix auto speed down issue
Huacai Chen (1):
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
Linus Torvalds (2):
mtdchar: fix offset overflow detection
kobject: fix kset_find_obj() race with concurrent last kobject_put()
Lukasz Dorau (1):
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
Namhyung Kim (1):
tracing: Fix double free when function profile init failed
Nicholas Bellinger (1):
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
Sachin Prabhu (1):
cifs: Allow passwords which begin with a delimitor
Samu Kallio (1):
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
Suleiman Souhlal (1):
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
Thomas Gleixner (1):
sched_clock: Prevent 64bit inatomicity on 32bit systems
Thomas Hellstrom (1):
kref: Implement kref_get_unless_zero v3
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 40 +SUBLEVEL = 41 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/x86/include/asm/paravirt.h +4 -1
@@ -741,7 +741,10 @@ static inline void arch_leave_lazy_mmu_mode(void)PVOP_VCALL0 (pv_mmu_ops.lazy_mode.leave); } -void arch_flush_lazy_mmu_mode (void ); +static inline void arch_flush_lazy_mmu_mode (void ) +{ +PVOP_VCALL0 (pv_mmu_ops.lazy_mode.flush); +}static inline void __set_fixmap (unsigned /* enum fixed_addresses */ idx,phys_addr_t phys,pgprot_t flags)
arch/x86/include/asm/paravirt_types.h +2 -0
@@ -91,6 +91,7 @@ struct pv_lazy_ops {/* Set deferred update mode, used for batching operations. */ void (*enter)(void );void (*leave)(void ); +void (*flush)(void ); };struct pv_time_ops {
@@ -680,6 +681,7 @@ void paravirt_end_context_switch(struct task_struct *next);void paravirt_enter_lazy_mmu (void );void paravirt_leave_lazy_mmu (void ); +void paravirt_flush_lazy_mmu (void );void _paravirt_nop (void );u32 _paravirt_ident_32 (u32 );
arch/x86/kernel/paravirt.c +13 -12
@@ -263,6 +263,18 @@ void paravirt_leave_lazy_mmu(void)leave_lazy (PARAVIRT_LAZY_MMU ); } +void paravirt_flush_lazy_mmu (void ) +{ +preempt_disable (); + +if (paravirt_get_lazy_mode () ==PARAVIRT_LAZY_MMU ) { +arch_leave_lazy_mmu_mode (); +arch_enter_lazy_mmu_mode (); + } + +preempt_enable (); +} +void paravirt_start_context_switch (struct task_struct *prev) {BUG_ON (preemptible ());
@@ -292,18 +304,6 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)return percpu_read (paravirt_lazy_mode); } -void arch_flush_lazy_mmu_mode (void ) -{ -preempt_disable (); - -if (paravirt_get_lazy_mode () ==PARAVIRT_LAZY_MMU ) { -arch_leave_lazy_mmu_mode (); -arch_enter_lazy_mmu_mode (); - } - -preempt_enable (); -} -struct pv_info pv_info = { .name ="bare hardware" , .paravirt_enabled =0 ,
@@ -477,6 +477,7 @@ struct pv_mmu_ops pv_mmu_ops = { .lazy_mode = { .enter = paravirt_nop, .leave = paravirt_nop, + .flush = paravirt_nop, }, .set_fixmap = native_set_fixmap,
arch/x86/lguest/boot.c +1 -0
@@ -1333,6 +1333,7 @@ __init void lguest_init(void) pv_mmu_ops.read_cr3 = lguest_read_cr3; pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu; pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mmu_mode; + pv_mmu_ops.lazy_mode.flush = paravirt_flush_lazy_mmu; pv_mmu_ops.pte_update = lguest_pte_update; pv_mmu_ops.pte_update_defer = lguest_pte_update;
arch/x86/mm/fault.c +4 -2
@@ -377,10 +377,12 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)if (pgd_none (*pgd_ref))return -1 ; -if (pgd_none (*pgd)) +if (pgd_none (*pgd)) {set_pgd (pgd, *pgd_ref); -else +arch_flush_lazy_mmu_mode (); + }else {BUG_ON (pgd_page_vaddr (*pgd) !=pgd_page_vaddr (*pgd_ref)); + }/* * Below here mismatches are bugs because these lower tables
arch/x86/xen/mmu.c +1 -0
@@ -2076,6 +2076,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = { .lazy_mode = { .enter = paravirt_enter_lazy_mmu, .leave = xen_leave_lazy_mmu, + .flush = paravirt_flush_lazy_mmu, }, .set_fixmap = xen_set_fixmap,
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
@@ -72,7 +72,7 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)/* ppgtt PDEs reside in the global gtt pagetable, which has 512*1024 * entries. For aliasing ppgtt support we just steal them at the end for * now. */ - first_pd_entry_in_global_pt =512 *1024 -I915_PPGTT_PD_ENTRIES ; + first_pd_entry_in_global_pt = dev_priv->mm.gtt->gtt_total_entries -I915_PPGTT_PD_ENTRIES ; ppgtt =kzalloc (sizeof (*ppgtt),GFP_KERNEL );if (!ppgtt)
drivers/gpu/drm/udl/udl_connector.c +4 -0
@@ -61,6 +61,10 @@ static int udl_get_modes(struct drm_connector *connector)int ret; edid = (struct edid *)udl_get_edid (udl); +if (!edid) { +drm_mode_connector_update_edid_property (connector,NULL ); +return 0 ; + } connector->display_info.raw_edid = (char *)edid;
drivers/mtd/mtdchar.c +48 -8
74 lines not on this page · raw message
drivers/net/ethernet/realtek/r8169.c +25 -3
@@ -3483,6 +3483,30 @@ static void __devinit rtl_init_mdio_ops(struct rtl8169_private *tp) } } +static void rtl_speed_down (struct rtl8169_private *tp) +{ +u32 adv; +int lpa; + +rtl_writephy (tp,0x1f ,0x0000 ); + lpa =rtl_readphy (tp,MII_LPA ); + +if (lpa & (LPA_10HALF |LPA_10FULL )) + adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full; +else if (lpa & (LPA_100HALF |LPA_100FULL )) + adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | + ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full; +else + adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | + ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | + (tp->mii.supports_gmii ? + ADVERTISED_1000baseT_Half | + ADVERTISED_1000baseT_Full :0 ); + +rtl8169_set_speed (tp->dev,AUTONEG_ENABLE ,SPEED_1000 ,DUPLEX_FULL , + adv); +} +static void rtl_wol_suspend_quirk (struct rtl8169_private *tp) {void __iomem *ioaddr = tp->mmio_addr;
@@ -3508,9 +3532,7 @@ static bool rtl_wol_pll_power_down(struct rtl8169_private *tp)if (!(__rtl8169_get_wol (tp) &WAKE_ANY ))return false; -rtl_writephy (tp,0x1f ,0x0000 ); -rtl_writephy (tp,MII_BMCR ,0x0000 ); - +rtl_speed_down (tp);rtl_wol_suspend_quirk (tp);return true;
drivers/scsi/libsas/sas_expander.c +12 -0
@@ -235,6 +235,17 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) linkrate = phy->linkrate;memcpy (sas_addr, phy->attached_sas_addr,SAS_ADDR_SIZE ); +/* Handle vacant phy - rest of dr data is not valid so skip it */ +if (phy->phy_state ==PHY_VACANT ) { +memset (phy->attached_sas_addr,0 ,SAS_ADDR_SIZE ); + phy->attached_dev_type =NO_DEVICE ; +if (!test_bit (SAS_HA_ATA_EH_ACTIVE , &ha->state)) { + phy->phy_id = phy_id; + goto skip; + }else + goto out; + } + phy->attached_dev_type =to_dev_type (dr);if (test_bit (SAS_HA_ATA_EH_ACTIVE , &ha->state)) goto out;
@@ -272,6 +283,7 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) phy->phy->maximum_linkrate = dr->pmax_linkrate; phy->phy->negotiated_linkrate = phy->linkrate; + skip:if (new_phy)if (sas_phy_add (phy->phy)) {sas_phy_free (phy->phy);
drivers/target/target_core_alua.c +3 -0
@@ -392,6 +392,7 @@ static inline int core_alua_state_standby(case REPORT_LUNS :case RECEIVE_DIAGNOSTIC :case SEND_DIAGNOSTIC : +return 0 ;case MAINTENANCE_IN :switch (cdb[1 ]) {case MI_REPORT_TARGET_PGS :
@@ -434,6 +435,7 @@ static inline int core_alua_state_unavailable(switch (cdb[0 ]) {case INQUIRY :case REPORT_LUNS : +return 0 ;case MAINTENANCE_IN :switch (cdb[1 ]) {case MI_REPORT_TARGET_PGS :
@@ -474,6 +476,7 @@ static inline int core_alua_state_transition(switch (cdb[0 ]) {case INQUIRY :case REPORT_LUNS : +return 0 ;case MAINTENANCE_IN :switch (cdb[1 ]) {case MI_REPORT_TARGET_PGS :
fs/cifs/connect.c +13 -3
@@ -1576,14 +1576,24 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, }break ;case Opt_blank_pass: - vol->password =NULL ; -break ; -case Opt_pass:/* passwords have to be handled differently * to allow the character used for deliminator * to be passed within them */ +/* +* Check if this is a case where the password +* starts with a delimiter +*/ + tmp_end =strchr (data,'=' ); + tmp_end++; +if (!(tmp_end < end && tmp_end[1 ] == delim)) { +/* No it is not. Set the password to NULL */ + vol->password =NULL ; +break ; + } +/* Yes it is. Drop down to Opt_pass below.*/ +case Opt_pass:/* Obtain the value string */ value =strchr (data,'=' ); value++;
fs/inode.c +1 -1
@@ -705,7 +705,7 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)* inode to the back of the list so we don't spin on it. */ if (!spin_trylock (&inode->i_lock)) { -list_move_tail (&inode->i_lru, &sb->s_inode_lru); +list_move (&inode->i_lru, &sb->s_inode_lru);continue ; }
include/linux/kref.h +21 -0
@@ -93,4 +93,25 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref) {return kref_sub (kref,1 , release); } + +/** +* kref_get_unless_zero - Increment refcount for object unless it is zero. +* @kref: object. +* +* Return non-zero if the increment succeeded. Otherwise return 0. +* +* This function is intended to simplify locking around refcounting for +* objects that can be looked up from a lookup structure, and which are +* removed from that lookup structure in the object destructor. +* Operations on such objects require at least a read lock around +* lookup + kref_get, and a write lock around kref_put + remove from lookup +* structure. Furthermore, RCU implementations become extremely tricky. +* With a lookup followed by a kref_get_unless_zero *with return value check* +* locking in the kref_put path can be deferred to the actual removal from +* the lookup structure and RCU lookups become trivial. +*/ +static inline int __must_check kref_get_unless_zero (struct kref *kref) +{ +return atomic_add_unless (&kref->refcount,1 ,0 ); +}#endif /* _KREF_H_ */
kernel/sched/clock.c +26 -0
@@ -176,10 +176,36 @@ static u64 sched_clock_remote(struct sched_clock_data *scd)u64 this_clock, remote_clock;u64 *ptr, old_val, val; +#if BITS_PER_LONG !=64 +again: +/* +* Careful here: The local and the remote clock values need to +* be read out atomic as we need to compare the values and +* then update either the local or the remote side. So the +* cmpxchg64 below only protects one readout. +* +* We must reread via sched_clock_local() in the retry case on +* 32bit as an NMI could use sched_clock_local() via the +* tracer and hit between the readout of +* the low32bit and the high 32bit portion. +*/ + this_clock =sched_clock_local (my_scd); +/* +* We must enforce atomic readout on 32bit, otherwise the +* update on the remote cpu can hit inbetween the readout of +* the low32bit and the high 32bit portion. +*/ + remote_clock =cmpxchg64 (&scd->clock,0 ,0 ); +#else +/* +* On 64bit the read of [my]scd->clock is atomic versus the +* update, so we can avoid the above 32bit dance. +*/ sched_clock_local (my_scd); again: this_clock = my_scd->clock; remote_clock = scd->clock; +#endif /* * Use the opportunity that we have both locks
kernel/sys.c +2 -1
@@ -320,7 +320,6 @@ void kernel_restart_prepare(char *cmd) system_state =SYSTEM_RESTART ;usermodehelper_disable ();device_shutdown (); -syscore_shutdown (); }/**
@@ -366,6 +365,7 @@ void kernel_restart(char *cmd) {kernel_restart_prepare (cmd);disable_nonboot_cpus (); +syscore_shutdown ();if (!cmd)printk (KERN_EMERG "Restarting system.\n" );else
@@ -391,6 +391,7 @@ static void kernel_shutdown_prepare(enum system_states state)void kernel_halt (void ) {kernel_shutdown_prepare (SYSTEM_HALT ); +disable_nonboot_cpus ();syscore_shutdown ();printk (KERN_EMERG "System halted.\n" );kmsg_dump (KMSG_DUMP_HALT );
kernel/trace/ftrace.c +0 -1
@@ -642,7 +642,6 @@ int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)free_page (tmp); } -free_page ((unsigned long )stat->pages); stat->pages =NULL ; stat->start =NULL ;
lib/kobject.c +8 -1
@@ -531,6 +531,13 @@ struct kobject *kobject_get(struct kobject *kobj)return kobj; } +static struct kobject *kobject_get_unless_zero (struct kobject *kobj) +{ +if (!kref_get_unless_zero (&kobj->kref)) + kobj =NULL ; +return kobj; +} +/* * kobject_cleanup - free kobject resources. * @kobj: object to cleanup
@@ -753,7 +760,7 @@ struct kobject *kset_find_obj(struct kset *kset, const char *name)list_for_each_entry (k, &kset->list, entry) {if (kobject_name (k) && !strcmp (kobject_name (k), name)) { - ret =kobject_get (k); + ret =kobject_get_unless_zero (k);break ; } }
sound/soc/codecs/wm8903.c +2 -0
@@ -1082,6 +1082,8 @@ static const struct snd_soc_dapm_route wm8903_intercon[] = { { "ROP", NULL, "Right Speaker PGA" }, { "RON", NULL, "Right Speaker PGA" }, + { "Charge Pump", NULL, "CLK_DSP" }, + { "Left Headphone Output PGA", NULL, "Charge Pump" }, { "Right Headphone Output PGA", NULL, "Charge Pump" }, { "Left Line Output PGA", NULL, "Charge Pump" },
sound/usb/mixer_quirks.c +2 -2
@@ -396,7 +396,7 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol,else ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), bRequest,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -0 ,cpu_to_le16 (wIndex), +0 , wIndex, &tmp,sizeof (tmp),1000 );up_read (&mixer->chip->shutdown_rwsem);
@@ -427,7 +427,7 @@ static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,else ret =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ), bRequest,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -cpu_to_le16 (wValue),cpu_to_le16 (wIndex), + wValue, wIndex,NULL ,0 ,1000 );up_read (&mixer->chip->shutdown_rwsem);
sound/usb/quirks.c +1 -1
@@ -486,7 +486,7 @@ static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev) {int ret =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ),0xaf ,USB_TYPE_VENDOR |USB_RECIP_DEVICE , -cpu_to_le16 (1 ),0 ,NULL ,0 ,1000 ); +1 ,0 ,NULL ,0 ,1000 );if (ret <0 )return ret;