Linux 2.6.33.14
Subsystems (12)
I'm announcing the release of the 2.6.33.14 kernel.
This is primarily for the use of those people who are stuck using the .33-rt kernel. Anyone else who really wants to use the .33 kernel tree is welcome to use this one as well.
I'll be maintaining it for a while longer as it looks like the -rt tree isn't moving forward to any newer kernel any time soon.
The updated 2.6.33.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.33.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/longterm/linux-2.6.33.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 - arch/x86/include/asm/apicdef.h | 1 arch/x86/kernel/cpu/amd.c | 4 +-- arch/x86/kernel/cpu/mcheck/mce_amd.c | 1 arch/x86/kernel/cpu/mcheck/therm_throt.c | 12 ++++++---- arch/x86/kernel/ptrace.c | 36 ++++++++++++++++++++++--------- drivers/net/Makefile | 6 ++--- drivers/net/ehea/ehea_ethtool.c | 21 +++++++++++------- drivers/net/hydra.c | 14 ++++++------ drivers/net/ne-h8300.c | 16 ++++++------- drivers/net/slip.c | 4 ++- drivers/net/vmxnet3/vmxnet3_ethtool.c | 3 ++ drivers/net/wireless/libertas/cmd.c | 6 +++-- drivers/net/zorro8390.c | 12 +++++----- drivers/scsi/megaraid/megaraid_sas.c | 3 ++ firmware/Makefile | 2 - fs/cifs/connect.c | 10 ++++++-- fs/cifs/sess.c | 4 ++- fs/partitions/efi.c | 6 +++++ include/linux/ptrace.h | 13 ++++++++++- include/linux/sched.h | 3 ++ kernel/exit.c | 2 - kernel/ptrace.c | 17 ++++++++++++++ kernel/time/clocksource.c | 2 - kernel/time/tick-broadcast.c | 12 +++++++++- net/dccp/options.c | 2 + scripts/mkmakefile | 4 ++- 27 files changed, 156 insertions(+), 62 deletions(-)
Bjørn Mork (1):
megaraid_sas: Sanity check user supplied length before passing it to dma_alloc_coherent()
Borislav Petkov (2):
Revert "x86, AMD: Fix APIC timer erratum 400 affecting K8 Rev.A-E processors" x86, AMD: Fix ARAT feature setting again
Dan Rosenberg (1):
dccp: handle invalid feature options length
Frederic Weisbecker (2):
x86, hw_breakpoints: Fix racy access to ptrace breakpoints
ptrace: Prepare to fix racy accesses on task breakpoints
Geert Uytterhoeven (3):
ne-h8300: Fix regression caused during net_device_ops conversion
hydra: Fix regression caused during net_device_ops conversion
zorro8390: Fix regression caused during net_device_ops conversion
Greg Kroah-Hartman (1):
Linux 2.6.33.14
Jan Beulich (1):
fixes for using make 3.82
Jeff Layton (2):
cifs: check for bytes_remaining going to zero in CIFS_SessSetup
cifs: add fallback in is_path_accessible for old servers
John Stultz (1):
clocksource: Install completely before selecting
Julia Lawall (1):
x86, mce, AMD: Fix leaving freed data in a list
Kleber Sacilotto de Souza (1):
ehea: fix wrongly reported speed and port
Matvejchikov Ilya (1):
NET: slip, fix ldisc->open retval
Paul Fox (1):
libertas: fix cmdpendingq locking
Pavel Shilovsky (1):
CIFS: Fix memory over bound bug in cifs_parse_mount_options
Thomas Gleixner (1):
tick: Clear broadcast active bit when switching to oneshot
Thomas Jarosch (1):
vmxnet3: Fix inconsistent LRO state after initialization
Timo Warns (1):
Validate size of EFI GUID partition entries.
Youquan Song (1):
x86, apic: Fix spurious error interrupts triggering on all non-boot APs
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 33 -EXTRAVERSION = .13 +EXTRAVERSION = .14 NAME = Man-Eating Seals of Antiquity # *DOCUMENTATION*
arch/x86/include/asm/apicdef.h +1 -0
@@ -78,6 +78,7 @@#define APIC_DEST_LOGICAL 0x00800#define APIC_DEST_PHYSICAL 0x00000#define APIC_DM_FIXED 0x00000 +#define APIC_DM_FIXED_MASK 0x00700#define APIC_DM_LOWEST 0x00100#define APIC_DM_SMI 0x00200#define APIC_DM_REMRD 0x00300
arch/x86/kernel/cpu/amd.c +2 -2
@@ -566,7 +566,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)#endif /* As a rule processors have APIC timer running in deep C states */ -if (c->x86 >=0xf && !cpu_has_amd_erratum (amd_erratum_400)) +if (c->x86 >0xf && !cpu_has_amd_erratum (amd_erratum_400))set_cpu_cap (c,X86_FEATURE_ARAT );/*
@@ -651,7 +651,7 @@ cpu_dev_register(amd_cpu_dev);*/ const int amd_erratum_400[] = -AMD_OSVW_ERRATUM (1 ,AMD_MODEL_RANGE (0x0f ,0x4 ,0x2 ,0xff ,0xf ), +AMD_OSVW_ERRATUM (1 ,AMD_MODEL_RANGE (0xf ,0x41 ,0x2 ,0xff ,0xf ),AMD_MODEL_RANGE (0x10 ,0x2 ,0x1 ,0xff ,0xf ));
arch/x86/kernel/cpu/mcheck/mce_amd.c +1 -0
@@ -468,6 +468,7 @@ recurse: out_free:if (b) {kobject_put (&b->kobj); +list_del (&b->miscj);kfree (b); }return err;
arch/x86/kernel/cpu/mcheck/therm_throt.c +7 -5
@@ -293,18 +293,20 @@ void intel_init_thermal(struct cpuinfo_x86 *c)*/ rdmsr (MSR_IA32_MISC_ENABLE , l, h); + h = lvtthmr_init;/* * The initial value of thermal LVT entries on all APs always reads * 0x10000 because APs are woken up by BSP issuing INIT-SIPI-SIPI * sequence to them and LVT registers are reset to 0s except for * the mask bits which are set to 1s when APs receive INIT IPI. -* Always restore the value that BIOS has programmed on AP based on -* BSP's info we saved since BIOS is always setting the same value -* for all threads/cores +* If BIOS takes over the thermal interrupt and sets its interrupt +* delivery mode to SMI (not fixed), it restores the value that the +* BIOS has programmed on AP based on BSP's info we saved since BIOS +* is always setting the same value for all threads/cores. */ -apic_write (APIC_LVTTHMR , lvtthmr_init); +if ((h &APIC_DM_FIXED_MASK ) !=APIC_DM_FIXED ) +apic_write (APIC_LVTTHMR , lvtthmr_init); - h = lvtthmr_init;if ((l &MSR_IA32_MISC_ENABLE_TM1 ) && (h &APIC_DM_SMI )) { printk(KERN_DEBUG
arch/x86/kernel/ptrace.c +26 -10
@@ -635,6 +635,9 @@ static int ptrace_write_dr7(struct task_struct *tsk, unsigned long data)unsigned len, type;struct perf_event *bp; +if (ptrace_get_breakpoints (tsk) <0 ) +return -ESRCH ; + data &= ~DR_CONTROL_RESERVED ; old_dr7 =ptrace_get_dr7 (thread->ptrace_bps); restore:
@@ -682,6 +685,9 @@ restore: } goto restore; } + +ptrace_put_breakpoints (tsk); +return ((orig_ret <0 ) ? orig_ret : rc); }
@@ -695,10 +701,17 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)if (n <HBP_NUM ) {struct perf_event *bp; + +if (ptrace_get_breakpoints (tsk) <0 ) +return -ESRCH ; + bp = thread->ptrace_bps[n];if (!bp) -return 0 ; - val = bp->hw.info.address; + val =0 ; +else + val = bp->hw.info.address; + +ptrace_put_breakpoints (tsk); }else if (n ==6 ) { val = thread->debugreg6; }else if (n ==7 ) {
@@ -713,6 +726,10 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,struct perf_event *bp;struct thread_struct *t = &tsk->thread;struct perf_event_attr attr; +int err =0 ; + +if (ptrace_get_breakpoints (tsk) <0 ) +return -ESRCH ;if (!t->ptrace_bps[nr]) {hw_breakpoint_init (&attr);
@@ -736,24 +753,23 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,* writing for the user. And anyway this is the previous * behaviour. */ -if (IS_ERR (bp)) -return PTR_ERR (bp); +if (IS_ERR (bp)) { + err =PTR_ERR (bp); + goto put; + } t->ptrace_bps[nr] = bp; }else { -int err; - bp = t->ptrace_bps[nr]; attr = bp->attr; attr.bp_addr = addr; err =modify_user_hw_breakpoint (bp, &attr); -if (err) -return err; } - -return 0 ; +put: +ptrace_put_breakpoints (tsk); +return err; }/*
drivers/net/Makefile +3 -3
@@ -138,7 +138,7 @@ obj-$(CONFIG_NE3210) += ne3210.o 8390.o obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o obj-$(CONFIG_B44) += b44.o obj-$(CONFIG_FORCEDETH) += forcedeth.o -obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o +obj-$(CONFIG_NE_H8300) += ne-h8300.o obj-$(CONFIG_AX88796) += ax88796.o obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o
@@ -208,7 +208,7 @@ obj-$(CONFIG_SC92031) += sc92031.o obj-$(CONFIG_LP486E) += lp486e.o obj-$(CONFIG_ETH16I) += eth16i.o -obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o +obj-$(CONFIG_ZORRO8390) += zorro8390.o obj-$(CONFIG_HPLANCE) += hplance.o 7990.o obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o obj-$(CONFIG_EQUALIZER) += eql.o
@@ -220,7 +220,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o obj-$(CONFIG_DECLANCE) += declance.o obj-$(CONFIG_ATARILANCE) += atarilance.o obj-$(CONFIG_A2065) += a2065.o -obj-$(CONFIG_HYDRA) += hydra.o 8390.o +obj-$(CONFIG_HYDRA) += hydra.o obj-$(CONFIG_ARIADNE) += ariadne.o obj-$(CONFIG_CS89x0) += cs89x0.o obj-$(CONFIG_MACSONIC) += macsonic.o
drivers/net/ehea/ehea_ethtool.c +13 -8
@@ -53,15 +53,20 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) cmd->duplex =-1 ; } - cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full - | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half - | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half - | SUPPORTED_Autoneg |SUPPORTED_FIBRE ); - - cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg - |ADVERTISED_FIBRE ); +if (cmd->speed ==SPEED_10000 ) { + cmd->supported = (SUPPORTED_10000baseT_Full |SUPPORTED_FIBRE ); + cmd->advertising = (ADVERTISED_10000baseT_Full |ADVERTISED_FIBRE ); + cmd->port =PORT_FIBRE ; + }else { + cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full + | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full + | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg + |SUPPORTED_TP ); + cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg + |ADVERTISED_TP ); + cmd->port =PORT_TP ; + } - cmd->port =PORT_FIBRE ; cmd->autoneg = port->autoneg ==1 ?AUTONEG_ENABLE :AUTONEG_DISABLE ;return 0 ;
drivers/net/hydra.c +7 -7
@@ -98,15 +98,15 @@ static const struct net_device_ops hydra_netdev_ops = { .ndo_open = hydra_open, .ndo_stop = hydra_close, - .ndo_start_xmit = ei_start_xmit, - .ndo_tx_timeout = ei_tx_timeout, - .ndo_get_stats = ei_get_stats, - .ndo_set_multicast_list = ei_set_multicast_list, + .ndo_start_xmit = __ei_start_xmit, + .ndo_tx_timeout = __ei_tx_timeout, + .ndo_get_stats = __ei_get_stats, + .ndo_set_multicast_list = __ei_set_multicast_list, .ndo_validate_addr = eth_validate_addr, - .ndo_set_mac_address = eth_mac_addr, + .ndo_set_mac_address = eth_mac_addr, .ndo_change_mtu = eth_change_mtu, #ifdef CONFIG_NET_POLL_CONTROLLER - .ndo_poll_controller = ei_poll, + .ndo_poll_controller = __ei_poll, #endif };
@@ -125,7 +125,7 @@ static int __devinit hydra_init(struct zorro_dev *z)0x10 ,0x12 ,0x14 ,0x16 ,0x18 ,0x1a ,0x1c ,0x1e , }; - dev =alloc_ei_netdev (); + dev =____alloc_ei_netdev (0 );if (!dev)return -ENOMEM ;
drivers/net/ne-h8300.c +8 -8
@@ -167,7 +167,7 @@ static void cleanup_card(struct net_device *dev)#ifndef MODULE struct net_device *__init ne_probe (int unit) { -struct net_device *dev =alloc_ei_netdev (); +struct net_device *dev =____alloc_ei_netdev (0 );int err;if (!dev)
@@ -197,15 +197,15 @@ static const struct net_device_ops ne_netdev_ops = { .ndo_open = ne_open, .ndo_stop = ne_close, - .ndo_start_xmit = ei_start_xmit, - .ndo_tx_timeout = ei_tx_timeout, - .ndo_get_stats = ei_get_stats, - .ndo_set_multicast_list = ei_set_multicast_list, + .ndo_start_xmit = __ei_start_xmit, + .ndo_tx_timeout = __ei_tx_timeout, + .ndo_get_stats = __ei_get_stats, + .ndo_set_multicast_list = __ei_set_multicast_list, .ndo_validate_addr = eth_validate_addr, - .ndo_set_mac_address = eth_mac_addr, + .ndo_set_mac_address = eth_mac_addr, .ndo_change_mtu = eth_change_mtu, #ifdef CONFIG_NET_POLL_CONTROLLER - .ndo_poll_controller = ei_poll, + .ndo_poll_controller = __ei_poll, #endif };
@@ -638,7 +638,7 @@ int init_module(void)int err;for (this_dev =0 ; this_dev <MAX_NE_CARDS ; this_dev++) { -struct net_device *dev =alloc_ei_netdev (); +struct net_device *dev =____alloc_ei_netdev (0 );if (!dev)break ;if (io[this_dev]) {
drivers/net/slip.c +3 -1
@@ -851,7 +851,9 @@ static int slip_open(struct tty_struct *tty)/* Done. We have linked the TTY line to a channel. */ rtnl_unlock (); tty->receive_room =65536 ;/* We don't flow control */ -return sl->dev->base_addr; + +/* TTY layer expects 0 on success */ +return 0 ; err_free_bufs:sl_free_bufs (sl);
drivers/net/vmxnet3/vmxnet3_ethtool.c +3 -0
@@ -290,6 +290,9 @@ vmxnet3_set_flags(struct net_device *netdev, u32 data) {/* toggle the LRO feature*/ netdev->features ^=NETIF_F_LRO ; +/* Update private LRO flag */ + adapter->lro = lro_requested; +/* update harware LRO capability accordingly */ if (lro_requested) adapter->shared->devRead.misc.uptFeatures &=UPT1_F_LRO ;
drivers/net/wireless/libertas/cmd.c +4 -2
@@ -1278,8 +1278,8 @@ int lbs_execute_next_command(struct lbs_private *priv) cpu_to_le16(CMD_SUBCMD_EXIT_PS)) {lbs_deb_host ("EXEC_NEXT_CMD: ignore ENTER_PS cmd\n" ); -list_del (&cmdnode->list);spin_lock_irqsave (&priv->driver_lock, flags); +list_del (&cmdnode->list);lbs_complete_command (priv, cmdnode,0 );spin_unlock_irqrestore (&priv->driver_lock, flags);
@@ -1291,8 +1291,8 @@ int lbs_execute_next_command(struct lbs_private *priv) (priv->psstate == PS_STATE_PRE_SLEEP)) {lbs_deb_host ("EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n" ); -list_del (&cmdnode->list);spin_lock_irqsave (&priv->driver_lock, flags); +list_del (&cmdnode->list);lbs_complete_command (priv, cmdnode,0 );spin_unlock_irqrestore (&priv->driver_lock, flags); priv->needtowakeup =1 ;
@@ -1305,7 +1305,9 @@ int lbs_execute_next_command(struct lbs_private *priv) "EXEC_NEXT_CMD: sending EXIT_PS\n"); } } +spin_lock_irqsave (&priv->driver_lock, flags);list_del (&cmdnode->list); +spin_unlock_irqrestore (&priv->driver_lock, flags);lbs_deb_host ("EXEC_NEXT_CMD: sending command 0x%04x\n" ,le16_to_cpu (cmd->command));lbs_submit_command (priv, cmdnode);
drivers/net/zorro8390.c +6 -6
@@ -125,7 +125,7 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, board = z->resource.start; ioaddr = board+cards[i].offset; - dev =alloc_ei_netdev (); + dev =____alloc_ei_netdev (0 );if (!dev)return -ENOMEM ;if (!request_mem_region (ioaddr,NE_IO_EXTENT *2 ,DRV_NAME )) {
@@ -145,15 +145,15 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z,static const struct net_device_ops zorro8390_netdev_ops = { .ndo_open = zorro8390_open, .ndo_stop = zorro8390_close, - .ndo_start_xmit = ei_start_xmit, - .ndo_tx_timeout = ei_tx_timeout, - .ndo_get_stats = ei_get_stats, - .ndo_set_multicast_list = ei_set_multicast_list, + .ndo_start_xmit = __ei_start_xmit, + .ndo_tx_timeout = __ei_tx_timeout, + .ndo_get_stats = __ei_get_stats, + .ndo_set_multicast_list = __ei_set_multicast_list, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = eth_mac_addr, .ndo_change_mtu = eth_change_mtu, #ifdef CONFIG_NET_POLL_CONTROLLER - .ndo_poll_controller = ei_poll, + .ndo_poll_controller = __ei_poll, #endif };
drivers/scsi/megaraid/megaraid_sas.c +3 -0
@@ -3566,6 +3566,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,* For each user buffer, create a mirror buffer and copy in */ for (i =0 ; i < ioc->sge_count; i++) { +if (!ioc->sgl[i].iov_len) +continue ; + kbuff_arr[i] =dma_alloc_coherent (&instance->pdev->dev, ioc->sgl[i].iov_len, &buf_handle,GFP_KERNEL );
firmware/Makefile +1 -1
@@ -141,7 +141,7 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-) # Directories which we _might_ need to create, so we have a rule for them. -firmware-dirs := $(sort $(patsubst %,$(objtree)/$(obj)/%/,$(dir $(fw-external-y) $(fw-shipped-all)))) +firmware-dirs := $(sort $(addprefix $(objtree)/$(obj)/,$(dir $(fw-external-y) $(fw-shipped-all)))) quiet_cmd_mkdir = MKDIR $(patsubst $(objtree)/%,%,$@) cmd_mkdir = mkdir -p $@
fs/cifs/connect.c +8 -2
@@ -799,8 +799,7 @@ static int cifs_parse_mount_options(char *options, const char *devname, struct smb_vol *vol) { -char *value; -char *data; +char *value, *data, *end;unsigned int temp_len, i, j;char separator[2 ];short int override_uid =-1 ;
@@ -843,6 +842,7 @@ cifs_parse_mount_options(char *options, const char *devname,if (!options)return 1 ; + end = options +strlen (options);if (strncmp (options,"sep=" ,4 ) ==0 ) {if (options[4 ] !=0 ) { separator[0 ] = options[4 ];
@@ -907,6 +907,7 @@ cifs_parse_mount_options(char *options, const char *devname,the only illegal character in a password is null */ if ((value[temp_len] ==0 ) && + (value + temp_len < end) && (value[temp_len+1 ] == separator[0 ])) {/* reinsert comma */ value[temp_len] = separator[0 ];
@@ -2252,6 +2253,11 @@ is_path_accessible(int xid, struct cifsTconInfo *tcon,0 /* not legacy */ , cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); + +if (rc == -EOPNOTSUPP || rc == -EINVAL ) + rc =SMBQueryInformation (xid, tcon, full_path, pfile_info, + cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & +CIFS_MOUNT_MAP_SPECIAL_CHR );kfree (pfile_info);return rc; }
fs/cifs/sess.c +3 -1
@@ -905,7 +905,9 @@ ssetup_ntlmssp_authenticate: }/* BB check if Unicode and decode strings */ -if (smb_buf->Flags2 &SMBFLG2_UNICODE ) { +if (bytes_remaining ==0 ) { +/* no string area to decode, do nothing */ + }else if (smb_buf->Flags2 &SMBFLG2_UNICODE ) {/* unicode string area must be word-aligned */ if (((unsigned long ) bcc_ptr - (unsigned long ) smb_buf) %2 ) { ++bcc_ptr;
fs/partitions/efi.c +6 -0
@@ -349,6 +349,12 @@ is_gpt_valid(struct block_device *bdev, u64 lba, goto fail; } +/* Check that sizeof_partition_entry has the correct value */ +if (le32_to_cpu ((*gpt)->sizeof_partition_entry) !=sizeof (gpt_entry)) { +pr_debug ("GUID Partitition Entry Size check failed.\n" ); + goto fail; + } +if (!(*ptes =alloc_read_gpt_entries (bdev, *gpt))) goto fail;
include/linux/ptrace.h +12 -1
@@ -168,6 +168,10 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) child->ptrace = current->ptrace;__ptrace_link (child, current->parent); } + +#ifdef CONFIG_HAVE_HW_BREAKPOINT +atomic_set (&child->ptrace_bp_refcnt,1 ); +#endif }/**
@@ -336,6 +340,13 @@ extern int task_current_syscall(struct task_struct *target, long *callno, unsigned long args[6], unsigned int maxargs, unsigned long *sp, unsigned long *pc); -#endif +#ifdef CONFIG_HAVE_HW_BREAKPOINT +extern int ptrace_get_breakpoints (struct task_struct *tsk); +extern void ptrace_put_breakpoints (struct task_struct *tsk); +#else +static inline void ptrace_put_breakpoints (struct task_struct *tsk) { } +#endif /* CONFIG_HAVE_HW_BREAKPOINT */ + +#endif /* __KERNEL */ #endif
include/linux/sched.h +3 -0
@@ -1568,6 +1568,9 @@ struct task_struct { unsigned long memsw_bytes; /* uncharged mem+swap usage */ } memcg_batch;#endif +#ifdef CONFIG_HAVE_HW_BREAKPOINT +atomic_t ptrace_bp_refcnt; +#endif };/* Future-safe accessor for struct task_struct's cpus_allowed. */
kernel/exit.c +1 -1
@@ -1001,7 +1001,7 @@ NORET_TYPE void do_exit(long code)/* * FIXME: do that only when needed, using sched_exit tracepoint */ -flush_ptrace_hw_breakpoint (tsk); +ptrace_put_breakpoints (tsk);/* * Flush inherited counters to the parent - before the parent * gets woken up by child-exit notifications.
kernel/ptrace.c +17 -0
@@ -22,6 +22,7 @@#include <linux/pid_namespace.h> #include <linux/syscalls.h> #include <linux/uaccess.h> +#include <linux/hw_breakpoint.h> /*
@@ -762,3 +763,19 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, return ret; }#endif /* CONFIG_COMPAT */ + +#ifdef CONFIG_HAVE_HW_BREAKPOINT +int ptrace_get_breakpoints (struct task_struct *tsk) +{ +if (atomic_inc_not_zero (&tsk->ptrace_bp_refcnt)) +return 0 ; + +return -1 ; +} + +void ptrace_put_breakpoints (struct task_struct *tsk) +{ +if (atomic_dec_and_test (&tsk->ptrace_bp_refcnt)) +flush_ptrace_hw_breakpoint (tsk); +} +#endif /* CONFIG_HAVE_HW_BREAKPOINT */
kernel/time/clocksource.c +1 -1
@@ -626,8 +626,8 @@ int clocksource_register(struct clocksource *cs)mutex_lock (&clocksource_mutex);clocksource_enqueue (cs); -clocksource_select ();clocksource_enqueue_watchdog (cs); +clocksource_select ();mutex_unlock (&clocksource_mutex);return 0 ; }
kernel/time/tick-broadcast.c +11 -1
@@ -523,10 +523,11 @@ static void tick_broadcast_init_next_event(struct cpumask *mask,*/ void tick_broadcast_setup_oneshot (struct clock_event_device *bc) { +int cpu =smp_processor_id (); +/* Set it up only once ! */ if (bc->event_handler != tick_handle_oneshot_broadcast) {int was_periodic = bc->mode ==CLOCK_EVT_MODE_PERIODIC ; -int cpu =smp_processor_id (); bc->event_handler = tick_handle_oneshot_broadcast;clockevents_set_mode (bc,CLOCK_EVT_MODE_ONESHOT );
@@ -552,6 +553,15 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)tick_broadcast_set_event (tick_next_period,1 ); }else bc->next_event.tv64 =KTIME_MAX ; + }else { +/* +* The first cpu which switches to oneshot mode sets +* the bit for all other cpus which are in the general +* (periodic) broadcast mask. So the bit is set and +* would prevent the first broadcast enter after this +* to program the bc device. +*/ +tick_broadcast_clear_oneshot (cpu); } }
net/dccp/options.c +2 -0
@@ -131,6 +131,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, case DCCPO_CHANGE_L ... DCCPO_CONFIRM_R:if (pkt_type ==DCCP_PKT_DATA )/* RFC 4340, 6 */ break ; +if (len ==0 ) + goto out_invalid_option; rc =dccp_feat_parse_options (sk, dreq, mandatory, opt, *value, value +1 , len -1 );if (rc)
scripts/mkmakefile +3 -1
@@ -44,7 +44,9 @@ all: Makefile:; -\$(all) %/: all +\$(all): all @: +%/: all + @: EOF