Linux 3.0.68
Greg KH
maintainerI'm announcing the release of the 3.0.68 kernel.
All users of the 3.0 kernel series must upgrade.
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
------------
Documentation/kernel-parameters.txt | 5 ++ Makefile | 2 arch/s390/kvm/kvm-s390.c | 2 arch/x86/kernel/amd_iommu_init.c | 10 +++- arch/x86/kernel/apic/x2apic_phys.c | 17 +++++-- arch/x86/kernel/head.c | 53 ++++++++++++++-------- arch/x86/mm/fault.c | 9 ++- drivers/block/xen-blkback/xenbus.c | 49 ++++++++++----------- drivers/dca/dca-core.c | 2 drivers/firewire/core-device.c | 4 + drivers/media/rc/rc-main.c | 4 + drivers/staging/comedi/comedi_fops.c | 8 +-- drivers/staging/comedi/drivers/ni_labpc.c | 35 ++++++++------- drivers/target/target_core_fabric_configfs.c | 8 +++ drivers/vhost/vhost.c | 2 fs/ext4/mballoc.c | 6 +- fs/ocfs2/suballoc.c | 7 +-- fs/ocfs2/suballoc.h | 2 include/linux/auto_fs.h | 25 +++------- include/linux/quota.h | 1 include/linux/sched.h | 11 ++++ kernel/cgroup.c | 8 +++ kernel/cpuset.c | 12 ++++- kernel/posix-timers.c | 7 +++ kernel/ptrace.c | 63 ++++++++++++++++++++++----- kernel/sched.c | 3 - kernel/signal.c | 17 +++---- kernel/sysctl_binary.c | 3 - kernel/trace/ftrace.c | 46 +++++++++++++------ lib/idr.c | 9 +++ net/sunrpc/svc_xprt.c | 15 ------ 31 files changed, 287 insertions(+), 158 deletions(-)
Dan Carpenter (1):
media: rc: unlock on error in show_protocols()
Greg Kroah-Hartman (1):
Linux 3.0.68
H. Peter Anvin (1):
x86: Make sure we can boot in the case the BDA contains pure garbage
Helge Deller (1):
unbreak automounter support on 64-bit kernel with 32-bit userspace (v2)
Ian Abbott (3):
staging: comedi: ni_labpc: correct differential channel sequence for AI commands
staging: comedi: ni_labpc: set up command4 register *after* command3
staging: comedi: check s->async for poll(), read() and write()
J. Bruce Fields (1):
svcrpc: make svc_age_temp_xprts enqueue under sv_lock
Jan Beulich (1):
xen-blkback: do not leak mode property
Jiri Slaby (2):
dca: check against empty dca_domains list before unregister provider fix s390/kvm: Fix store status for ACRS/FPRS fix
Joerg Roedel (1):
iommu/amd: Initialize device table after dma_ops
Kees Cook (1):
x86: Do not leak kernel page mapping locations
Konrad Rzeszutek Wilk (2):
doc, xen: Mention 'earlyprintk=xen' in the documentation. doc, kernel-parameters: Document 'console=hvc<n>'
Li Zefan (2):
cpuset: fix cpuset_print_task_mems_allowed() vs rename() race
cgroup: fix exit() vs rmdir() race
Michael S. Tsirkin (1):
vhost: fix length for cross region descriptor
Nicholas Bellinger (1):
target: Add missing mapped_lun bounds checking during make_mappedlun setup
Niu Yawei (1):
ext4: fix race in ext4_mb_add_n_trim()
Oleg Nesterov (3):
ptrace: introduce signal_wake_up_state() and ptrace_signal_wake_up()
ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED task
Steven Rostedt (Red Hat) (1):
ftrace: Call ftrace cleanup module notifier after all other notifiers
Stoney Wang (1):
x86/apic: Work around boot failure on HP ProLiant DL980 G7 Server systems
Tejun Heo (3):
posix-timer: Don't call idr_find() with out-of-range ID
idr: fix a subtle bug in idr_get_next()
firewire: add minor number range check to fw_device_init()
Theodore Ts'o (1):
quota: autoload the quota_v2 module for QFMT_VFS_V1 quota format
Xi Wang (1):
sysctl: fix null checking in bin_dn_node_address()
Xiaowei.Hu (1):
ocfs2: ac->ac_allow_chain_relink=0 won't disable group relink
Greg KH
maintainerDocumentation/kernel-parameters.txt +5 -0
@@ -531,6 +531,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. UART at the specified I/O port or MMIO address, switching to the matching ttyS device later. The options are the same as for ttyS, above. + hvc<n> Use the hypervisor console device <n>. This is for + both Xen and PowerPC hypervisors. If the device connected to the port is not a TTY but a braille device, prepend "brl," before the device type, for instance
@@ -679,6 +681,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. earlyprintk= [X86,SH,BLACKFIN] earlyprintk=vga + earlyprintk=xen earlyprintk=serial[,ttySn[,baudrate]] earlyprintk=ttySn[,baudrate] earlyprintk=dbgp[debugController#]
@@ -696,6 +699,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. The VGA output is eventually overwritten by the real console. + The xen output can only be used by Xen PV guests. + ekgdboc= [X86,KGDB] Allow early kernel console debugging ekgdboc=kbd
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 67 +SUBLEVEL = 68 EXTRAVERSION = NAME = Sneaky Weasel
arch/s390/kvm/kvm-s390.c +1 -1
@@ -590,7 +590,7 @@ int kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr)* it into the save area */ save_fp_regs (&vcpu->arch.guest_fpregs); -save_access_regs (vcpu->run->s.regs.acrs); +save_access_regs (vcpu->arch.guest_acrs);if (__guestcopy (vcpu, addr + offsetof(struct save_area , fp_regs), vcpu->arch.guest_fpregs.fprs,128 , prefix))
arch/x86/kernel/amd_iommu_init.c +7 -3
@@ -1363,6 +1363,7 @@ static struct syscore_ops amd_iommu_syscore_ops = {*/ static int __init amd_iommu_init (void ) { +struct amd_iommu *iommu;int i, ret =0 ;/*
@@ -1411,9 +1412,6 @@ static int __init amd_iommu_init(void)if (amd_iommu_pd_alloc_bitmap ==NULL ) goto free; -/* init the device table */ -init_device_table (); -/* * let all alias entries point to itself */
@@ -1463,6 +1461,12 @@ static int __init amd_iommu_init(void)if (ret) goto free_disable; +/* init the device table */ +init_device_table (); + +for_each_iommu (iommu) +iommu_flush_all_caches (iommu); +amd_iommu_init_api ();amd_iommu_init_notifier ();
arch/x86/kernel/apic/x2apic_phys.c +12 -5
@@ -20,12 +20,19 @@ static int set_x2apic_phys_mode(char *arg) }early_param ("x2apic_phys" , set_x2apic_phys_mode); +static bool x2apic_fadt_phys (void ) +{ +if ((acpi_gbl_FADT.header.revision >=FADT2_REVISION_ID ) && + (acpi_gbl_FADT.flags &ACPI_FADT_APIC_PHYSICAL )) { +printk (KERN_DEBUG "System requires x2apic physical mode\n" ); +return true; + } +return false; +} +static int x2apic_acpi_madt_oem_check (char *oem_id,char *oem_table_id) { -if (x2apic_phys) -return x2apic_enabled (); -else -return 0 ; +return x2apic_enabled () && (x2apic_phys ||x2apic_fadt_phys ()); } static void
@@ -108,7 +115,7 @@ static void init_x2apic_ldr(void)static int x2apic_phys_probe (void ) { -if (x2apic_mode && x2apic_phys) +if (x2apic_mode && (x2apic_phys ||x2apic_fadt_phys ()))return 1 ;return apic == &apic_x2apic_phys;
arch/x86/kernel/head.c +34 -19
78 lines not on this page · raw message
arch/x86/mm/fault.c +6 -3
@@ -720,12 +720,15 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,if (is_errata100 (regs, address))return ; -if (unlikely (show_unhandled_signals)) +/* Kernel addresses are always protection faults: */ +if (address >=TASK_SIZE ) + error_code |=PF_PROT ; + +if (likely (show_unhandled_signals))show_signal_msg (regs, error_code, address, tsk); -/* Kernel addresses are always protection faults: */ tsk->thread.cr2 = address; - tsk->thread.error_code = error_code | (address >=TASK_SIZE ); + tsk->thread.error_code = error_code; tsk->thread.trap_no =14 ;force_sig_info_fault (SIGSEGV , si_code, address, tsk,0 );
drivers/block/xen-blkback/xenbus.c +24 -25
82 lines not on this page · raw message
drivers/dca/dca-core.c +1 -1
@@ -410,7 +410,7 @@ void unregister_dca_provider(struct dca_provider *dca, struct device *dev)spin_lock_irqsave (&dca_lock, flags);if (list_empty (&dca_domains)) { -raw_spin_unlock_irqrestore (&dca_lock, flags); +spin_unlock_irqrestore (&dca_lock, flags);return ; }
drivers/firewire/core-device.c +4 -0
@@ -995,6 +995,10 @@ static void fw_device_init(struct work_struct *work) ret =idr_pre_get (&fw_device_idr,GFP_KERNEL ) ?idr_get_new (&fw_device_idr, device, &minor) : -ENOMEM ; +if (minor >=1 <<MINORBITS ) { +idr_remove (&fw_device_idr, minor); + minor = -ENOSPC ; + }up_write (&fw_device_rwsem);if (ret <0 )
drivers/media/rc/rc-main.c +3 -1
@@ -775,8 +775,10 @@ static ssize_t show_protocols(struct device *device, }else if (dev->raw) { enabled = dev->raw->enabled_protocols; allowed =ir_raw_get_allowed_protocols (); - }else + }else { +mutex_unlock (&dev->lock);return -ENODEV ; + } IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", (long long)allowed,
drivers/staging/comedi/comedi_fops.c +4 -4
@@ -1577,7 +1577,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) mask =0 ; read_subdev =comedi_get_read_subdevice (dev_file_info); -if (read_subdev) { +if (read_subdev && read_subdev->async) {poll_wait (file, &read_subdev->async->wait_head, wait);if (!read_subdev->busy || comedi_buf_read_n_available(read_subdev->async) > 0
@@ -1587,7 +1587,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) } } write_subdev =comedi_get_write_subdevice (dev_file_info); -if (write_subdev) { +if (write_subdev && write_subdev->async) {poll_wait (file, &write_subdev->async->wait_head, wait);comedi_buf_write_alloc (write_subdev->async, write_subdev->async->prealloc_bufsz);
@@ -1629,7 +1629,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf, } s =comedi_get_write_subdevice (dev_file_info); -if (s ==NULL ) { +if (s ==NULL || s->async ==NULL ) { retval = -EIO ; goto done; }
@@ -1740,7 +1740,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes, } s =comedi_get_read_subdevice (dev_file_info); -if (s ==NULL ) { +if (s ==NULL || s->async ==NULL ) { retval = -EIO ; goto done; }
drivers/staging/comedi/drivers/ni_labpc.c +19 -16
@@ -1241,7 +1241,9 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)else channel =CR_CHAN (cmd->chanlist[0 ]);/* munge channel bits for differential / scan disabled mode */ -if (labpc_ai_scan_mode (cmd) !=MODE_SINGLE_CHAN && aref ==AREF_DIFF ) +if ((labpc_ai_scan_mode (cmd) ==MODE_SINGLE_CHAN || +labpc_ai_scan_mode (cmd) ==MODE_SINGLE_CHAN_INTERVAL ) && + aref ==AREF_DIFF ) channel *=2 ; devpriv->command1_bits |=ADC_CHAN_BITS (channel); devpriv->command1_bits |= thisboard->ai_range_code[range];
@@ -1257,21 +1259,6 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->write_byte (devpriv->command1_bits, dev->iobase +COMMAND1_REG ); } -/* setup any external triggering/pacing (command4 register) */ - devpriv->command4_bits =0 ; -if (cmd->convert_src !=TRIG_EXT ) - devpriv->command4_bits |=EXT_CONVERT_DISABLE_BIT ; -/* XXX should discard first scan when using interval scanning -* since manual says it is not synced with scan clock */ -if (labpc_use_continuous_mode (cmd) ==0 ) { - devpriv->command4_bits |=INTERVAL_SCAN_EN_BIT ; -if (cmd->scan_begin_src ==TRIG_EXT ) - devpriv->command4_bits |=EXT_SCAN_EN_BIT ; - } -/* single-ended/differential */ -if (aref ==AREF_DIFF ) - devpriv->command4_bits |=ADC_DIFF_BIT ; - devpriv->write_byte (devpriv->command4_bits, dev->iobase +COMMAND4_REG ); devpriv->write_byte (cmd->chanlist_len, dev->iobase +INTERVAL_COUNT_REG );
@@ -1349,6 +1336,22 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->command3_bits &= ~ADC_FNE_INTR_EN_BIT ; devpriv->write_byte (devpriv->command3_bits, dev->iobase +COMMAND3_REG ); +/* setup any external triggering/pacing (command4 register) */ + devpriv->command4_bits =0 ; +if (cmd->convert_src !=TRIG_EXT ) + devpriv->command4_bits |=EXT_CONVERT_DISABLE_BIT ; +/* XXX should discard first scan when using interval scanning +* since manual says it is not synced with scan clock */ +if (labpc_use_continuous_mode (cmd) ==0 ) { + devpriv->command4_bits |=INTERVAL_SCAN_EN_BIT ; +if (cmd->scan_begin_src ==TRIG_EXT ) + devpriv->command4_bits |=EXT_SCAN_EN_BIT ; + } +/* single-ended/differential */ +if (aref ==AREF_DIFF ) + devpriv->command4_bits |=ADC_DIFF_BIT ; + devpriv->write_byte (devpriv->command4_bits, dev->iobase +COMMAND4_REG ); +/* startup acquisition */ /* command2 reg */
drivers/target/target_core_fabric_configfs.c +8 -0
@@ -355,6 +355,14 @@ static struct config_group *target_fabric_make_mappedlun( ret = -EINVAL ; goto out; } +if (mapped_lun > (TRANSPORT_MAX_LUNS_PER_TPG -1 )) { +pr_err ("Mapped LUN: %lu exceeds TRANSPORT_MAX_LUNS_PER_TPG" +"-1: %u for Target Portal Group: %u\n" , mapped_lun, +TRANSPORT_MAX_LUNS_PER_TPG -1 , + se_tpg->se_tpg_tfo->tpg_get_tag (se_tpg)); + ret = -EINVAL ; + goto out; + } lacl =core_dev_init_initiator_node_lun_acl (se_tpg, mapped_lun,config_item_name (acl_ci), &ret);
drivers/vhost/vhost.c +1 -1
@@ -986,7 +986,7 @@ static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len, } _iov = iov + ret; size = reg->memory_size - addr + reg->guest_phys_addr; - _iov->iov_len =min ((u64 )len, size); + _iov->iov_len =min ((u64 )len - s, size); _iov->iov_base = (void __user *)(unsigned long ) (reg->userspace_addr + addr - reg->guest_phys_addr); s += size;
fs/ext4/mballoc.c +3 -3
@@ -4111,7 +4111,7 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)/* The max size of hash table is PREALLOC_TB_SIZE */ order =PREALLOC_TB_SIZE -1 ;/* Add the prealloc space to lg */ -rcu_read_lock (); +spin_lock (&lg->lg_prealloc_lock);list_for_each_entry_rcu (tmp_pa, &lg->lg_prealloc_list[order], pa_inode_list) {spin_lock (&tmp_pa->pa_lock);
@@ -4135,12 +4135,12 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)if (!added)list_add_tail_rcu (&pa->pa_inode_list, &lg->lg_prealloc_list[order]); -rcu_read_unlock (); +spin_unlock (&lg->lg_prealloc_lock);/* Now trim the list to be not more than 8 elements */ if (lg_prealloc_count >8 ) {ext4_mb_discard_lg_preallocations (sb, lg, - order, lg_prealloc_count); + order, lg_prealloc_count);return ; }return ;
fs/ocfs2/suballoc.c +3 -4
@@ -642,7 +642,7 @@ ocfs2_block_group_alloc_discontig(handle_t *handle,* cluster groups will be staying in cache for the duration of * this operation. */ - ac->ac_allow_chain_relink =0 ; + ac->ac_disable_chain_relink =1 ;/* Claim the first region */ status = ocfs2_block_group_claim_bits(osb, handle, ac, min_bits,
@@ -1823,7 +1823,7 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,* Do this *after* figuring out how many bits we're taking out * of our target group. */ -if (ac->ac_allow_chain_relink && +if (!ac->ac_disable_chain_relink && (prev_group_bh) && (ocfs2_block_group_reasonably_empty (bg, res->sr_bits))) { status = ocfs2_relink_block_group(handle, alloc_inode,
@@ -1928,7 +1928,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, victim =ocfs2_find_victim_chain (cl); ac->ac_chain = victim; - ac->ac_allow_chain_relink =1 ; status =ocfs2_search_chain (ac, handle, bits_wanted, min_bits, res, &bits_left);
@@ -1947,7 +1946,7 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,* searching each chain in order. Don't allow chain relinking * because we only calculate enough journal credits for one * relink per alloc. */ - ac->ac_allow_chain_relink =0 ; + ac->ac_disable_chain_relink =1 ;for (i =0 ; i <le16_to_cpu (cl->cl_next_free_rec); i ++) {if (i == victim)continue ;
fs/ocfs2/suballoc.h +1 -1
@@ -49,7 +49,7 @@ struct ocfs2_alloc_context {/* these are used by the chain search */ u16 ac_chain; -int ac_allow_chain_relink; +int ac_disable_chain_relink;group_search_t *ac_group_search;u64 ac_last_group;
include/linux/auto_fs.h +8 -17
@@ -31,25 +31,16 @@#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION/* -* Architectures where both 32- and 64-bit binaries can be executed -* on 64-bit kernels need this. This keeps the structure format -* uniform, and makes sure the wait_queue_token isn't too big to be -* passed back down to the kernel. -* -* This assumes that on these architectures: -* mode 32 bit 64 bit -* ------------------------- -* int 32 bit 32 bit -* long 32 bit 64 bit -* -* If so, 32-bit user-space code should be backwards compatible. +* The wait_queue_token (autofs_wqt_t) is part of a structure which is passed +* back to the kernel via ioctl from userspace. On architectures where 32- and +* 64-bit userspace binaries can be executed it's important that the size of +* autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we +* do not break the binary ABI interface by changing the structure size. */ - -#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \ - || defined(__powerpc__) || defined(__s390__) -typedef unsigned int autofs_wqt_t ; -#else +#if defined(__ia64__) || defined(__alpha__)/* pure 64bit architectures */ typedef unsigned long autofs_wqt_t ; +#else +typedef unsigned int autofs_wqt_t ;#endif /* Packet types */
include/linux/quota.h +1 -0
@@ -413,6 +413,7 @@ struct quota_module_name {#define INIT_QUOTA_MODULE_NAMES {\ {QFMT_VFS_OLD, "quota_v1"},\ {QFMT_VFS_V0, "quota_v2"},\ + {QFMT_VFS_V1, "quota_v2"},\ {0, NULL}}#else
include/linux/sched.h +10 -1
@@ -2564,7 +2564,16 @@ static inline void thread_group_cputime_init(struct signal_struct *sig)extern void recalc_sigpending_and_wake (struct task_struct *t);extern void recalc_sigpending (void ); -extern void signal_wake_up (struct task_struct *t,int resume_stopped); +extern void signal_wake_up_state (struct task_struct *t,unsigned int state); + +static inline void signal_wake_up (struct task_struct *t,bool resume) +{ +signal_wake_up_state (t, resume ?TASK_WAKEKILL :0 ); +} +static inline void ptrace_signal_wake_up (struct task_struct *t,bool resume) +{ +signal_wake_up_state (t, resume ? __TASK_TRACED :0 ); +}/* * Wrappers for p->thread_info->cpu access. No-op on UP.
kernel/cgroup.c +8 -0
@@ -359,12 +359,20 @@ static void __put_css_set(struct css_set *cg, int taskexit)struct cgroup *cgrp = link->cgrp;list_del (&link->cg_link_list);list_del (&link->cgrp_link_list); + +/* +* We may not be holding cgroup_mutex, and if cgrp->count is +* dropped to 0 the cgroup can be destroyed at any time, hence +* rcu_read_lock is used to keep it alive. +*/ +rcu_read_lock ();if (atomic_dec_and_test (&cgrp->count) &¬ify_on_release (cgrp)) {if (taskexit)set_bit (CGRP_RELEASABLE , &cgrp->flags);check_for_release (cgrp); } +rcu_read_unlock ();kfree (link); }
kernel/cpuset.c +10 -2
@@ -2499,8 +2499,16 @@ void cpuset_print_task_mems_allowed(struct task_struct *tsk) dentry =task_cs (tsk)->css.cgroup->dentry;spin_lock (&cpuset_buffer_lock); -snprintf (cpuset_name,CPUSET_NAME_LEN , - dentry ? (const char *)dentry->d_name.name :"/" ); + +if (!dentry) { +strcpy (cpuset_name,"/" ); + }else { +spin_lock (&dentry->d_lock); +strlcpy (cpuset_name, (const char *)dentry->d_name.name, +CPUSET_NAME_LEN ); +spin_unlock (&dentry->d_lock); + } +nodelist_scnprintf (cpuset_nodelist,CPUSET_NODELIST_LEN , tsk->mems_allowed); printk(KERN_INFO "%s cpuset=%s mems_allowed=%s\n",
kernel/posix-timers.c +7 -0
@@ -639,6 +639,13 @@ static struct k_itimer *__lock_timer(timer_t timer_id, unsigned long *flags) {struct k_itimer *timr; +/* +* timer_t could be any type >= int and we want to make sure any +* @timer_id outside positive int range fails lookup. +*/ +if ((unsigned long long )timer_id >INT_MAX ) +return NULL ; +rcu_read_lock (); timr =idr_find (&posix_timers_id, (int )timer_id);if (timr) {
kernel/ptrace.c +52 -11
109 lines not on this page · raw message
kernel/sched.c +2 -1
@@ -2778,7 +2778,8 @@ out:*/ int wake_up_process (struct task_struct *p) { -return try_to_wake_up (p,TASK_ALL ,0 ); +WARN_ON (task_is_stopped_or_traced (p)); +return try_to_wake_up (p,TASK_NORMAL ,0 ); }EXPORT_SYMBOL (wake_up_process);
kernel/signal.c +8 -9
@@ -631,23 +631,17 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)* No need to set need_resched since signal event passing * goes through ->blocked */ -void signal_wake_up (struct task_struct *t,int resume) +void signal_wake_up_state (struct task_struct *t,unsigned int state) { -unsigned int mask; -set_tsk_thread_flag (t,TIF_SIGPENDING ); -/* -* For SIGKILL, we want to wake it up in the stopped/traced/killable +* TASK_WAKEKILL also means wake it up in the stopped/traced/killable * case. We don't check t->state here because there is a race with it * executing another processor and just now entering stopped state. * By using wake_up_state, we ensure the process will wake up and * handle its death signal. */ - mask =TASK_INTERRUPTIBLE ; -if (resume) - mask |=TASK_WAKEKILL ; -if (!wake_up_state (t, mask)) +if (!wake_up_state (t, state |TASK_INTERRUPTIBLE ))kick_process (t); }
@@ -1675,6 +1669,10 @@ static inline int may_ptrace_stop(void)* If SIGKILL was already sent before the caller unlocked * ->siglock we must see ->core_state != NULL. Otherwise it * is safe to enter schedule(). +* +* This is almost outdated, a task with the pending SIGKILL can't +* block in TASK_TRACED. But PTRACE_EVENT_EXIT can be reported +* after SIGKILL was already dequeued. */ if (unlikely (current->mm->core_state) &&unlikely (current->mm == current->parent->mm))
@@ -1806,6 +1804,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)if (gstop_done)do_notify_parent_cldstop (current, false, why); +/* tasklist protects us from ptrace_freeze_traced() */ __set_current_state (TASK_RUNNING );if (clear_code) current->exit_code =0 ;
kernel/sysctl_binary.c +2 -1
@@ -1194,9 +1194,10 @@ static ssize_t bin_dn_node_address(struct file *file,/* Convert the decnet address to binary */ result = -EIO ; - nodep =strchr (buf,'.' ) +1 ; + nodep =strchr (buf,'.' );if (!nodep) goto out; + ++nodep; area =simple_strtoul (buf,NULL ,10 ); node =simple_strtoul (nodep,NULL ,10 );
kernel/trace/ftrace.c +32 -14
78 lines not on this page · raw message
lib/idr.c +8 -1
@@ -621,7 +621,14 @@ void *idr_get_next(struct idr *idp, int *nextidp)return p; } - id +=1 << n; +/* +* Proceed to the next layer at the current level. Unlike +* idr_for_each(), @id isn't guaranteed to be aligned to +* layer boundary at this point and adding 1 << n may +* incorrectly skip IDs. Make sure we jump to the +* beginning of the next layer using round_up(). +*/ + id =round_up (id +1 ,1 << n);while (n <fls (id)) { n +=IDR_BITS ; p = *--paa;
net/sunrpc/svc_xprt.c +2 -13
@@ -824,7 +824,6 @@ static void svc_age_temp_xprts(unsigned long closure)struct svc_serv *serv = (struct svc_serv *)closure;struct svc_xprt *xprt;struct list_head *le, *next; -LIST_HEAD (to_be_aged);dprintk ("svc_age_temp_xprts\n" );
@@ -845,25 +844,15 @@ static void svc_age_temp_xprts(unsigned long closure)if (atomic_read (&xprt->xpt_ref.refcount) >1 ||test_bit (XPT_BUSY , &xprt->xpt_flags))continue ; -svc_xprt_get (xprt); -list_move (le, &to_be_aged); +list_del_init (le);set_bit (XPT_CLOSE , &xprt->xpt_flags);set_bit (XPT_DETACHED , &xprt->xpt_flags); - } -spin_unlock_bh (&serv->sv_lock); - -while (!list_empty (&to_be_aged)) { - le = to_be_aged.next; -/* fiddling the xpt_list node is safe 'cos we're XPT_DETACHED */ -list_del_init (le); - xprt = list_entry(le, struct svc_xprt, xpt_list); -dprintk ("queuing xprt %p for closing\n" , xprt);/* a thread will dequeue and close it soon */ svc_xprt_enqueue (xprt); -svc_xprt_put (xprt); } +spin_unlock_bh (&serv->sv_lock);mod_timer (&serv->sv_temptimer, jiffies + svc_conn_age_period *HZ ); }