Linux 2.6.29.3
Subsystems (39)
I'm announcing the release of the 2.6.29.3 kernel. All users of the 2.6.29 kernel series are very strongly encouraged to upgrade.
I'll also be replying to this message with a copy of the patch between 2.6.29.2 and 2.6.29.3
The updated 2.6.29.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.29.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.29.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 arch/powerpc/include/asm/processor.h | 19 +++ arch/powerpc/kernel/signal.c | 4 arch/powerpc/kernel/signal.h | 2 arch/powerpc/kernel/signal_32.c | 4 arch/powerpc/kernel/signal_64.c | 2 arch/x86/kernel/xsave.c | 4 arch/x86/kvm/mmu.c | 2 arch/x86/kvm/x86.c | 5 arch/x86/mm/kmmio.c | 2 arch/x86/pci/mmconfig-shared.c | 6 - block/genhd.c | 12 +- drivers/acpi/acpica/rscreate.c | 27 ----- drivers/char/hw_random/virtio-rng.c | 4 drivers/crypto/ixp4xx_crypto.c | 182 ++++++++++++----------------------- drivers/gpu/drm/i915/i915_drv.h | 4 drivers/gpu/drm/i915/i915_reg.h | 1 drivers/gpu/drm/i915/intel_display.c | 9 + drivers/ide/cs5536.c | 1 drivers/net/b44.c | 2 drivers/net/forcedeth.c | 3 drivers/net/mv643xx_eth.c | 24 ++-- drivers/net/wireless/ath5k/debug.c | 2 drivers/net/wireless/ath9k/main.c | 5 drivers/net/wireless/b43/dma.c | 50 +++++++-- drivers/net/wireless/rndis_wlan.c | 14 +- drivers/pci/dmar.c | 11 +- drivers/pci/intel-iommu.c | 8 + drivers/pci/quirks.c | 1 drivers/platform/x86/thinkpad_acpi.c | 41 +++---- drivers/usb/serial/usb-serial.c | 99 +++++++++++++------ drivers/usb/storage/unusual_devs.h | 6 + fs/Makefile | 2 fs/bio.c | 3 fs/compat.c | 27 ++++- fs/exec.c | 43 +++++--- fs/fs_struct.c | 170 ++++++++++++++++++++++++++++++++ fs/internal.h | 8 + fs/namei.c | 7 - fs/namespace.c | 60 ----------- fs/nfsd/nfssvc.c | 7 - fs/proc/array.c | 13 +- fs/proc/base.c | 55 +++------- fs/proc/meminfo.c | 2 fs/proc/task_mmu.c | 4 fs/proc/task_nommu.c | 2 include/drm/drm_pciids.h | 1 include/linux/fs_struct.h | 7 - include/linux/genhd.h | 1 include/linux/kvm.h | 2 include/linux/mman.h | 9 - include/linux/pci_regs.h | 2 kernel/exec_domain.c | 22 ---- kernel/exit.c | 34 ------ kernel/fork.c | 62 +++++------ kernel/ptrace.c | 4 kernel/sched.c | 2 kernel/time/tick-common.c | 12 ++ mm/madvise.c | 8 + mm/mmap.c | 12 +- mm/nommu.c | 13 +- mm/swap.c | 46 -------- net/mac80211/mlme.c | 2 net/mac80211/rx.c | 13 +- scripts/mod/modpost.c | 1 security/selinux/hooks.c | 1 sound/soc/codecs/wm8580.c | 2 sound/usb/usx2y/us122l.c | 12 +- virt/kvm/kvm_main.c | 11 -- 69 files changed, 682 insertions(+), 558 deletions(-)
Al Viro (5):
Kill unsharing fs_struct in __set_personality()
Get rid of bumping fs_struct refcount in pivot_root(2) Take fs_struct handling to new file (fs/fs_struct.c) New locking/refcounting for fs_struct check_unsafe_exec() doesn't care about signal handlers sharing
Alan Stern (1):
USB: serial: fix lifetime and locking problems
Avi Kivity (1):
KVM: MMU: Fix off-by-one calculating large page count
Bob Copeland (1):
ath5k: fix buffer overrun in rate debug code
Cedric Hombourger (1):
kbuild: fix Module.markers permission error under cygwin
Christian Borntraeger (1):
virtio-rng: Remove false BUG for spurious callbacks
Christian Hohnstaedt (1):
crypto: ixp4xx - Fix handling of chained sg buffers
Chuck Short (1):
USB: Unusual Device support for Gold MP3 Player Energy
David Howells (1):
Annotate struct fs_struct's usage count restriction
David Woodhouse (3):
intel-iommu: Fix device-to-iommu mapping for PCI-PCI bridges.
intel-iommu: Fix oops in device_to_iommu() when devices not found.
intel-iommu: Avoid panic() for DRHD at address zero.
Ed Swierk (1):
forcedeth: Fix resume from hibernation regression.
Eric Dumazet (1):
sched: account system time properly
Eugene Teo (1):
unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184)
FUJITA Tomonori (1):
bio: fix memcpy corruption in bio_copy_user_iov()
Greg Kroah-Hartman (1):
Linux 2.6.29.3
Henrique de Moraes Holschuh (1):
thinkpad-acpi: fix LED blinking through timer trigger
Hugh Dickins (3):
compat_do_execve should unshare_files
fix setuid sometimes doesn't
fix setuid sometimes wouldn't
Jake Edge (1):
proc: avoid information leaks to non-privileged processes
Jan Kiszka (1):
KVM: Fix overlapping check for memory slots
Jesse Barnes (1):
drm/i915: allow tiled front buffers on 965+
Joerg Roedel (1):
KVM: x86: release time_page on vcpu destruction
Johannes Berg (1):
mac80211: fix basic rate bitmap calculation
John Stultz (1):
clockevents: prevent endless loop in tick_handle_periodic()
Josh Boyer (1):
powerpc: Sanitize stack pointer in signal handling code
Jussi Kivilinna (1):
rndis_wlan: fix initialization order for workqueue&workers
KOSAKI Motohiro (1):
mm: fix Committed_AS underflow on large NR_CPUS environment
Karsten Wiese (1):
ALSA: us122l: add snd_us122l_free()
Lennert Buytenhek (2):
mv643xx_eth: 64bit mib counter read fix
mv643xx_eth: OOM handling fixes
Luis R. Rodriguez (1):
ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
Marcelo Tosatti (1):
KVM: MMU: disable global page optimization
Mark Brown (1):
ASoC: Fix offset of freqmode in WM8580 PLL configuration
Mel Gorman (1):
Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions
Michael Buesch (3):
b43: Poison RX buffers
b43: Refresh RX poison on buffer recycling
b44: Use kernel DMA addresses for the kernel DMA API
Oleg Nesterov (4):
exit_notify: kill the wrong capable(CAP_KILL) check (CVE-2009-1337)
ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex
do_execve() must not clear fs->in_exec if it was set by another thread
check_unsafe_exec: s/lock_task_sighand/rcu_read_lock/Sergei Shtylyov (1):
cs5536: define dma_sff_read_status() method
Stuart Bennett (1):
tracing: x86, mmiotrace: fix range test
Suresh Siddha (1):
x86-64: fix FPU corruption with signals and preemption
Tejun Heo (1):
block: include empty disks in /proc/diskstats
Thomas Renninger (1):
PCI quirk: disable MSI on VIA VT3364 chipsets
Vasanthakumar Thiagarajan (1):
mac80211: Fix bug in getting rx status for frames pending in reorder buffer
Vitaly Mayatskikh (1):
pagemap: require aligned-length, non-null reads of /proc/pid/pagemap
Yinghai Lu (1):
x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case
Yu Zhao (1):
PCI: fix incorrect mask of PM No_Soft_Reset bit
Zhang Rui (1):
ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entries
Zhenyu Wang (1):
drm/i915: add support for G41 chipset
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 29 -EXTRAVERSION = .2 +EXTRAVERSION = .3 NAME = Temporary Tasmanian Devil # *DOCUMENTATION*
arch/powerpc/include/asm/processor.h +19 -0
@@ -313,6 +313,25 @@ static inline void prefetchw(const void *x)#define HAVE_ARCH_PICK_MMAP_LAYOUT #endif +#ifdef CONFIG_PPC64 +static inline unsigned long get_clean_sp (struct pt_regs *regs,int is_32) +{ +unsigned long sp; + +if (is_32) + sp = regs->gpr[1 ] &0x0ffffffffUL ; +else + sp = regs->gpr[1 ]; + +return sp; +} +#else +static inline unsigned long get_clean_sp (struct pt_regs *regs,int is_32) +{ +return regs->gpr[1 ]; +} +#endif +#endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_PROCESSOR_H */
arch/powerpc/kernel/signal.c +2 -2
@@ -26,12 +26,12 @@ int show_unhandled_signals = 0;* Allocate space for the signal frame */ void __user *get_sigframe (struct k_sigaction *ka,struct pt_regs *regs, -size_t frame_size) +size_t frame_size,int is_32) {unsigned long oldsp, newsp;/* Default to using normal stack */ - oldsp = regs->gpr[1 ]; + oldsp =get_clean_sp (regs, is_32);/* Check for alt stack */ if ((ka->sa.sa_flags & SA_ONSTACK) &&
arch/powerpc/kernel/signal.h +1 -1
@@ -15,7 +15,7 @@extern void do_signal (struct pt_regs *regs,unsigned long thread_info_flags);extern void __user *get_sigframe (struct k_sigaction *ka,struct pt_regs *regs, -size_t frame_size); +size_t frame_size,int is_32);extern void restore_sigmask (sigset_t *set); extern int handle_signal32(unsigned long sig, struct k_sigaction *ka,
arch/powerpc/kernel/signal_32.c +2 -2
@@ -836,7 +836,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,/* Set up Signal Frame */ /* Put a Real Time Context onto stack */ - rt_sf =get_sigframe (ka, regs,sizeof (*rt_sf)); + rt_sf =get_sigframe (ka, regs,sizeof (*rt_sf),1 ); addr = rt_sf;if (unlikely (rt_sf ==NULL )) goto badframe;
@@ -1182,7 +1182,7 @@ int handle_signal32(unsigned long sig, struct k_sigaction *ka,unsigned long newsp =0 ;/* Set up Signal Frame */ - frame =get_sigframe (ka, regs,sizeof (*frame)); + frame =get_sigframe (ka, regs,sizeof (*frame),1 );if (unlikely (frame ==NULL )) goto badframe; sc = (struct sigcontext __user *) &frame->sctx;
arch/powerpc/kernel/signal_64.c +1 -1
@@ -402,7 +402,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,unsigned long newsp =0 ;long err =0 ; - frame =get_sigframe (ka, regs,sizeof (*frame)); + frame =get_sigframe (ka, regs,sizeof (*frame),0 );if (unlikely (frame ==NULL )) goto badframe;
arch/x86/kernel/xsave.c +3 -1
@@ -89,7 +89,7 @@ int save_i387_xstate(void __user *buf)if (!used_math ())return 0 ; -clear_used_math ();/* trigger finit */ +if (task_thread_info (tsk)->status &TS_USEDFPU ) {/* * Start with clearing the user buffer. This will present a
@@ -114,6 +114,8 @@ int save_i387_xstate(void __user *buf)return -1 ; } +clear_used_math ();/* trigger finit */ +if (task_thread_info (tsk)->status &TS_XSAVE ) {struct _fpstate __user *fx = buf;struct _xstate __user *x = buf;
arch/x86/kvm/mmu.c +1 -1
@@ -797,7 +797,7 @@ static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu,ASSERT (is_empty_shadow_page (sp->spt));bitmap_zero (sp->slot_bitmap,KVM_MEMORY_SLOTS +KVM_PRIVATE_MEM_SLOTS ); sp->multimapped =0 ; - sp->global =1 ; + sp->global =0 ; sp->parent_pte = parent_pte; --vcpu->kvm->arch.n_free_mmu_pages;return sp;
arch/x86/kvm/x86.c +5 -0
@@ -3962,6 +3962,11 @@ EXPORT_SYMBOL_GPL(kvm_put_guest_fpu);void kvm_arch_vcpu_free (struct kvm_vcpu *vcpu) { +if (vcpu->arch.time_page) { +kvm_release_page_dirty (vcpu->arch.time_page); + vcpu->arch.time_page =NULL ; + } + kvm_x86_ops->vcpu_free (vcpu); }
arch/x86/mm/kmmio.c +1 -1
@@ -87,7 +87,7 @@ static struct kmmio_probe *get_kmmio_probe(unsigned long addr) {struct kmmio_probe *p;list_for_each_entry_rcu (p, &kmmio_probes, list) { -if (addr >= p->addr && addr <= (p->addr + p->len)) +if (addr >= p->addr && addr < (p->addr + p->len))return p; }return NULL ;
arch/x86/pci/mmconfig-shared.c +3 -3
@@ -254,7 +254,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res,if (!fixmem32)return AE_OK ;if ((mcfg_res->start >= fixmem32->address) && - (mcfg_res->end < (fixmem32->address + + (mcfg_res->end <= (fixmem32->address + fixmem32->address_length))) { mcfg_res->flags =1 ;return AE_CTRL_TERMINATE ;
@@ -271,7 +271,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res,return AE_OK ;if ((mcfg_res->start >= address.minimum) && - (mcfg_res->end < (address.minimum + address.address_length))) { + (mcfg_res->end <= (address.minimum + address.address_length))) { mcfg_res->flags =1 ;return AE_CTRL_TERMINATE ; }
@@ -318,7 +318,7 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved,u64 old_size = size;int valid =0 ; -while (!is_reserved (addr, addr + size -1 ,E820_RESERVED )) { +while (!is_reserved (addr, addr + size,E820_RESERVED )) { size >>=1 ;if (size < (16UL <<20 ))break ;
block/genhd.c +8 -4
@@ -98,7 +98,7 @@ void disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk,if (flags &DISK_PITER_REVERSE ) piter->idx = ptbl->len -1 ; -else if (flags &DISK_PITER_INCL_PART0 ) +else if (flags & (DISK_PITER_INCL_PART0 |DISK_PITER_INCL_EMPTY_PART0 )) piter->idx =0 ;else piter->idx =1 ;
@@ -134,7 +134,8 @@ struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter)/* determine iteration parameters */ if (piter->flags &DISK_PITER_REVERSE ) { inc =-1 ; -if (piter->flags &DISK_PITER_INCL_PART0 ) +if (piter->flags & (DISK_PITER_INCL_PART0 | +DISK_PITER_INCL_EMPTY_PART0 )) end =-1 ;else end =0 ;
@@ -150,7 +151,10 @@ struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter) part =rcu_dereference (ptbl->part[piter->idx]);if (!part)continue ; -if (!(piter->flags &DISK_PITER_INCL_EMPTY ) && !part->nr_sects) +if (!part->nr_sects && + !(piter->flags &DISK_PITER_INCL_EMPTY ) && + !(piter->flags &DISK_PITER_INCL_EMPTY_PART0 && + piter->idx ==0 ))continue ;get_device (part_to_dev (part));
@@ -1011,7 +1015,7 @@ static int diskstats_show(struct seq_file *seqf, void *v)"\n\n"); */ -disk_part_iter_init (&piter, gp,DISK_PITER_INCL_PART0 ); +disk_part_iter_init (&piter, gp,DISK_PITER_INCL_EMPTY_PART0 );while ((hd =disk_part_iter_next (&piter))) { cpu =part_stat_lock ();part_round_stats (cpu, hd);
drivers/acpi/acpica/rscreate.c +2 -25
@@ -191,8 +191,6 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, user_prt = ACPI_CAST_PTR(struct acpi_pci_routing_table, buffer);for (index =0 ; index < number_of_elements; index++) { -int source_name_index =2 ; -int source_index_index =3 ;/* * Point user_prt past this current structure
@@ -261,27 +259,6 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,return_ACPI_STATUS (AE_BAD_DATA ); } -/* -* If BIOS erroneously reversed the _PRT source_name and source_index, -* then reverse them back. -*/ -if (ACPI_GET_OBJECT_TYPE (sub_object_list[3 ]) != -ACPI_TYPE_INTEGER ) { -if (acpi_gbl_enable_interpreter_slack) { - source_name_index =3 ; - source_index_index =2 ; -printk (KERN_WARNING -"ACPI: Handling Garbled _PRT entry\n" ); - }else { -ACPI_ERROR ((AE_INFO , -"(PRT[%X].source_index) Need Integer, found %s" , - index, -acpi_ut_get_object_type_name - (sub_object_list[3 ]))); -return_ACPI_STATUS (AE_BAD_DATA ); - } - } - user_prt->pin = (u32 ) obj_desc->integer.value;/*
@@ -305,7 +282,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,* 3) Third subobject: Dereference the PRT.source_name * The name may be unresolved (slack mode), so allow a null object */ - obj_desc = sub_object_list[source_name_index]; + obj_desc = sub_object_list[2 ];if (obj_desc) {switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {case ACPI_TYPE_LOCAL_REFERENCE :
@@ -379,7 +356,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,/* 4) Fourth subobject: Dereference the PRT.source_index */ - obj_desc = sub_object_list[source_index_index]; + obj_desc = sub_object_list[3 ];if (ACPI_GET_OBJECT_TYPE (obj_desc) !=ACPI_TYPE_INTEGER ) { ACPI_ERROR((AE_INFO, "(PRT[%X].SourceIndex) Need Integer, found %s",
drivers/char/hw_random/virtio-rng.c +2 -2
@@ -37,9 +37,9 @@ static void random_recv_done(struct virtqueue *vq) {int len; -/* We never get spurious callbacks. */ +/* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */ if (!vq->vq_ops->get_buf (vq, &len)) -BUG (); +return ; data_left = len /sizeof (random_data[0 ]);complete (&have_data);
drivers/crypto/ixp4xx_crypto.c +63 -119
349 lines not on this page · raw message
drivers/gpu/drm/i915/i915_drv.h +3 -1
@@ -773,7 +773,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); (dev)->pci_device == 0x2A42 || \ (dev)->pci_device == 0x2E02 || \ (dev)->pci_device == 0x2E12 || \ - (dev)->pci_device == 0x2E22) + (dev)->pci_device == 0x2E22 || \ + (dev)->pci_device == 0x2E32)#define IS_I965GM (dev) ((dev)->pci_device == 0x2A02)
@@ -782,6 +783,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);#define IS_G4X (dev) ((dev)->pci_device == 0x2E02 || \ (dev)->pci_device == 0x2E12 || \ (dev)->pci_device == 0x2E22 || \ + (dev)->pci_device == 0x2E32 || \ IS_GM45(dev))#define IS_G33 (dev) ((dev)->pci_device == 0x29C2 || \
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -1431,6 +1431,7 @@#define DISPPLANE_NO_LINE_DOUBLE 0#define DISPPLANE_STEREO_POLARITY_FIRST 0#define DISPPLANE_STEREO_POLARITY_SECOND (1<<18) +#define DISPPLANE_TILED (1<<10)#define DSPAADDR 0x70184#define DSPASTRIDE 0x70188#define DSPAPOS 0x7018C/* reserved */
drivers/gpu/drm/i915/intel_display.c +9 -0
@@ -338,6 +338,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,int dspbase = (pipe ==0 ?DSPAADDR :DSPBADDR );int dspsurf = (pipe ==0 ?DSPASURF :DSPBSURF );int dspstride = (pipe ==0 ) ?DSPASTRIDE :DSPBSTRIDE ; +int dsptileoff = (pipe ==0 ?DSPATILEOFF :DSPBTILEOFF );int dspcntr_reg = (pipe ==0 ) ?DSPACNTR :DSPBCNTR ;u32 dspcntr, alignment;int ret;
@@ -414,6 +415,13 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,mutex_unlock (&dev->struct_mutex);return -EINVAL ; } +if (IS_I965G (dev)) { +if (obj_priv->tiling_mode !=I915_TILING_NONE ) + dspcntr |=DISPPLANE_TILED ; +else + dspcntr &= ~DISPPLANE_TILED ; + } +I915_WRITE (dspcntr_reg, dspcntr); Start = obj_priv->gtt_offset;
@@ -426,6 +434,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,I915_READ (dspbase);I915_WRITE (dspsurf, Start);I915_READ (dspsurf); +I915_WRITE (dsptileoff, (y <<16 ) | x); }else {I915_WRITE (dspbase, Start + Offset);I915_READ (dspbase);
drivers/ide/cs5536.c +1 -0
@@ -237,6 +237,7 @@ static const struct ide_dma_ops cs5536_dma_ops = { .dma_test_irq = ide_dma_test_irq, .dma_lost_irq = ide_dma_lost_irq, .dma_timeout = ide_dma_timeout, + .dma_sff_read_status = ide_dma_sff_read_status, };static const struct ide_port_info cs5536_info = {
drivers/net/b44.c +1 -1
@@ -750,7 +750,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) dest_idx * sizeof(dest_desc), DMA_BIDIRECTIONAL); -ssb_dma_sync_single_for_device (bp->sdev,le32_to_cpu (src_desc->addr), +ssb_dma_sync_single_for_device (bp->sdev, dest_map->mapping,RX_PKT_BUF_SZ ,DMA_FROM_DEVICE ); }
drivers/net/forcedeth.c +3 -0
@@ -5995,6 +5995,9 @@ static int nv_resume(struct pci_dev *pdev)for (i =0 ;i <= np->register_size/sizeof (u32); i++)writel (np->saved_config_space[i], base+i*sizeof (u32)); +/* restore phy state, including autoneg */ +phy_init (dev); +netif_device_attach (dev);if (netif_running (dev)) { rc =nv_open (dev);
drivers/net/mv643xx_eth.c +13 -11
@@ -372,12 +372,12 @@ struct mv643xx_eth_private {struct work_struct tx_timeout_task;struct napi_struct napi; +u8 oom;u8 work_link;u8 work_tx;u8 work_tx_end;u8 work_rx;u8 work_rx_refill; -u8 work_rx_oom;int skb_size;struct sk_buff_head rx_recycle;
@@ -603,7 +603,7 @@ static int rxq_refill(struct rx_queue *rxq, int budget) dma_get_cache_alignment() - 1);if (skb ==NULL ) { - mp->work_rx_oom |=1 << rxq->index; + mp->oom =1 ; goto oom; }
@@ -1177,7 +1177,6 @@ static void mib_counters_update(struct mv643xx_eth_private *mp)spin_lock_bh (&mp->mib_counters_lock); p->good_octets_received +=mib_read (mp,0x00 ); - p->good_octets_received += (u64 )mib_read (mp,0x04 ) <<32 ; p->bad_octets_received +=mib_read (mp,0x08 ); p->internal_mac_transmit_err +=mib_read (mp,0x0c ); p->good_frames_received +=mib_read (mp,0x10 );
@@ -1191,7 +1190,6 @@ static void mib_counters_update(struct mv643xx_eth_private *mp) p->frames_512_to_1023_octets +=mib_read (mp,0x30 ); p->frames_1024_to_max_octets +=mib_read (mp,0x34 ); p->good_octets_sent +=mib_read (mp,0x38 ); - p->good_octets_sent += (u64 )mib_read (mp,0x3c ) <<32 ; p->good_frames_sent +=mib_read (mp,0x40 ); p->excessive_collision +=mib_read (mp,0x44 ); p->multicast_frames_sent +=mib_read (mp,0x48 );
@@ -1908,8 +1906,10 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget) mp = container_of(napi, struct mv643xx_eth_private, napi); - mp->work_rx_refill |= mp->work_rx_oom; - mp->work_rx_oom =0 ; +if (unlikely (mp->oom)) { + mp->oom =0 ; +del_timer (&mp->rx_oom); + } work_done =0 ;while (work_done < budget) {
@@ -1923,8 +1923,10 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)continue ; } - queue_mask = mp->work_tx | mp->work_tx_end | - mp->work_rx | mp->work_rx_refill; + queue_mask = mp->work_tx | mp->work_tx_end | mp->work_rx; +if (likely (!mp->oom)) + queue_mask |= mp->work_rx_refill; +if (!queue_mask) {if (mv643xx_eth_collect_events (mp))continue ;
@@ -1945,7 +1947,7 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)txq_maybe_wake (mp->txq + queue); }else if (mp->work_rx & queue_mask) { work_done +=rxq_process (mp->rxq + queue, work_tbd); - }else if (mp->work_rx_refill & queue_mask) { + }else if (!mp->oom && (mp->work_rx_refill & queue_mask)) { work_done +=rxq_refill (mp->rxq + queue, work_tbd); }else {BUG ();
@@ -1953,7 +1955,7 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget) }if (work_done < budget) { -if (mp->work_rx_oom) +if (mp->oom)mod_timer (&mp->rx_oom, jiffies + (HZ /10 ));napi_complete (napi);wrlp (mp,INT_MASK ,INT_TX_END |INT_RX |INT_EXT );
@@ -2145,7 +2147,7 @@ static int mv643xx_eth_open(struct net_device *dev)rxq_refill (mp->rxq + i,INT_MAX ); } -if (mp->work_rx_oom) { +if (mp->oom) { mp->rx_oom.expires = jiffies + (HZ /10 );add_timer (&mp->rx_oom); }
drivers/net/wireless/ath5k/debug.c +1 -1
@@ -465,7 +465,7 @@ ath5k_debug_dump_bands(struct ath5k_softc *sc)for (b =0 ; b <IEEE80211_NUM_BANDS ; b++) {struct ieee80211_supported_band *band = &sc->sbands[b]; -char bname[5 ]; +char bname[6 ];switch (band->band) {case IEEE80211_BAND_2GHZ :strcpy (bname,"2 GHz" );
drivers/net/wireless/ath9k/main.c +0 -5
@@ -2300,11 +2300,6 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw, rfilt =ath_calcrxfilter (sc);ath9k_hw_setrxfilter (sc->sc_ah, rfilt); -if (changed_flags &FIF_BCN_PRBRESP_PROMISC ) { -if (*total_flags &FIF_BCN_PRBRESP_PROMISC ) -ath9k_hw_write_associd (sc->sc_ah, ath_bcast_mac,0 ); - } -DPRINTF (sc,ATH_DBG_CONFIG ,"Set HW RX filter: 0x%x\n" , sc->rx.rxfilter); }
drivers/net/wireless/b43/dma.c +40 -10
104 lines not on this page · raw message
drivers/net/wireless/rndis_wlan.c +10 -4
@@ -2550,6 +2550,11 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)mutex_init (&priv->command_lock);spin_lock_init (&priv->stats_lock); +/* because rndis_command() sleeps we need to use workqueue */ + priv->workqueue =create_singlethread_workqueue ("rndis_wlan" ); +INIT_WORK (&priv->work, rndis_wext_worker); +INIT_DELAYED_WORK (&priv->stats_work, rndis_update_wireless_stats); +/* try bind rndis_host */ retval =generic_rndis_bind (usbdev, intf,FLAG_RNDIS_PHYM_WIRELESS );if (retval <0 )
@@ -2594,16 +2599,17 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)disassociate (usbdev,1 );netif_carrier_off (usbdev->net); -/* because rndis_command() sleeps we need to use workqueue */ - priv->workqueue =create_singlethread_workqueue ("rndis_wlan" ); -INIT_DELAYED_WORK (&priv->stats_work, rndis_update_wireless_stats);queue_delayed_work (priv->workqueue, &priv->stats_work,round_jiffies_relative (STATS_UPDATE_JIFFIES )); -INIT_WORK (&priv->work, rndis_wext_worker);return 0 ; fail: +cancel_delayed_work_sync (&priv->stats_work); +cancel_work_sync (&priv->work); +flush_workqueue (priv->workqueue); +destroy_workqueue (priv->workqueue); +kfree (priv);return retval; }
drivers/pci/dmar.c +10 -1
@@ -170,12 +170,21 @@ dmar_parse_one_drhd(struct acpi_dmar_header *header)struct dmar_drhd_unit *dmaru;int ret =0 ; + drhd = (struct acpi_dmar_hardware_unit *)header; +if (!drhd->address) { +/* Promote an attitude of violence to a BIOS engineer today */ +WARN (1 ,"Your BIOS is broken; DMAR reported at address zero!\n" +"BIOS vendor: %s; Ver: %s; Product Version: %s\n" , +dmi_get_system_info (DMI_BIOS_VENDOR ), +dmi_get_system_info (DMI_BIOS_VERSION ), +dmi_get_system_info (DMI_PRODUCT_VERSION )); +return -ENODEV ; + } dmaru =kzalloc (sizeof (*dmaru),GFP_KERNEL );if (!dmaru)return -ENOMEM ; dmaru->hdr = header; - drhd = (struct acpi_dmar_hardware_unit *)header; dmaru->reg_base_addr = drhd->address; dmaru->include_all = drhd->flags &0x1 ;/* BIT0: INCLUDE_ALL */
drivers/pci/intel-iommu.c +7 -1
@@ -447,11 +447,17 @@ static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn)if (drhd->ignored)continue ; -for (i =0 ; i < drhd->devices_cnt; i++) +for (i =0 ; i < drhd->devices_cnt; i++) {if (drhd->devices[i] && drhd->devices[i]->bus->number == bus && drhd->devices[i]->devfn == devfn)return drhd->iommu; +if (drhd->devices[i] && + drhd->devices[i]->subordinate && + drhd->devices[i]->subordinate->number <= bus && + drhd->devices[i]->subordinate->subordinate >= bus) +return drhd->iommu; + }if (drhd->include_all)return drhd->iommu;
drivers/pci/quirks.c +1 -0
@@ -1960,6 +1960,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_diDECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,PCI_DEVICE_ID_ATI_RS480 , quirk_disable_all_msi);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3336 , quirk_disable_all_msi);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3351 , quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3364 , quirk_disable_all_msi);/* Disable MSI on chipsets that are known to not support it */ static void __devinit quirk_disable_msi (struct pci_dev *dev)
drivers/platform/x86/thinkpad_acpi.c +19 -22
93 lines not on this page · raw message
drivers/usb/serial/usb-serial.c +68 -31
207 lines not on this page · raw message
drivers/usb/storage/unusual_devs.h +6 -0
@@ -2134,6 +2134,12 @@ UNUSUAL_DEV( 0xed06, 0x4500, 0x0001, 0x0001, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_CAPACITY_HEURISTICS), +/* Reported by Alessio Treglia <[email protected]> */ +UNUSUAL_DEV (0xed10 ,0x7636 ,0x0001 ,0x0001 , +"TGE" , +"Digital MP3 Audio Player" , +US_SC_DEVICE ,US_PR_DEVICE ,NULL ,US_FL_NOT_LOCKABLE ), +/* Control/Bulk transport for all SubClass values */ USUAL_DEV (US_SC_RBC ,US_PR_CB ,USB_US_TYPE_STOR ), USUAL_DEV(US_SC_8020, US_PR_CB, USB_US_TYPE_STOR),
fs/Makefile +1 -1
@@ -11,7 +11,7 @@ obj-y := open.o read_write.o file_table.o super.o \ attr.o bad_inode.o file.o filesystems.o namespace.o \ seq_file.o xattr.o libfs.o fs-writeback.o \ pnode.o drop_caches.o splice.o sync.o utimes.o \ - stack.o + stack.o fs_struct.o ifeq ($(CONFIG_BLOCK),y) obj-y += buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o
fs/bio.c +3 -0
@@ -806,6 +806,9 @@ struct bio *bio_copy_user_iov(struct request_queue *q, len += iov[i].iov_len; } +if (offset) + nr_pages++; + bmd =bio_alloc_map_data (nr_pages, iov_count, gfp_mask);if (!bmd)return ERR_PTR (-ENOMEM );
fs/compat.c +24 -3
@@ -51,6 +51,7 @@#include <linux/poll.h> #include <linux/mm.h> #include <linux/eventpoll.h> +#include <linux/fs_struct.h> #include <asm/uaccess.h> #include <asm/mmu_context.h>
@@ -1392,12 +1393,18 @@ int compat_do_execve(char * filename, {struct linux_binprm *bprm;struct file *file; +struct files_struct *displaced; +bool clear_in_exec;int retval; + retval =unshare_files (&displaced); +if (retval) + goto out_ret; + retval = -ENOMEM ; bprm =kzalloc (sizeof (*bprm),GFP_KERNEL );if (!bprm) - goto out_ret; + goto out_files; retval =mutex_lock_interruptible (¤t->cred_exec_mutex);if (retval <0 )
@@ -1407,12 +1414,16 @@ int compat_do_execve(char * filename, bprm->cred =prepare_exec_creds ();if (!bprm->cred) goto out_unlock; -check_unsafe_exec (bprm, current->files); + + retval =check_unsafe_exec (bprm); +if (retval <0 ) + goto out_unlock; + clear_in_exec = retval; file =open_exec (filename); retval =PTR_ERR (file);if (IS_ERR (file)) - goto out_unlock; + goto out_unmark;sched_exec ();
@@ -1454,9 +1465,12 @@ int compat_do_execve(char * filename, goto out;/* execve succeeded */ + current->fs->in_exec =0 ;mutex_unlock (¤t->cred_exec_mutex);acct_update_integrals (current);free_bprm (bprm); +if (displaced) +put_files_struct (displaced);return retval; out:
@@ -1469,12 +1483,19 @@ out_file:fput (bprm->file); } +out_unmark: +if (clear_in_exec) + current->fs->in_exec =0 ; + out_unlock:mutex_unlock (¤t->cred_exec_mutex); out_free:free_bprm (bprm); +out_files: +if (displaced) +reset_files_struct (displaced); out_ret:return retval; }
fs/exec.c +28 -15
90 lines not on this page · raw message
fs/fs_struct.c new file +170 -0
170 lines not on this page · raw message
fs/internal.h +7 -1
@@ -11,6 +11,7 @@struct super_block ;struct linux_binprm ; +struct path ;/* * block_dev.c
@@ -43,7 +44,7 @@ extern void __init chrdev_init(void);/* * exec.c */ -extern void check_unsafe_exec (struct linux_binprm *,struct files_struct *); +extern int check_unsafe_exec (struct linux_binprm *);/* * namespace.c
@@ -60,3 +61,8 @@ extern void umount_tree(struct vfsmount *, int, struct list_head *);extern struct vfsmount *copy_tree (struct vfsmount *,struct dentry *,int );extern void __init mnt_init (void ); + +/* +* fs_struct.c +*/ +extern void chroot_fs_refs (struct path *,struct path *);
fs/namei.c +0 -7
@@ -2891,10 +2891,3 @@ EXPORT_SYMBOL(vfs_symlink);EXPORT_SYMBOL (vfs_unlink);EXPORT_SYMBOL (dentry_unhash);EXPORT_SYMBOL (generic_readlink); - -/* to be mentioned only in INIT_TASK */ -struct fs_struct init_fs = { - .count =ATOMIC_INIT (1 ), - .lock =__RW_LOCK_UNLOCKED (init_fs.lock), - .umask =0022 , -};
fs/namespace.c +0 -60
66 lines not on this page · raw message
fs/nfsd/nfssvc.c +2 -5
@@ -404,7 +404,6 @@ static int nfsd(void *vrqstp) {struct svc_rqst *rqstp = (struct svc_rqst *) vrqstp; -struct fs_struct *fsp;int err, preverr =0 ;/* Lock module and set up kernel thread */
@@ -413,13 +412,11 @@ nfsd(void *vrqstp)/* At this point, the thread shares current->fs * with the init process. We need to create files with a * umask of 0 instead of init's umask. */ - fsp =copy_fs_struct (current->fs); -if (!fsp) { +if (unshare_fs_struct () <0 ) {printk ("Unable to start nfsd thread: out of memory\n" ); goto out; } -exit_fs (current); - current->fs = fsp; + current->fs->umask =0 ;/*
fs/proc/array.c +9 -4
@@ -80,6 +80,7 @@#include <linux/delayacct.h> #include <linux/seq_file.h> #include <linux/pid_namespace.h> +#include <linux/ptrace.h> #include <linux/tracehook.h> #include <asm/pgtable.h>
@@ -352,6 +353,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,char state;pid_t ppid =0 , pgid =-1 , sid =-1 ;int num_threads =0 ; +int permitted;struct mm_struct *mm;unsigned long long start_time;unsigned long cmin_flt =0 , cmaj_flt =0 ;
@@ -364,11 +366,14 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, state = *get_task_state (task); vsize = eip = esp =0 ; + permitted =ptrace_may_access (task,PTRACE_MODE_READ ); mm =get_task_mm (task);if (mm) { vsize =task_vsize (mm); - eip =KSTK_EIP (task); - esp =KSTK_ESP (task); +if (permitted) { + eip =KSTK_EIP (task); + esp =KSTK_ESP (task); + } }get_task_comm (tcomm, task);
@@ -424,7 +429,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,unlock_task_sighand (task, &flags); } -if (!whole || num_threads <2 ) +if (permitted && (!whole || num_threads <2 )) wchan =get_wchan (task);if (!whole) { min_flt = task->min_flt;
@@ -476,7 +481,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, rsslim, mm ? mm->start_code :0 , mm ? mm->end_code :0 , - mm ? mm->start_stack :0 , + (permitted && mm) ? mm->start_stack :0 , esp, eip,/* The signal information here is obsolete.
fs/proc/base.c +20 -35
113 lines not on this page · raw message
fs/proc/meminfo.c +1 -1
@@ -35,7 +35,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)#define K (x) ((x) << (PAGE_SHIFT - 10))si_meminfo (&i);si_swapinfo (&i); - committed =atomic_long_read (&vm_committed_space); + committed =percpu_counter_read_positive (&vm_committed_as); allowed = ((totalram_pages -hugetlb_total_pages ()) * sysctl_overcommit_ratio /100 ) + total_swap_pages;
fs/proc/task_mmu.c +4 -0
@@ -663,6 +663,10 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, goto out_task; ret =0 ; + +if (!count) + goto out_task; + mm =get_task_mm (task);if (!mm) goto out_task;
fs/proc/task_nommu.c +1 -1
@@ -49,7 +49,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)else bytes +=kobjsize (mm); -if (current->fs &&atomic_read (¤t->fs->count) >1 ) +if (current->fs && current->fs->users >1 ) sbytes +=kobjsize (current->fs);else bytes +=kobjsize (current->fs);
include/drm/drm_pciids.h +1 -0
@@ -418,4 +418,5 @@ {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ + {0x8086, 0x2e32, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ {0, 0, 0}
include/linux/fs_struct.h +5 -2
@@ -4,9 +4,10 @@#include <linux/path.h> struct fs_struct { -atomic_t count; +int users;rwlock_t lock;int umask; +int in_exec;struct path root, pwd; };
@@ -16,6 +17,8 @@ extern void exit_fs(struct task_struct *);extern void set_fs_root (struct fs_struct *,struct path *);extern void set_fs_pwd (struct fs_struct *,struct path *);extern struct fs_struct *copy_fs_struct (struct fs_struct *); -extern void put_fs_struct (struct fs_struct *); +extern void free_fs_struct (struct fs_struct *); +extern void daemonize_fs_struct (void ); +extern int unshare_fs_struct (void );#endif /* _LINUX_FS_STRUCT_H */
include/linux/genhd.h +1 -0
@@ -214,6 +214,7 @@ static inline void disk_put_part(struct hd_struct *part)#define DISK_PITER_REVERSE (1 << 0)/* iterate in the reverse direction */ #define DISK_PITER_INCL_EMPTY (1 << 1)/* include 0-sized parts */ #define DISK_PITER_INCL_PART0 (1 << 2)/* include partition 0 */ +#define DISK_PITER_INCL_EMPTY_PART0 (1 << 3)/* include empty partition 0 */ struct disk_part_iter {struct gendisk *disk;
include/linux/kvm.h +2 -0
@@ -396,6 +396,8 @@ struct kvm_trace_rec {#ifdef __KVM_HAVE_USER_NMI#define KVM_CAP_USER_NMI 22#endif +/* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ +#define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30/* * ioctls for VM fds
include/linux/mman.h +3 -6
@@ -12,21 +12,18 @@#ifdef __KERNEL__#include <linux/mm.h> +#include <linux/percpu_counter.h> #include <asm/atomic.h> extern int sysctl_overcommit_memory;extern int sysctl_overcommit_ratio; -extern atomic_long_t vm_committed_space; +extern struct percpu_counter vm_committed_as; -#ifdef CONFIG_SMP -extern void vm_acct_memory (long pages); -#else static inline void vm_acct_memory (long pages) { -atomic_long_add (pages, &vm_committed_space); +percpu_counter_add (&vm_committed_as, pages); } -#endif static inline void vm_unacct_memory (long pages) {
include/linux/pci_regs.h +1 -1
@@ -235,7 +235,7 @@#define PCI_PM_CAP_PME_SHIFT 11/* Start of the PME Mask in PMC */ #define PCI_PM_CTRL 4/* PM control and status register */ #define PCI_PM_CTRL_STATE_MASK 0x0003/* Current power state (D0 to D3) */ -#define PCI_PM_CTRL_NO_SOFT_RESET 0x0004/* No reset for D3hot->D0 */ +#define PCI_PM_CTRL_NO_SOFT_RESET 0x0008/* No reset for D3hot->D0 */ #define PCI_PM_CTRL_PME_ENABLE 0x0100/* PME pin enable */ #define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00/* Data select (??) */ #define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000/* Data scale (??) */
kernel/exec_domain.c +0 -22
@@ -145,28 +145,6 @@ __set_personality(u_long personality)return 0 ; } -if (atomic_read (¤t->fs->count) !=1 ) { -struct fs_struct *fsp, *ofsp; - - fsp =copy_fs_struct (current->fs); -if (fsp ==NULL ) { -module_put (ep->module); -return -ENOMEM ; - } - -task_lock (current); - ofsp = current->fs; - current->fs = fsp; -task_unlock (current); - -put_fs_struct (ofsp); - } - -/* -* At that point we are guaranteed to be the sole owner of -* current->fs. -*/ - current->personality = personality; oep =current_thread_info ()->exec_domain;current_thread_info ()->exec_domain = ep;
kernel/exit.c +2 -32
@@ -429,7 +429,6 @@ EXPORT_SYMBOL(disallow_signal);void daemonize (const char *name, ...) {va_list args; -struct fs_struct *fs;sigset_t blocked;va_start (args, name);
@@ -462,11 +461,7 @@ void daemonize(const char *name, ...)/* Become as one with the init task */ -exit_fs (current);/* current->fs->count--; */ - fs = init_task.fs; - current->fs = fs; -atomic_inc (&fs->count); - +daemonize_fs_struct ();exit_files (current); current->files = init_task.files;atomic_inc (¤t->files->count);
@@ -565,30 +560,6 @@ void exit_files(struct task_struct *tsk) } } -void put_fs_struct (struct fs_struct *fs) -{ -/* No need to hold fs->lock if we are killing it */ -if (atomic_dec_and_test (&fs->count)) { -path_put (&fs->root); -path_put (&fs->pwd); -kmem_cache_free (fs_cachep, fs); - } -} - -void exit_fs (struct task_struct *tsk) -{ -struct fs_struct * fs = tsk->fs; - -if (fs) { -task_lock (tsk); - tsk->fs =NULL ; -task_unlock (tsk); -put_fs_struct (fs); - } -} - -EXPORT_SYMBOL_GPL (exit_fs); -#ifdef CONFIG_MM_OWNER /* * Task p is exiting and it owned mm, lets find a new owner for it
@@ -950,8 +921,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)*/ if (tsk->exit_signal !=SIGCHLD && !task_detached (tsk) && (tsk->parent_exec_id != tsk->real_parent->self_exec_id || - tsk->self_exec_id != tsk->parent_exec_id) && - !capable (CAP_KILL )) + tsk->self_exec_id != tsk->parent_exec_id)) tsk->exit_signal =SIGCHLD ; signal =tracehook_notify_death (tsk, &cookie, group_dead);
kernel/fork.c +27 -35
92 lines not on this page · raw message
kernel/ptrace.c +2 -2
@@ -186,7 +186,7 @@ int ptrace_attach(struct task_struct *task)/* Protect exec's credential calculations against our interference; * SUID, SGID and LSM creds get determined differently under ptrace. */ - retval =mutex_lock_interruptible (¤t->cred_exec_mutex); + retval =mutex_lock_interruptible (&task->cred_exec_mutex);if (retval <0 ) goto out;
@@ -230,7 +230,7 @@ repeat: bad:write_unlock_irqrestore (&tasklist_lock, flags);task_unlock (task); -mutex_unlock (¤t->cred_exec_mutex); +mutex_unlock (&task->cred_exec_mutex); out:return retval; }
kernel/sched.c +1 -1
@@ -4347,7 +4347,7 @@ void account_process_tick(struct task_struct *p, int user_tick)if (user_tick)account_user_time (p, one_jiffy, one_jiffy_scaled); -else if (p != rq->idle) +else if ((p != rq->idle) || (irq_count () !=HARDIRQ_OFFSET ))account_system_time (p,HARDIRQ_OFFSET , one_jiffy, one_jiffy_scaled);else
kernel/time/tick-common.c +11 -1
@@ -93,7 +93,17 @@ void tick_handle_periodic(struct clock_event_device *dev)for (;;) {if (!clockevents_program_event (dev, next,ktime_get ()))return ; -tick_periodic (cpu); +/* +* Have to be careful here. If we're in oneshot mode, +* before we call tick_periodic() in a loop, we need +* to be sure we're using a real hardware clocksource. +* Otherwise we could get trapped in an infinite +* loop, as the tick_periodic() increments jiffies, +* when then will increment time, posibly causing +* the loop to trigger again and again. +*/ +if (timekeeping_valid_for_hres ()) +tick_periodic (cpu); next =ktime_add (next, tick_period); } }
mm/madvise.c +8 -0
@@ -112,6 +112,14 @@ static long madvise_willneed(struct vm_area_struct * vma,if (!file)return -EBADF ; +/* +* Page cache readahead assumes page cache pages are order-0 which +* is not the case for hugetlbfs. Do not give a bad return value +* but ignore the advice. +*/ +if (vma->vm_flags &VM_HUGETLB ) +return 0 ; +if (file->f_mapping->a_ops->get_xip_mem) {/* no bad return value, but ignore advice */ return 0 ;
mm/mmap.c +6 -6
@@ -84,7 +84,7 @@ EXPORT_SYMBOL(vm_get_page_prot);int sysctl_overcommit_memory =OVERCOMMIT_GUESS ;/* heuristic overcommit */ int sysctl_overcommit_ratio =50 ;/* default is 50% */ int sysctl_max_map_count__read_mostly =DEFAULT_MAX_MAP_COUNT ; -atomic_long_t vm_committed_space =ATOMIC_LONG_INIT (0 ); +struct percpu_counter vm_committed_as;/* * Check that a process has enough memory to allocate a new virtual
@@ -178,11 +178,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)if (mm) allowed -= mm->total_vm /32 ; -/* -* cast `allowed' as a signed long because vm_committed_space -* sometimes has a negative value -*/ -if (atomic_long_read (&vm_committed_space) < (long )allowed) +if (percpu_counter_read_positive (&vm_committed_as) < allowed)return 0 ; error:vm_unacct_memory (pages);
@@ -2477,6 +2473,10 @@ void mm_drop_all_locks(struct mm_struct *mm)*/ void __init mmap_init (void ) { +int ret; + + ret =percpu_counter_init (&vm_committed_as,0 ); +VM_BUG_ON (ret); vm_area_cachep =kmem_cache_create ("vm_area_struct" ,sizeof (struct vm_area_struct ),0 ,SLAB_PANIC ,NULL );
mm/nommu.c +7 -6
@@ -62,7 +62,7 @@ void *high_memory;struct page *mem_map;unsigned long max_mapnr;unsigned long num_physpages; -atomic_long_t vm_committed_space =ATOMIC_LONG_INIT (0 ); +struct percpu_counter vm_committed_as;int sysctl_overcommit_memory =OVERCOMMIT_GUESS ;/* heuristic overcommit */ int sysctl_overcommit_ratio =50 ;/* default is 50% */ int sysctl_max_map_count =DEFAULT_MAX_MAP_COUNT ;
@@ -463,6 +463,10 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)*/ void __init mmap_init (void ) { +int ret; + + ret =percpu_counter_init (&vm_committed_as,0 ); +VM_BUG_ON (ret); vm_region_jar =kmem_cache_create ("vm_region_jar" ,sizeof (struct vm_region ),0 ,SLAB_PANIC ,NULL );
@@ -1849,12 +1853,9 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)if (mm) allowed -= mm->total_vm /32 ; -/* -* cast `allowed' as a signed long because vm_committed_space -* sometimes has a negative value -*/ -if (atomic_long_read (&vm_committed_space) < (long )allowed) +if (percpu_counter_read_positive (&vm_committed_as) < allowed)return 0 ; + error:vm_unacct_memory (pages);
mm/swap.c +0 -46
56 lines not on this page · raw message
net/mac80211/mlme.c +1 -1
@@ -1342,7 +1342,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,for (i =0 ; i < elems.ext_supp_rates_len; i++) {int rate = (elems.ext_supp_rates[i] &0x7f ) *5 ; -bool is_basic = !!(elems.supp_rates[i] &0x80 ); +bool is_basic = !!(elems.ext_supp_rates[i] &0x80 );if (rate >110 ) have_higher_than_11mbit = true;
net/mac80211/rx.c +9 -4
@@ -29,6 +29,7 @@static u8 ieee80211_sta_manage_reorder_buf (struct ieee80211_hw *hw,struct tid_ampdu_rx *tid_agg_rx,struct sk_buff *skb, +struct ieee80211_rx_status *status,u16 mpdu_seq_num,int bar_req);/*
@@ -1538,7 +1539,7 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx)/* manage reordering buffer according to requested */ /* sequence number */ rcu_read_lock (); -ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx,NULL , +ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx,NULL ,NULL , start_seq_num,1 );rcu_read_unlock ();return RX_DROP_UNUSABLE ;
@@ -2034,6 +2035,7 @@ static inline u16 seq_sub(u16 sq1, u16 sq2)static u8 ieee80211_sta_manage_reorder_buf (struct ieee80211_hw *hw,struct tid_ampdu_rx *tid_agg_rx,struct sk_buff *skb, +struct ieee80211_rx_status *rxstatus,u16 mpdu_seq_num,int bar_req) {
@@ -2115,6 +2117,8 @@ static u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,/* put the frame in the reordering buffer */ tid_agg_rx->reorder_buf[index] = skb; +memcpy (tid_agg_rx->reorder_buf[index]->cb, rxstatus, +sizeof (*rxstatus)); tid_agg_rx->stored_mpdu_num++;/* release the buffer until next missing frame */ index =seq_sub (tid_agg_rx->head_seq_num, tid_agg_rx->ssn)
@@ -2140,7 +2144,8 @@ static u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw, }static u8 ieee80211_rx_reorder_ampdu (struct ieee80211_local *local, -struct sk_buff *skb) +struct sk_buff *skb, +struct ieee80211_rx_status *status) {struct ieee80211_hw *hw = &local->hw;struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
@@ -2191,7 +2196,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,/* according to mpdu sequence number deal with reordering buffer */ mpdu_seq_num = (sc &IEEE80211_SCTL_SEQ ) >>4 ; - ret =ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx, skb, + ret =ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx, skb, status, mpdu_seq_num,0 ); end_reorder:return ret;
@@ -2255,7 +2260,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,return ; } -if (!ieee80211_rx_reorder_ampdu (local, skb)) +if (!ieee80211_rx_reorder_ampdu (local, skb, status))__ieee80211_rx_handle_packet (hw, skb, status, rate);rcu_read_unlock ();
scripts/mod/modpost.c +1 -0
@@ -2005,6 +2005,7 @@ static void read_markers(const char *fname)if (!mod->skip)add_marker (mod, marker, fmt); } +release_file (file, size);return ; fail:fatal ("parse error in markers list file\n" );
security/selinux/hooks.c +1 -0
@@ -4661,6 +4661,7 @@ static int selinux_ip_postroute_iptables_compat(struct sock *sk,if (err)return err; err =avc_has_perm (sk_sid, if_sid,SECCLASS_NETIF , netif_perm, ad); +if (err)return err; err =sel_netnode_sid (addrp, family, &node_sid);
sound/soc/codecs/wm8580.c +1 -1
@@ -533,7 +533,7 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, reg =wm8580_read (codec,WM8580_PLLA4 + offset); reg &= ~0x3f ; reg |= pll_div.prescale | pll_div.postscale <<1 | - pll_div.freqmode <<4 ; + pll_div.freqmode <<3 ;wm8580_write (codec,WM8580_PLLA4 + offset, reg);
sound/usb/usx2y/us122l.c +10 -2
@@ -478,6 +478,14 @@ static bool us122l_create_card(struct snd_card *card)return true; } +static void snd_us122l_free (struct snd_card *card) +{ +struct us122l *us122l =US122L (card); +int index = us122l->chip.index; +if (index >=0 && index <SNDRV_CARDS ) + snd_us122l_card_used[index] =0 ; +} +static struct snd_card *usx2y_create_card (struct usb_device *device) {int dev;
@@ -492,7 +500,7 @@ static struct snd_card *usx2y_create_card(struct usb_device *device)if (!card)return NULL ; snd_us122l_card_used[US122L (card)->chip.index = dev] =1 ; - + card->private_free = snd_us122l_free;US122L (card)->chip.dev = device;US122L (card)->chip.card = card;mutex_init (&US122L (card)->mutex);
@@ -575,7 +583,7 @@ static void snd_us122l_disconnect(struct usb_interface *intf) }usb_put_intf (intf); -usb_put_dev (US122L (card)->chip.dev); +usb_put_dev (us122l->chip.dev);while (atomic_read (&us122l->mmap_count))msleep (500 );
virt/kvm/kvm_main.c +5 -6
@@ -964,6 +964,7 @@ int __kvm_set_memory_region(struct kvm *kvm,int r;gfn_t base_gfn;unsigned long npages; +int largepages;unsigned long i;struct kvm_memory_slot *memslot;struct kvm_memory_slot old, new;
@@ -1004,7 +1005,7 @@ int __kvm_set_memory_region(struct kvm *kvm,for (i =0 ; i <KVM_MEMORY_SLOTS ; ++i) {struct kvm_memory_slot *s = &kvm->memslots[i]; -if (s == memslot) +if (s == memslot || !s->npages)continue ;if (!((base_gfn + npages <= s->base_gfn) || (base_gfn >= s->base_gfn + s->npages)))
@@ -1039,11 +1040,8 @@ int __kvm_set_memory_region(struct kvm *kvm, new.userspace_addr =0 ; }if (npages && !new.lpage_info) { -int largepages = npages /KVM_PAGES_PER_HPAGE ; -if (npages %KVM_PAGES_PER_HPAGE ) - largepages++; -if (base_gfn %KVM_PAGES_PER_HPAGE ) - largepages++; + largepages =1 + (base_gfn + npages -1 ) /KVM_PAGES_PER_HPAGE ; + largepages -= base_gfn /KVM_PAGES_PER_HPAGE ; new.lpage_info =vmalloc (largepages *sizeof (*new.lpage_info));
@@ -1999,6 +1997,7 @@ static long kvm_dev_ioctl_check_extension_generic(long arg)switch (arg) {case KVM_CAP_USER_MEMORY :case KVM_CAP_DESTROY_MEMORY_REGION_WORKS : +case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS :return 1 ;default :break ;