Linux 2.6.13.2
Subsystems (10)
We (the -stable team) are announcing the release of the 2.6.13.2 kernel.
The diffstat and short summary of the fixes are below.
I'll also be replying to this message with a copy of the patch between 2.6.13.1 and 2.6.13.2, as it is small enough to do so.
The updated 2.6.13.y git tree can be found at:
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/chrisw/linux-2.6.13.y.git
and can be browsed at the normal kernel.org git web browser:
www.kernel.org/git/
Note: The above info won't be valid until master.kernel.org is back online. In the interim you can find the tarball, patches, changelogs etc. at <http://developer.osdl.org/chrisw/stable/2.6.13.2/>
thanks,
-chris
----------
Makefile | 2 - arch/x86_64/ia32/ia32_ioctl.c | 17 ++++++++++--- drivers/ide/pci/cmd64x.c | 2 - drivers/ide/pci/hpt34x.c | 2 - drivers/ide/pci/hpt366.c | 8 ++++-- drivers/net/forcedeth.c | 3 ++ drivers/net/sungem.c | 36 +++++++++++----------------- drivers/net/sunhme.c | 45 ++++++++++++++---------------------- drivers/usb/serial/ftdi_sio.c | 2 - fs/compat_ioctl.c | 7 ++++- fs/jfs/inode.c | 24 +++++++++---------- mm/mempolicy.c | 7 ++++- net/ipv4/netfilter/ipt_MASQUERADE.c | 6 ++++ 13 files changed, 87 insertions(+), 74 deletions(-)
Summary of changes from v2.6.13.1 to v2.6.13.2
============================================
Andi Kleen:
Fix MPOL_F_VERIFY
Chris Wright:
Linux 2.6.13.2
Dave Kleikamp:
jfs: jfs_delete_inode must call clear_inode
Ian Abbott:
USB: ftdi_sio: custom baud rate fix
Linus Torvalds:
hpt366: write the full 4 bytes of ROM address, not just low 1 byte Sun GEM ethernet: enable and map PCI ROM properly
Fix up more strange byte writes to the PCI_ROM_ADDRESS config word
Manfred Spraul:
forcedeth: Initialize link settings in every nv_open()
Maxim Giryaev:
lost fput in 32bit ioctl on x86-64
Lost sockfd_put() in routing_ioctl()
Patrick McHardy:
Fix DHCP + MASQUERADE problem
Willy Tarreau:
Sun HME: enable and map PCI ROM properly
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 13 -EXTRAVERSION = .1 +EXTRAVERSION = .2 NAME=Woozy Numbat # *DOCUMENTATION*
arch/x86_64/ia32/ia32_ioctl.c +13 -4
@@ -24,17 +24,26 @@static int tiocgdev (unsigned fd,unsigned cmd,unsigned int __user *ptr) { -struct file *file =fget (fd); +struct file *file;struct tty_struct *real_tty; +int fput_needed, ret; + file =fget_light (fd, &fput_needed);if (!file)return -EBADF ; + + ret = -EINVAL ;if (file->f_op->ioctl != tty_ioctl) -return -EINVAL ; + goto out; real_tty = (struct tty_struct *)file->private_data;if (!real_tty) -return -EINVAL ; -return put_user (new_encode_dev (tty_devnum (real_tty)), ptr); + goto out; + + ret =put_user (new_encode_dev (tty_devnum (real_tty)), ptr); + +out: +fput_light (file, fput_needed); +return ret; }#define RTC_IRQP_READ32 _IOR('p', 0x0b, unsigned int)/* Read IRQ rate */
drivers/ide/pci/cmd64x.c +1 -1
@@ -608,7 +608,7 @@ static unsigned int __devinit init_chips#ifdef __i386__if (dev->resource[PCI_ROM_RESOURCE ].start) { -pci_write_config_byte (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE ); +pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE );printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, dev->resource[PCI_ROM_RESOURCE ].start); }#endif
drivers/ide/pci/hpt34x.c +1 -1
@@ -173,7 +173,7 @@ static unsigned int __devinit init_chipsif (cmd &PCI_COMMAND_MEMORY ) {if (pci_resource_start (dev,PCI_ROM_RESOURCE )) { -pci_write_config_byte (dev,PCI_ROM_ADDRESS , +pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE );printk (KERN_INFO "HPT345: ROM enabled at 0x%08lx\n" , dev->resource[PCI_ROM_RESOURCE ].start);
drivers/ide/pci/hpt366.c +6 -2
@@ -1334,9 +1334,13 @@ static int __devinit init_hpt366(structstatic unsigned int __devinit init_chipset_hpt366 (struct pci_dev *dev,const char *name) {int ret =0 ; -/* FIXME: Not portable */ + +/* +* FIXME: Not portable. Also, why do we enable the ROM in the first place? +* We don't seem to be using it. +*/ if (dev->resource[PCI_ROM_RESOURCE ].start) -pci_write_config_byte (dev,PCI_ROM_ADDRESS , +pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE );pci_write_config_byte (dev,PCI_CACHE_LINE_SIZE , (L1_CACHE_BYTES /4 ));
drivers/net/forcedeth.c +3 -0
@@ -1888,6 +1888,9 @@ static int nv_open(struct net_device *dewritel (NVREG_MIISTAT_MASK , base + NvRegMIIStatus);dprintk (KERN_INFO "startup: got 0x%08x.\n" , miistat); } +/* set linkspeed to invalid value, thus force nv_update_linkspeed +* to init hw */ + np->linkspeed =0 ; ret =nv_update_linkspeed (dev);nv_start_rx (dev);nv_start_tx (dev);
drivers/net/sungem.c +14 -22
@@ -2816,7 +2816,7 @@ static int gem_ioctl(struct net_device *#if (!defined(__sparc__) && !defined(CONFIG_PPC_PMAC ))/* Fetch MAC address from vital product data of PCI ROM. */ -static void find_eth_addr_in_vpd (void __iomem *rom_base,int len,unsigned char *dev_addr) +static int find_eth_addr_in_vpd (void __iomem *rom_base,int len,unsigned char *dev_addr) {int this_offset;
@@ -2837,35 +2837,27 @@ static void find_eth_addr_in_vpd(void __for (i =0 ; i <6 ; i++) dev_addr[i] =readb (p + i); -break ; +return 1 ; } +return 0 ; }static void get_gem_mac_nonobp (struct pci_dev *pdev,unsigned char *dev_addr) { -u32 rom_reg_orig; -void __iomem *p; - -if (pdev->resource[PCI_ROM_RESOURCE ].parent ==NULL ) { -if (pci_assign_resource (pdev,PCI_ROM_RESOURCE ) <0 ) - goto use_random; - } - -pci_read_config_dword (pdev, pdev->rom_base_reg, &rom_reg_orig); -pci_write_config_dword (pdev, pdev->rom_base_reg, - rom_reg_orig |PCI_ROM_ADDRESS_ENABLE ); +size_t size; +void __iomem *p =pci_map_rom (pdev, &size); - p =ioremap (pci_resource_start (pdev,PCI_ROM_RESOURCE ), (64 *1024 )); -if (p !=NULL &&readb (p) ==0x55 &&readb (p +1 ) ==0xaa ) -find_eth_addr_in_vpd (p, (64 *1024 ), dev_addr); +if (p) { +int found; -if (p !=NULL ) -iounmap (p); - -pci_write_config_dword (pdev, pdev->rom_base_reg, rom_reg_orig); -return ; + found =readb (p) ==0x55 && +readb (p +1 ) ==0xaa && +find_eth_addr_in_vpd (p, (64 *1024 ), dev_addr); +pci_unmap_rom (pdev, p); +if (found) +return ; + } -use_random:/* Sun MAC prefix then 3 random bytes. */ dev_addr[0 ] =0x08 ; dev_addr[1 ] =0x00 ;
drivers/net/sunhme.c +18 -27
67 lines not on this page · raw message
drivers/usb/serial/ftdi_sio.c +1 -1
@@ -874,7 +874,7 @@ static void ftdi_determine_type(struct uunsigned interfaces;/* Assume it is not the original SIO device for now. */ - priv->baud_base =48000000 /16 ; + priv->baud_base =48000000 /2 ; priv->write_offset =0 ; version =le16_to_cpu (udev->descriptor.bcdDevice);
fs/compat_ioctl.c +5 -2
@@ -798,13 +798,16 @@ static int routing_ioctl(unsigned int fd r = (void *) &r4; } -if (ret) -return -EFAULT ; +if (ret) { + ret = -EFAULT ; + goto out; + }set_fs (KERNEL_DS ); ret =sys_ioctl (fd, cmd, (unsigned long ) r);set_fs (old_fs); +out:if (mysock)sockfd_put (mysock);
fs/jfs/inode.c +12 -12
@@ -128,21 +128,21 @@ void jfs_delete_inode(struct inode *inod {jfs_info ("In jfs_delete_inode, inode = 0x%p" , inode); -if (is_bad_inode (inode) || - (JFS_IP (inode)->fileset !=cpu_to_le32 (FILESYSTEM_I ))) -return ; +if (!is_bad_inode (inode) && + (JFS_IP (inode)->fileset ==cpu_to_le32 (FILESYSTEM_I ))) { -if (test_cflag (COMMIT_Freewmap, inode)) -jfs_free_zero_link (inode); +if (test_cflag (COMMIT_Freewmap, inode)) +jfs_free_zero_link (inode); -diFree (inode); +diFree (inode); -/* -* Free the inode from the quota allocation. -*/ -DQUOT_INIT (inode); -DQUOT_FREE_INODE (inode); -DQUOT_DROP (inode); +/* +* Free the inode from the quota allocation. +*/ +DQUOT_INIT (inode); +DQUOT_FREE_INODE (inode); +DQUOT_DROP (inode); + }clear_inode (inode); }
mm/mempolicy.c +6 -1
@@ -333,8 +333,13 @@ check_range(struct mm_struct *mm, unsignif (prev && prev->vm_end < vma->vm_start)return ERR_PTR (-EFAULT );if ((flags &MPOL_MF_STRICT ) && !is_vm_hugetlb_page (vma)) { +unsigned long endvma = vma->vm_end; +if (endvma > end) + endvma = end; +if (vma->vm_start > start) + start = vma->vm_start; err =check_pgd_range (vma->vm_mm, - vma->vm_start, vma->vm_end, nodes); + start, endvma, nodes);if (err) { first =ERR_PTR (err);break ;
net/ipv4/netfilter/ipt_MASQUERADE.c +6 -0
@@ -95,6 +95,12 @@ masquerade_target(struct sk_buff **pskb,IP_NF_ASSERT (ct && (ctinfo ==IP_CT_NEW || ctinfo ==IP_CT_RELATED || ctinfo ==IP_CT_RELATED +IP_CT_IS_REPLY )); +/* Source address is 0.0.0.0 - locally generated packet that is +* probably not supposed to be masqueraded. +*/ +if (ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.ip ==0 ) +return NF_ACCEPT ; + mr = targinfo; rt = (struct rtable *)(*pskb)->dst; newsrc =inet_select_addr (out, rt->rt_gateway,RT_SCOPE_UNIVERSE );
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 13 -EXTRAVERSION = .1 +EXTRAVERSION = .2 NAME=Woozy Numbat # *DOCUMENTATION*
arch/x86_64/ia32/ia32_ioctl.c +13 -4
@@ -24,17 +24,26 @@static int tiocgdev (unsigned fd,unsigned cmd,unsigned int __user *ptr) { -struct file *file =fget (fd); +struct file *file;struct tty_struct *real_tty; +int fput_needed, ret; + file =fget_light (fd, &fput_needed);if (!file)return -EBADF ; + + ret = -EINVAL ;if (file->f_op->ioctl != tty_ioctl) -return -EINVAL ; + goto out; real_tty = (struct tty_struct *)file->private_data;if (!real_tty) -return -EINVAL ; -return put_user (new_encode_dev (tty_devnum (real_tty)), ptr); + goto out; + + ret =put_user (new_encode_dev (tty_devnum (real_tty)), ptr); + +out: +fput_light (file, fput_needed); +return ret; }#define RTC_IRQP_READ32 _IOR('p', 0x0b, unsigned int)/* Read IRQ rate */
drivers/ide/pci/cmd64x.c +1 -1
@@ -608,7 +608,7 @@ static unsigned int __devinit init_chips#ifdef __i386__if (dev->resource[PCI_ROM_RESOURCE ].start) { -pci_write_config_byte (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE ); +pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE );printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, dev->resource[PCI_ROM_RESOURCE ].start); }#endif
drivers/ide/pci/hpt34x.c +1 -1
@@ -173,7 +173,7 @@ static unsigned int __devinit init_chipsif (cmd &PCI_COMMAND_MEMORY ) {if (pci_resource_start (dev,PCI_ROM_RESOURCE )) { -pci_write_config_byte (dev,PCI_ROM_ADDRESS , +pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE );printk (KERN_INFO "HPT345: ROM enabled at 0x%08lx\n" , dev->resource[PCI_ROM_RESOURCE ].start);
drivers/ide/pci/hpt366.c +6 -2
@@ -1334,9 +1334,13 @@ static int __devinit init_hpt366(structstatic unsigned int __devinit init_chipset_hpt366 (struct pci_dev *dev,const char *name) {int ret =0 ; -/* FIXME: Not portable */ + +/* +* FIXME: Not portable. Also, why do we enable the ROM in the first place? +* We don't seem to be using it. +*/ if (dev->resource[PCI_ROM_RESOURCE ].start) -pci_write_config_byte (dev,PCI_ROM_ADDRESS , +pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE );pci_write_config_byte (dev,PCI_CACHE_LINE_SIZE , (L1_CACHE_BYTES /4 ));
drivers/net/forcedeth.c +3 -0
@@ -1888,6 +1888,9 @@ static int nv_open(struct net_device *dewritel (NVREG_MIISTAT_MASK , base + NvRegMIIStatus);dprintk (KERN_INFO "startup: got 0x%08x.\n" , miistat); } +/* set linkspeed to invalid value, thus force nv_update_linkspeed +* to init hw */ + np->linkspeed =0 ; ret =nv_update_linkspeed (dev);nv_start_rx (dev);nv_start_tx (dev);
drivers/net/sungem.c +14 -22
@@ -2816,7 +2816,7 @@ static int gem_ioctl(struct net_device *#if (!defined(__sparc__) && !defined(CONFIG_PPC_PMAC ))/* Fetch MAC address from vital product data of PCI ROM. */ -static void find_eth_addr_in_vpd (void __iomem *rom_base,int len,unsigned char *dev_addr) +static int find_eth_addr_in_vpd (void __iomem *rom_base,int len,unsigned char *dev_addr) {int this_offset;
@@ -2837,35 +2837,27 @@ static void find_eth_addr_in_vpd(void __for (i =0 ; i <6 ; i++) dev_addr[i] =readb (p + i); -break ; +return 1 ; } +return 0 ; }static void get_gem_mac_nonobp (struct pci_dev *pdev,unsigned char *dev_addr) { -u32 rom_reg_orig; -void __iomem *p; - -if (pdev->resource[PCI_ROM_RESOURCE ].parent ==NULL ) { -if (pci_assign_resource (pdev,PCI_ROM_RESOURCE ) <0 ) - goto use_random; - } - -pci_read_config_dword (pdev, pdev->rom_base_reg, &rom_reg_orig); -pci_write_config_dword (pdev, pdev->rom_base_reg, - rom_reg_orig |PCI_ROM_ADDRESS_ENABLE ); +size_t size; +void __iomem *p =pci_map_rom (pdev, &size); - p =ioremap (pci_resource_start (pdev,PCI_ROM_RESOURCE ), (64 *1024 )); -if (p !=NULL &&readb (p) ==0x55 &&readb (p +1 ) ==0xaa ) -find_eth_addr_in_vpd (p, (64 *1024 ), dev_addr); +if (p) { +int found; -if (p !=NULL ) -iounmap (p); - -pci_write_config_dword (pdev, pdev->rom_base_reg, rom_reg_orig); -return ; + found =readb (p) ==0x55 && +readb (p +1 ) ==0xaa && +find_eth_addr_in_vpd (p, (64 *1024 ), dev_addr); +pci_unmap_rom (pdev, p); +if (found) +return ; + } -use_random:/* Sun MAC prefix then 3 random bytes. */ dev_addr[0 ] =0x08 ; dev_addr[1 ] =0x00 ;
drivers/net/sunhme.c +18 -27
67 lines not on this page · raw message
drivers/usb/serial/ftdi_sio.c +1 -1
@@ -874,7 +874,7 @@ static void ftdi_determine_type(struct uunsigned interfaces;/* Assume it is not the original SIO device for now. */ - priv->baud_base =48000000 /16 ; + priv->baud_base =48000000 /2 ; priv->write_offset =0 ; version =le16_to_cpu (udev->descriptor.bcdDevice);
fs/compat_ioctl.c +5 -2
@@ -798,13 +798,16 @@ static int routing_ioctl(unsigned int fd r = (void *) &r4; } -if (ret) -return -EFAULT ; +if (ret) { + ret = -EFAULT ; + goto out; + }set_fs (KERNEL_DS ); ret =sys_ioctl (fd, cmd, (unsigned long ) r);set_fs (old_fs); +out:if (mysock)sockfd_put (mysock);
fs/jfs/inode.c +12 -12
@@ -128,21 +128,21 @@ void jfs_delete_inode(struct inode *inod {jfs_info ("In jfs_delete_inode, inode = 0x%p" , inode); -if (is_bad_inode (inode) || - (JFS_IP (inode)->fileset !=cpu_to_le32 (FILESYSTEM_I ))) -return ; +if (!is_bad_inode (inode) && + (JFS_IP (inode)->fileset ==cpu_to_le32 (FILESYSTEM_I ))) { -if (test_cflag (COMMIT_Freewmap, inode)) -jfs_free_zero_link (inode); +if (test_cflag (COMMIT_Freewmap, inode)) +jfs_free_zero_link (inode); -diFree (inode); +diFree (inode); -/* -* Free the inode from the quota allocation. -*/ -DQUOT_INIT (inode); -DQUOT_FREE_INODE (inode); -DQUOT_DROP (inode); +/* +* Free the inode from the quota allocation. +*/ +DQUOT_INIT (inode); +DQUOT_FREE_INODE (inode); +DQUOT_DROP (inode); + }clear_inode (inode); }
mm/mempolicy.c +6 -1
@@ -333,8 +333,13 @@ check_range(struct mm_struct *mm, unsignif (prev && prev->vm_end < vma->vm_start)return ERR_PTR (-EFAULT );if ((flags &MPOL_MF_STRICT ) && !is_vm_hugetlb_page (vma)) { +unsigned long endvma = vma->vm_end; +if (endvma > end) + endvma = end; +if (vma->vm_start > start) + start = vma->vm_start; err =check_pgd_range (vma->vm_mm, - vma->vm_start, vma->vm_end, nodes); + start, endvma, nodes);if (err) { first =ERR_PTR (err);break ;
net/ipv4/netfilter/ipt_MASQUERADE.c +6 -0
@@ -95,6 +95,12 @@ masquerade_target(struct sk_buff **pskb,IP_NF_ASSERT (ct && (ctinfo ==IP_CT_NEW || ctinfo ==IP_CT_RELATED || ctinfo ==IP_CT_RELATED +IP_CT_IS_REPLY )); +/* Source address is 0.0.0.0 - locally generated packet that is +* probably not supposed to be masqueraded. +*/ +if (ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.ip ==0 ) +return NF_ACCEPT ; + mr = targinfo; rt = (struct rtable *)(*pskb)->dst; newsrc =inet_select_addr (out, rt->rt_gateway,RT_SCOPE_UNIVERSE );