Linux 2.6.20.21
Subsystems (23)
Hello,
I've just released Linux 2.6.20.21.
The following security issues are solved :
CVE-2007-3104: store sysfs inode nrs in s_ino to avoid readdir oopses
CVE-2007-4571: Convert snd-page-alloc proc file to use seq_file
A bunch of other fixes have been applied. No known vulnerability fix is pending anymore.
I'll also be replying to this message with a copy of the patch between 2.6.20.20 and 2.6.20.21.
I'd like to repeat what I've already said several times: 2.6.20.21 is the last 2.6.20.x release and there are no plans for any other one. Upgrade to this one only as a quick temporary step towards a newer major version.
The patch and changelog will appear soon at the following locations:
ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/ ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/patch-2.6.20.21.bz2 ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.20.21
Git repository:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git
http://www.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git
Git repository through the gitweb interface:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.20.y.git
Willy
-------
Makefile | 2 - arch/i386/kernel/sysenter.c | 4 +- arch/powerpc/kernel/process.c | 6 +-- arch/sparc64/kernel/traps.c | 18 +++++---- arch/sparc64/mm/fault.c | 5 -- block/ll_rw_blk.c | 13 +++--- crypto/blkcipher.c | 11 +++-- drivers/acpi/events/evgpeblk.c | 4 ++ drivers/ieee1394/ieee1394_core.c | 2 - drivers/ieee1394/ohci1394.c | 4 -- drivers/media/video/cx88/cx88-mpeg.c | 2 - drivers/media/video/pwc/pwc-if.c | 52 ++++++++++++++++++-------- drivers/media/video/pwc/pwc.h | 1 drivers/net/forcedeth.c | 1 drivers/net/r8169.c | 18 +++++---- drivers/scsi/3w-9xxx.c | 18 +++++---- drivers/usb/core/driver.c | 2 - drivers/usb/core/message.c | 4 +- fs/ext3/namei.c | 34 +++++++++++++++-- fs/ext4/namei.c | 34 +++++++++++++++-- fs/locks.c | 2 - fs/nfs/super.c | 2 - fs/sysfs/dir.c | 16 +++++--- fs/sysfs/inode.c | 1 fs/sysfs/mount.c | 1 include/asm-avr32/atomic.h | 4 +- include/linux/netfilter/Kbuild | 1 include/linux/sysfs.h | 1 include/net/tcp.h | 2 - kernel/futex_compat.c | 4 +- kernel/signal.c | 19 ++++----- kernel/sys.c | 3 - net/802/psnap.c | 17 ++++++-- net/core/datagram.c | 3 + net/dccp/ccids/ccid2.c | 2 - net/ipv4/af_inet.c | 2 - net/ipv4/ah4.c | 2 - net/ipv4/tcp.c | 3 + net/ipv4/tcp_ipv4.c | 1 net/ipv6/af_inet6.c | 2 - net/ipv6/ip6_output.c | 5 +- net/ipv6/raw.c | 3 - net/ipv6/tcp_ipv6.c | 1 net/socket.c | 2 - sound/core/memalloc.c | 68 ++++++++++++++++++++--------------- 45 files changed, 258 insertions(+), 144 deletions(-)
Summary of changes from 2.6.20.20 to 2.6.20.21
============================================
Adam Radford (1):
3w-9xxx: Fix dma mask setting
Alan Stern (1):
USB: allow retry on descriptor fetch errors
Alexey Dobriyan (1):
nfs: fix oops re sysctls and V4 support
Arnd Bergmann (1):
futex_compat: fix list traversal bugs
Bob Moore (1):
ACPICA: Fixed possible corruption of global GPE list
Chuck Ebbert (1):
Netfilter: Missing Kbuild entry for netfilter
David Miller (2):
SPARC64: Fix sparc64 task stack traces.
TCP: Do not autobind ports for TCP sockets
Eric Sandeen (2):
dir_index: error out instead of BUG on corrupt dx dirs
sysfs: store sysfs inode nrs in s_ino to avoid readdir oopses
Francois Romieu (1):
r8169: avoid needless NAPI poll scheduling
Gerrit Renker (1):
DCCP: Fix DCCP GFP_KERNEL allocation in atomic context
Haavard Skinnemoen (1):
AVR32: Fix atomic_add_unless() and atomic_sub_unless()
Herbert Xu (4):
SNAP: Fix SNAP protocol header accesses.
NET: Fix missing rcu unlock in __sock_create()
crypto: blkcipher_get_spot() handling of buffer at end of page Fix datagram recvmsg NULL iov handling regression.
Jan Beulich (1):
i386: allow debuggers to access the vsyscall page with compat vDSO
Jens Axboe (1):
Fix race with shared tag queue maps
Kumar Gala (1):
POWERPC: Flush registers to proper task context
Nathael Pajani (1):
USB: fix linked list insertion bugfix for usb core
Nick Bowler (1):
Fix IPSEC AH4 options handling
Oleg Nesterov (2):
setpgid(child) fails if the child was forked by sub-thread
sigqueue_free: fix the race with collect_signal()
Oliver Neukum (1):
USB: fix DoS in pwc USB video driver
Pavel Emelyanov (1):
Leases can be hidden by flocks
Stefan Richter (1):
ieee1394: ohci1394: fix initialization if built non-modular
Steven Toth (1):
V4L: cx88: Avoid a NULL pointer dereference during mpeg_open()
Takashi Iwai (1):
Convert snd-page-alloc proc file to use seq_file
Willy Tarreau (2):
fix realtek phy id in forcedeth
Linux 2.6.20.21
YOSHIFUJI Hideaki (2):
Fix IPV6 append OOPS.
Fix ipv6 double-sock-release with MSG_CONFIRM
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 20 -EXTRAVERSION = .20 +EXTRAVERSION = .21 NAME = Homicidal Dwarf Hamster # *DOCUMENTATION*
arch/i386/kernel/sysenter.c +3 -1
@@ -183,7 +183,9 @@ struct vm_area_struct *get_gate_vma(struct task_struct *tsk)int in_gate_area (struct task_struct *task,unsigned long addr) { -return 0 ; +const struct vm_area_struct *vma =get_gate_vma (task); + +return vma && addr >= vma->vm_start && addr < vma->vm_end; }int in_gate_area_no_task (unsigned long addr)
arch/powerpc/kernel/process.c +3 -3
@@ -84,7 +84,7 @@ void flush_fp_to_thread(struct task_struct *tsk)*/ BUG_ON (tsk != current);#endif -giveup_fpu (current); +giveup_fpu (tsk); }preempt_enable (); }
@@ -144,7 +144,7 @@ void flush_altivec_to_thread(struct task_struct *tsk)#ifdef CONFIG_SMP BUG_ON (tsk != current);#endif -giveup_altivec (current); +giveup_altivec (tsk); }preempt_enable (); }
@@ -183,7 +183,7 @@ void flush_spe_to_thread(struct task_struct *tsk)#ifdef CONFIG_SMP BUG_ON (tsk != current);#endif -giveup_spe (current); +giveup_spe (tsk); }preempt_enable (); }
arch/sparc64/kernel/traps.c +11 -7
@@ -2146,12 +2146,20 @@ static void user_instruction_dump (unsigned int __user *pc)void show_stack (struct task_struct *tsk,unsigned long *_ksp) {unsigned long pc, fp, thread_base, ksp; -void *tp =task_stack_page (tsk); +struct thread_info *tp;struct reg_window *rw;int count =0 ; ksp = (unsigned long ) _ksp; - +if (!tsk) + tsk = current; + tp =task_thread_info (tsk); +if (ksp ==0UL ) { +if (tsk == current) + asm("mov %%fp, %0" :"=r" (ksp)); +else + ksp = tp->ksp; + }if (tp ==current_thread_info ())flushw_all ();
@@ -2180,11 +2188,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)void dump_stack (void ) { -unsigned long *ksp; - - __asm__ __volatile__("mov %%fp, %0" - :"=r" (ksp)); -show_stack (current, ksp); +show_stack (current,NULL ); }EXPORT_SYMBOL (dump_stack);
arch/sparc64/mm/fault.c +1 -4
@@ -129,15 +129,12 @@ static void __kprobes unhandled_fault(unsigned long address,static void bad_kernel_pc (struct pt_regs *regs,unsigned long vaddr) { -unsigned long *ksp; -printk (KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n" , regs->tpc);printk (KERN_CRIT "OOPS: RPC [%016lx]\n" , regs->u_regs[15 ]);print_symbol ("RPC: <%s>\n" , regs->u_regs[15 ]);printk (KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n" , vaddr); - __asm__("mov %%sp, %0" :"=r" (ksp)); -show_stack (current, ksp); +dump_stack ();unhandled_fault (regs->tpc, current, regs); }
block/ll_rw_blk.c +7 -6
@@ -1072,12 +1072,6 @@ void blk_queue_end_tag(request_queue_t *q, struct request *rq)*/ return ; -if (unlikely (!__test_and_clear_bit (tag, bqt->tag_map))) { -printk (KERN_ERR "%s: attempt to clear non-busy tag (%d)\n" , - __FUNCTION__, tag); -return ; - } -list_del_init (&rq->queuelist); rq->cmd_flags &= ~REQ_QUEUED ; rq->tag =-1 ;
@@ -1087,6 +1081,13 @@ void blk_queue_end_tag(request_queue_t *q, struct request *rq) __FUNCTION__, tag); bqt->tag_index[tag] =NULL ; + +if (unlikely (!test_and_clear_bit (tag, bqt->tag_map))) { +printk (KERN_ERR "%s: attempt to clear non-busy tag (%d)\n" , + __FUNCTION__, tag); +return ; + } + bqt->busy--; }
crypto/blkcipher.c +7 -4
@@ -58,11 +58,13 @@ static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk)scatterwalk_unmap (walk->dst.virt.addr,1 ); } +/* Get a spot of the specified length that does not straddle a page. +* The caller needs to ensure that there is enough space for this operation. +*/ static inline u8 *blkcipher_get_spot (u8 *start,unsigned int len) { -if (offset_in_page (start + len) < len) -return (u8 *)((unsigned long )(start + len) &PAGE_MASK ); -return start; +u8 *end_page = (u8 *)(((unsigned long )(start + len -1 )) &PAGE_MASK ); +return start > end_page ? start : end_page; } static inline unsigned int blkcipher_done_slow(struct crypto_blkcipher *tfm,
@@ -154,7 +156,8 @@ static inline int blkcipher_next_slow(struct blkcipher_desc *desc,if (walk->buffer) goto ok; - n = bsize *2 + (alignmask & ~(crypto_tfm_ctx_alignment () -1 )); + n = bsize *3 - (alignmask +1 ) + + (alignmask & ~(crypto_tfm_ctx_alignment () -1 )); walk->buffer =kmalloc (n,GFP_ATOMIC );if (!walk->buffer)return blkcipher_walk_done (desc, walk, -ENOMEM );
drivers/acpi/events/evgpeblk.c +4 -0
@@ -586,6 +586,10 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) flags =acpi_os_acquire_lock (acpi_gbl_gpe_lock);if (gpe_xrupt->previous) { gpe_xrupt->previous->next = gpe_xrupt->next; + }else { +/* No previous, update list head */ + + acpi_gbl_gpe_xrupt_list_head = gpe_xrupt->next; }if (gpe_xrupt->next) {
drivers/ieee1394/ieee1394_core.c +1 -1
@@ -1170,7 +1170,7 @@ static void __exit ieee1394_cleanup(void)unregister_chrdev_region (IEEE1394_CORE_DEV ,256 ); } -fs_initcall (ieee1394_init);/* same as ohci1394 */ +module_init (ieee1394_init);module_exit (ieee1394_cleanup);/* Exported symbols */
drivers/ieee1394/ohci1394.c +1 -3
@@ -3785,7 +3785,5 @@ static int __init ohci1394_init(void)return pci_register_driver (&ohci1394_pci_driver); } -/* Register before most other device drivers. -* Useful for remote debugging via physical DMA, e.g. using firescope. */ -fs_initcall (ohci1394_init); +module_init (ohci1394_init);module_exit (ohci1394_cleanup);
drivers/media/video/cx88/cx88-mpeg.c +1 -1
@@ -556,7 +556,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode)list_for_each (list,&cx8802_devlist) { h = list_entry(list, struct cx8802_dev, devlist); -if (h->mpeg_dev->minor == minor) +if (h->mpeg_dev && h->mpeg_dev->minor == minor)return h; }
drivers/media/video/pwc/pwc-if.c +35 -17
85 lines not on this page · raw message
drivers/media/video/pwc/pwc.h +1 -0
@@ -198,6 +198,7 @@ struct pwc_devicechar vsnapshot;/* snapshot mode */ char vsync;/* used by isoc handler */ char vmirror;/* for ToUCaM series */ +char unplugged;int cmd_len;unsigned char cmd_buf[13 ];
drivers/net/forcedeth.c +1 -0
@@ -554,6 +554,7 @@ union ring_type {#define PHY_OUI_MARVELL 0x5043#define PHY_OUI_CICADA 0x03f1#define PHY_OUI_VITESSE 0x01c1 +#define PHY_OUI_REALTEK 0x0732#define PHYID1_OUI_MASK 0x03ff#define PHYID1_OUI_SHFT 6#define PHYID2_OUI_MASK 0xfc00
drivers/net/r8169.c +10 -8
@@ -2646,14 +2646,16 @@ rtl8169_interrupt(int irq, void *dev_instance)rtl8169_check_link_status (dev, tp, ioaddr);#ifdef CONFIG_R8169_NAPI -RTL_W16 (IntrMask, rtl8169_intr_mask & ~rtl8169_napi_event); - tp->intr_mask = ~rtl8169_napi_event; - -if (likely (netif_rx_schedule_prep (dev))) -__netif_rx_schedule (dev); -else if (netif_msg_intr (tp)) { -printk (KERN_INFO "%s: interrupt %04x taken in poll\n" , - dev->name, status); +if (status & rtl8169_napi_event) { +RTL_W16 (IntrMask, rtl8169_intr_mask & ~rtl8169_napi_event); + tp->intr_mask = ~rtl8169_napi_event; + +if (likely (netif_rx_schedule_prep (dev))) +__netif_rx_schedule (dev); +else if (netif_msg_intr (tp)) { +printk (KERN_INFO "%s: interrupt %04x in poll\n" , + dev->name, status); + } }break ;#else
drivers/scsi/3w-9xxx.c +11 -7
@@ -4,7 +4,7 @@ Written By: Adam Radford <[email protected]> Modifications By: Tom Couch <[email protected]> - Copyright (C) 2004-2006 Applied Micro Circuits Corporation. + Copyright (C) 2004-2007 Applied Micro Circuits Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
@@ -69,6 +69,7 @@2.26.02.008 - Free irq handler in __twa_shutdown(). Serialize reset code. Add support for 9650SE controllers. +2.26.02.009 - Fix dma mask setting to fallback to 32-bit if 64-bit fails. */ #include <linux/module.h>
@@ -92,7 +93,7 @@#include "3w-9xxx.h" /* Globals */ -#define TW_DRIVER_VERSION "2.26.02.008" +#define TW_DRIVER_VERSION "2.26.02.009"static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT ];static unsigned int twa_device_extension_count;static int twa_major =-1 ;
@@ -2063,11 +2064,14 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_idpci_set_master (pdev); - retval =pci_set_dma_mask (pdev,sizeof (dma_addr_t) >4 ?DMA_64BIT_MASK :DMA_32BIT_MASK ); -if (retval) { -TW_PRINTK (host,TW_DRIVER ,0x23 ,"Failed to set dma mask" ); - goto out_disable_device; - } +if (pci_set_dma_mask (pdev,DMA_64BIT_MASK ) + ||pci_set_consistent_dma_mask (pdev,DMA_64BIT_MASK )) +if (pci_set_dma_mask (pdev,DMA_32BIT_MASK ) + ||pci_set_consistent_dma_mask (pdev,DMA_32BIT_MASK )) { +TW_PRINTK (host,TW_DRIVER ,0x23 ,"Failed to set dma mask" ); + retval = -ENODEV ; + goto out_disable_device; + } host =scsi_host_alloc (&driver_template,sizeof (TW_Device_Extension));if (!host) {
drivers/usb/core/driver.c +1 -1
@@ -66,7 +66,7 @@ static ssize_t store_new_id(struct device_driver *driver, dynid->id.match_flags =USB_DEVICE_ID_MATCH_DEVICE ;spin_lock (&usb_drv->dynids.lock); -list_add_tail (&usb_drv->dynids.list, &dynid->node); +list_add_tail (&dynid->node, &usb_drv->dynids.list);spin_unlock (&usb_drv->dynids.lock);if (get_driver (driver)) {
drivers/usb/core/message.c +2 -2
@@ -608,12 +608,12 @@ int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned charmemset (buf,0 ,size);// Make sure we parse really received data for (i =0 ; i <3 ; ++i) { -/* retry on length 0 or stall; some devices are flakey */ +/* retry on length 0 or error; some devices are flakey */ result =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ),USB_REQ_GET_DESCRIPTOR ,USB_DIR_IN , (type <<8 ) + index,0 , buf, size,USB_CTRL_GET_TIMEOUT ); -if (result ==0 || result == -EPIPE ) +if (result <=0 && result != -ETIMEDOUT )continue ;if (result >1 && ((u8 *)buf)[1 ] != type) { result = -EPROTO ;
fs/ext3/namei.c +30 -4
@@ -380,13 +380,28 @@ dx_probe(struct dentry *dentry, struct inode *dir, entries = (struct dx_entry *) (((char *)&root->info) + root->info.info_length); -assert (dx_get_limit (entries) ==dx_root_limit (dir, - root->info.info_length)); + +if (dx_get_limit (entries) !=dx_root_limit (dir, + root->info.info_length)) { +ext3_warning (dir->i_sb, __FUNCTION__, +"dx entry: limit != root limit" ); +brelse (bh); + *err =ERR_BAD_DX_DIR ; + goto fail; + } +dxtrace (printk ("Look up %x" , hash));while (1 ) { count =dx_get_count (entries); -assert (count && count <=dx_get_limit (entries)); +if (!count || count >dx_get_limit (entries)) { +ext3_warning (dir->i_sb, __FUNCTION__, +"dx entry: no count or count > limit" ); +brelse (bh); + *err =ERR_BAD_DX_DIR ; + goto fail2; + } + p = entries +1 ; q = entries + count -1 ;while (p <= q)
@@ -424,8 +439,15 @@ dx_probe(struct dentry *dentry, struct inode *dir,if (!(bh =ext3_bread (NULL ,dir,dx_get_block (at),0 , err))) goto fail2; at = entries = ((struct dx_node *) bh->b_data)->entries; -assert (dx_get_limit (entries) ==dx_node_limit (dir)); +if (dx_get_limit (entries) !=dx_node_limit (dir)) { +ext3_warning (dir->i_sb, __FUNCTION__, +"dx entry: limit != node limit" ); +brelse (bh); + *err =ERR_BAD_DX_DIR ; + goto fail2; + } frame++; + frame->bh =NULL ; } fail2:while (frame >= frame_in) {
@@ -433,6 +455,10 @@ fail2: frame--; } fail: +if (*err ==ERR_BAD_DX_DIR ) +ext3_warning (dir->i_sb, __FUNCTION__, +"Corrupt dir inode %ld, running e2fsck is " +"recommended." , dir->i_ino);return NULL ; }
fs/ext4/namei.c +30 -4
@@ -380,13 +380,28 @@ dx_probe(struct dentry *dentry, struct inode *dir, entries = (struct dx_entry *) (((char *)&root->info) + root->info.info_length); -assert (dx_get_limit (entries) ==dx_root_limit (dir, - root->info.info_length)); + +if (dx_get_limit (entries) !=dx_root_limit (dir, + root->info.info_length)) { +ext4_warning (dir->i_sb, __FUNCTION__, +"dx entry: limit != root limit" ); +brelse (bh); + *err =ERR_BAD_DX_DIR ; + goto fail; + } +dxtrace (printk ("Look up %x" , hash));while (1 ) { count =dx_get_count (entries); -assert (count && count <=dx_get_limit (entries)); +if (!count || count >dx_get_limit (entries)) { +ext4_warning (dir->i_sb, __FUNCTION__, +"dx entry: no count or count > limit" ); +brelse (bh); + *err =ERR_BAD_DX_DIR ; + goto fail2; + } + p = entries +1 ; q = entries + count -1 ;while (p <= q)
@@ -424,8 +439,15 @@ dx_probe(struct dentry *dentry, struct inode *dir,if (!(bh =ext4_bread (NULL ,dir,dx_get_block (at),0 , err))) goto fail2; at = entries = ((struct dx_node *) bh->b_data)->entries; -assert (dx_get_limit (entries) ==dx_node_limit (dir)); +if (dx_get_limit (entries) !=dx_node_limit (dir)) { +ext4_warning (dir->i_sb, __FUNCTION__, +"dx entry: limit != node limit" ); +brelse (bh); + *err =ERR_BAD_DX_DIR ; + goto fail2; + } frame++; + frame->bh =NULL ; } fail2:while (frame >= frame_in) {
@@ -433,6 +455,10 @@ fail2: frame--; } fail: +if (*err ==ERR_BAD_DX_DIR ) +ext4_warning (dir->i_sb, __FUNCTION__, +"Corrupt dir inode %ld, running e2fsck is " +"recommended." , dir->i_ino);return NULL ; }
fs/locks.c +1 -1
@@ -790,7 +790,7 @@ find_conflict:if (request->fl_flags &FL_ACCESS ) goto out;locks_copy_lock (new_fl, request); -locks_insert_lock (&inode->i_flock, new_fl); +locks_insert_lock (before, new_fl); new_fl =NULL ; error =0 ;
fs/nfs/super.c +1 -1
@@ -180,8 +180,8 @@ void __exit unregister_nfs_fs(void)remove_shrinker (acl_shrinker);#ifdef CONFIG_NFS_V4 unregister_filesystem (&nfs4_fs_type); -nfs_unregister_sysctl ();#endif +nfs_unregister_sysctl ();unregister_filesystem (&nfs_fs_type); }
fs/sysfs/dir.c +11 -5
@@ -29,6 +29,14 @@ static struct dentry_operations sysfs_dentry_ops = { .d_iput = sysfs_d_iput, }; +static unsigned int sysfs_inode_counter; +ino_t sysfs_get_inum (void ) +{ +if (unlikely (sysfs_inode_counter <3 )) + sysfs_inode_counter =3 ; +return sysfs_inode_counter++; +} +/* * Allocates a new sysfs_dirent and links it to the parent sysfs_dirent */
@@ -42,6 +50,7 @@ static struct sysfs_dirent * sysfs_new_dirent(struct sysfs_dirent * parent_sd,return NULL ;memset (sd,0 ,sizeof (*sd)); + sd->s_ino =sysfs_get_inum ();atomic_set (&sd->s_count,1 );atomic_set (&sd->s_event,1 );INIT_LIST_HEAD (&sd->s_children);
@@ -461,7 +470,7 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)switch (i) {case 0 : - ino = dentry->d_inode->i_ino; + ino = parent_sd->s_ino;if (filldir (dirent,"." ,1 , i, ino,DT_DIR ) <0 )break ; filp->f_pos++;
@@ -490,10 +499,7 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir) name =sysfs_get_name (next); len =strlen (name); -if (next->s_dentry) - ino = next->s_dentry->d_inode->i_ino; -else - ino =iunique (sysfs_sb,2 ); + ino = next->s_ino;if (filldir (dirent, name, len, filp->f_pos, ino,dt_type (next)) <0 )
fs/sysfs/inode.c +1 -0
@@ -129,6 +129,7 @@ struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd) inode->i_mapping->a_ops = &sysfs_aops; inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info; inode->i_op = &sysfs_inode_operations; + inode->i_ino = sd->s_ino;lockdep_set_class (&inode->i_mutex, &sysfs_inode_imutex_key);if (sd->s_iattr) {
fs/sysfs/mount.c +1 -0
@@ -29,6 +29,7 @@ static struct sysfs_dirent sysfs_root = { .s_element = NULL, .s_type = SYSFS_ROOT, .s_iattr = NULL, + .s_ino = 1, };static int sysfs_fill_super (struct super_block *sb,void *data,int silent)
include/asm-avr32/atomic.h +2 -2
@@ -101,7 +101,7 @@ static inline int atomic_sub_unless(atomic_t *v, int a, int u)" mov %1, 1\n" "1:" : "=&r"(tmp), "=&r"(result), "=o"(v->counter) - : "m"(v->counter), "rKs21"(a), "rKs21"(u) + : "m"(v->counter), "rKs21"(a), "rKs21"(u), "1"(result) : "cc", "memory"); return result;
@@ -137,7 +137,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) " mov %1, 1\n" "1:" : "=&r"(tmp), "=&r"(result), "=o"(v->counter) - : "m"(v->counter), "r"(a), "ir"(u) + : "m"(v->counter), "r"(a), "ir"(u), "1"(result) : "cc", "memory"); }
include/linux/netfilter/Kbuild +1 -0
@@ -28,6 +28,7 @@ header-y += xt_policy.h header-y += xt_realm.h header-y += xt_sctp.h header-y += xt_state.h +header-y += xt_statistic.h header-y += xt_string.h header-y += xt_tcpmss.h header-y += xt_tcpudp.h
include/linux/sysfs.h +1 -0
@@ -73,6 +73,7 @@ struct sysfs_dirent {void * s_element;int s_type;umode_t s_mode; +ino_t s_ino;struct dentry * s_dentry;struct iattr * s_iattr;atomic_t s_event;
include/net/tcp.h +1 -1
@@ -273,7 +273,7 @@ extern int tcp_v4_remember_stamp(struct sock *sk);extern int tcp_v4_tw_remember_stamp (struct inet_timewait_sock *tw); -extern int tcp_sendmsg (struct kiocb *iocb,struct sock *sk, +extern int tcp_sendmsg (struct kiocb *iocb,struct socket *sock,struct msghdr *msg,size_t size);extern ssize_t tcp_sendpage (struct socket *sock,struct page *page,int offset,size_t size,int flags);
kernel/futex_compat.c +2 -2
@@ -61,10 +61,10 @@ void compat_exit_robust_list(struct task_struct *curr)if (fetch_robust_entry (&upending, &pending, &head->list_op_pending, &pip))return ; -if (upending) +if (pending)handle_futex_death ((void __user *)pending + futex_offset, curr, pip); -while (compat_ptr (uentry) != &head->list) { +while (entry != (struct robust_list __user *) &head->list) {/* * A pending lock might already be on the list, so * dont process it twice:
kernel/signal.c +9 -10
@@ -1345,20 +1345,19 @@ struct sigqueue *sigqueue_alloc(void)void sigqueue_free (struct sigqueue *q) {unsigned long flags; +spinlock_t *lock = ¤t->sighand->siglock; +BUG_ON (!(q->flags &SIGQUEUE_PREALLOC ));/* * If the signal is still pending remove it from the -* pending queue. +* pending queue. We must hold ->siglock while testing +* q->list to serialize with collect_signal(). */ -if (unlikely (!list_empty (&q->list))) { -spinlock_t *lock = ¤t->sighand->siglock; -read_lock (&tasklist_lock); -spin_lock_irqsave (lock, flags); -if (!list_empty (&q->list)) -list_del_init (&q->list); -spin_unlock_irqrestore (lock, flags); -read_unlock (&tasklist_lock); - } +spin_lock_irqsave (lock, flags); +if (!list_empty (&q->list)) +list_del_init (&q->list); +spin_unlock_irqrestore (lock, flags); + q->flags &= ~SIGQUEUE_PREALLOC ;__sigqueue_free (q); }
kernel/sys.c +1 -2
@@ -1358,7 +1358,6 @@ asmlinkage long sys_times(struct tms __user * tbuf)* Auch. Had to add the 'did_exec' flag to conform completely to POSIX. * LBT 04.03.94 */ -asmlinkage long sys_setpgid (pid_t pid,pid_t pgid) {struct task_struct *p;
@@ -1386,7 +1385,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)if (!thread_group_leader (p)) goto out; -if (p->real_parent == group_leader) { +if (p->real_parent->tgid == group_leader->tgid) { err = -EPERM ;if (process_session (p) !=process_session (group_leader)) goto out;
net/802/psnap.c +12 -5
@@ -55,6 +55,9 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, .type = __constant_htons(ETH_P_SNAP), }; +if (unlikely (!pskb_may_pull (skb,5 ))) + goto drop; +rcu_read_lock (); proto =find_snap_client (skb->h.raw);if (proto) {
@@ -62,14 +65,18 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, skb->h.raw +=5 ;skb_pull_rcsum (skb,5 ); rc = proto->rcvfunc (skb, dev, &snap_packet_type, orig_dev); - }else { - skb->sk =NULL ; -kfree_skb (skb); - rc =1 ; } -rcu_read_unlock (); + +if (unlikely (!proto)) + goto drop; + +out:return rc; + +drop: +kfree_skb (skb); + goto out; }/*
net/core/datagram.c +3 -0
@@ -444,6 +444,9 @@ int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,__wsum csum;int chunk = skb->len - hlen; +if (!chunk) +return 0 ; +/* Skip filled elements. * Pretty silly, look at memcpy_toiovec, though 8) */
net/dccp/ccids/ccid2.c +1 -1
@@ -298,7 +298,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)int rc;ccid2_pr_debug ("allocating more space in history\n" ); - rc =ccid2_hc_tx_alloc_seq (hctx,CCID2_SEQBUF_LEN ,GFP_KERNEL ); + rc =ccid2_hc_tx_alloc_seq (hctx,CCID2_SEQBUF_LEN ,gfp_any ());BUG_ON (rc);/* XXX what do we do? */ next = hctx->ccid2hctx_seqh->ccid2s_next;
net/ipv4/af_inet.c +1 -1
@@ -803,7 +803,7 @@ const struct proto_ops inet_stream_ops = { .shutdown = inet_shutdown, .setsockopt = sock_common_setsockopt, .getsockopt = sock_common_getsockopt, - .sendmsg = inet_sendmsg, + .sendmsg = tcp_sendmsg, .recvmsg = sock_common_recvmsg, .mmap = sock_no_mmap, .sendpage = tcp_sendpage,
net/ipv4/ah4.c +1 -1
@@ -46,7 +46,7 @@ static int ip_clear_mutable_options(struct iphdr *iph, __be32 *daddr)memcpy (daddr, optptr+optlen-4 ,4 );/* Fall through */ default : -memset (optptr+2 ,0 , optlen-2 ); +memset (optptr,0 , optlen); } l -= optlen; optptr += optlen;
net/ipv4/tcp.c +2 -1
@@ -658,9 +658,10 @@ static inline int select_size(struct sock *sk, struct tcp_sock *tp)return tmp; } -int tcp_sendmsg (struct kiocb *iocb,struct sock *sk,struct msghdr *msg, +int tcp_sendmsg (struct kiocb *iocb,struct socket *sock,struct msghdr *msg,size_t size) { +struct sock *sk = sock->sk;struct iovec *iov;struct tcp_sock *tp =tcp_sk (sk);struct sk_buff *skb;
net/ipv4/tcp_ipv4.c +0 -1
@@ -2427,7 +2427,6 @@ struct proto tcp_prot = { .shutdown = tcp_shutdown, .setsockopt = tcp_setsockopt, .getsockopt = tcp_getsockopt, - .sendmsg = tcp_sendmsg, .recvmsg = tcp_recvmsg, .backlog_rcv = tcp_v4_do_rcv, .hash = tcp_v4_hash,
net/ipv6/af_inet6.c +1 -1
@@ -473,7 +473,7 @@ const struct proto_ops inet6_stream_ops = { .shutdown = inet_shutdown, /* ok */ .setsockopt = sock_common_setsockopt, /* ok */ .getsockopt = sock_common_getsockopt, /* ok */ - .sendmsg = inet_sendmsg, /* ok */ + .sendmsg = tcp_sendmsg, /* ok */ .recvmsg = sock_common_recvmsg, /* ok */ .mmap = sock_no_mmap, .sendpage = tcp_sendpage,
net/ipv6/ip6_output.c +3 -2
@@ -1357,8 +1357,9 @@ void ip6_flush_pending_frames(struct sock *sk)struct sk_buff *skb;while ((skb =__skb_dequeue_tail (&sk->sk_write_queue)) !=NULL ) { -IP6_INC_STATS (ip6_dst_idev (skb->dst), -IPSTATS_MIB_OUTDISCARDS ); +if (skb->dst) +IP6_INC_STATS (ip6_dst_idev (skb->dst), +IPSTATS_MIB_OUTDISCARDS );kfree_skb (skb); }
net/ipv6/raw.c +1 -2
@@ -851,11 +851,10 @@ back_from_confirm:ip6_flush_pending_frames (sk); else if (!(msg->msg_flags & MSG_MORE)) err =rawv6_push_pending_frames (sk, &fl, rp); +release_sock (sk); } done:dst_release (dst); -if (!inet->hdrincl) -release_sock (sk); out:fl6_sock_release (flowlabel);return err<0 ?err:len;
net/ipv6/tcp_ipv6.c +0 -1
@@ -2127,7 +2127,6 @@ struct proto tcpv6_prot = { .shutdown = tcp_shutdown, .setsockopt = tcp_setsockopt, .getsockopt = tcp_getsockopt, - .sendmsg = tcp_sendmsg, .recvmsg = tcp_recvmsg, .backlog_rcv = tcp_v6_do_rcv, .hash = tcp_v6_hash,
net/socket.c +1 -1
@@ -1147,7 +1147,7 @@ static int __sock_create(int family, int type, int protocol,module_put (pf->owner); err =security_socket_post_create (sock, family, type, protocol, kern);if (err) - goto out_release; + goto out_sock_release; *res = sock;return 0 ;
sound/core/memalloc.c +39 -29
141 lines not on this page · raw message