Linux 2.6.25.8
Subsystems (9)
We (the -stable team) are announcing the release of the 2.6.25.8 kernel.
It contains a number of assorted bugfixes all over the tree. Users are encouraged to update.
I'll also be replying to this message with a copy of the patch between 2.6.25.7 and 2.6.25.8
The updated 2.6.25.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.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.25.y.git;a=summarythanks,
greg k-h
--------
Makefile | 2 +- arch/x86/kernel/process_32.c | 23 +++++++++++++++++++++-- arch/x86/kernel/process_64.c | 24 +++++++++++++++++++++--- arch/x86/lib/copy_user_64.S | 25 +++++++++++-------------- arch/x86/lib/copy_user_nocache_64.S | 25 +++++++++++-------------- drivers/acpi/tables/tbinstal.c | 18 +++++++----------- drivers/ide/pci/opti621.c | 23 ++++------------------- drivers/net/virtio_net.c | 8 +++++--- drivers/net/wireless/b43/b43.h | 1 - drivers/net/wireless/b43/dma.c | 2 +- drivers/net/wireless/b43/main.c | 16 ++++++++++------ drivers/scsi/hosts.c | 5 +++-- drivers/scsi/sr.c | 3 +++ drivers/serial/8250.c | 4 +++- net/netfilter/nf_conntrack_core.c | 3 +-- net/netfilter/nf_conntrack_h323_main.c | 22 +++++++++++++++------- 16 files changed, 117 insertions(+), 87 deletions(-)
Alan Cox (1):
Fix tty speed handling on 8250
Bartlomiej Zolnierkiewicz (2):
opti621: disable read prefetch
opti621: remove DMA support
Bob Moore (1):
ACPICA: Ignore ACPI table signature for Load() operator
Greg Kroah-Hartman (1):
Linux 2.6.25.8
Ingo Molnar (1):
x86: remove mwait capability C-state check
James Bottomley (1):
SCSI: sr: fix corrupt CD data after media change and delay
Linus Torvalds (1):
x86-64: Fix "bytes left to copy" return value for copy_from_user()
Mark McLoughlin (1):
virtio_net: Fix skb->csum_start computation
Michael Buesch (2):
b43: Fix noise calculation WARN_ON
b43: Fix possible NULL pointer dereference in DMA code
Mike Christie (1):
scsi_host regression: fix scsi host leak
Patrick McHardy (3):
nf_conntrack: fix ctnetlink related crash in nf_nat_setup_info()
nf_conntrack_h323: fix module unload crash
nf_conntrack_h323: fix memory leak in module initialization error path
Thomas Gleixner (1):
x86: disable mwait for AMD family 10H/11H CPUs
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 25 -EXTRAVERSION = .7 +EXTRAVERSION = .8 NAME = Funky Weasel is Jiggy wit it # *DOCUMENTATION*
arch/x86/kernel/process_32.c +21 -2
@@ -259,12 +259,31 @@ static void mwait_idle(void)mwait_idle_with_hints (0 ,0 ); } +/* +* mwait selection logic: +* +* It depends on the CPU. For AMD CPUs that support MWAIT this is +* wrong. Family 0x10 and 0x11 CPUs will enter C1 on HLT. Powersavings +* then depend on a clock divisor and current Pstate of the core. If +* all cores of a processor are in halt state (C1) the processor can +* enter the C1E (C1 enhanced) state. If mwait is used this will never +* happen. +* +* idle=mwait overrides this decision and forces the usage of mwait. +*/ static int __cpuinit mwait_usable (const struct cpuinfo_x86 *c) {if (force_mwait)return 1 ; -/* Any C1 states supported? */ -return c->cpuid_level >=5 && ((cpuid_edx (5 ) >>4 ) &0xf ) >0 ; + +if (c->x86_vendor ==X86_VENDOR_AMD ) { +switch (c->x86) { +case 0x10 : +case 0x11 : +return 0 ; + } + } +return 1 ; }void __cpuinit select_idle_routine (const struct cpuinfo_x86 *c)
arch/x86/kernel/process_64.c +21 -3
@@ -254,13 +254,31 @@ static void mwait_idle(void) } } - +/* +* mwait selection logic: +* +* It depends on the CPU. For AMD CPUs that support MWAIT this is +* wrong. Family 0x10 and 0x11 CPUs will enter C1 on HLT. Powersavings +* then depend on a clock divisor and current Pstate of the core. If +* all cores of a processor are in halt state (C1) the processor can +* enter the C1E (C1 enhanced) state. If mwait is used this will never +* happen. +* +* idle=mwait overrides this decision and forces the usage of mwait. +*/ static int __cpuinit mwait_usable (const struct cpuinfo_x86 *c) {if (force_mwait)return 1 ; -/* Any C1 states supported? */ -return c->cpuid_level >=5 && ((cpuid_edx (5 ) >>4 ) &0xf ) >0 ; + +if (c->x86_vendor ==X86_VENDOR_AMD ) { +switch (c->x86) { +case 0x10 : +case 0x11 : +return 0 ; + } + } +return 1 ; }void __cpuinit select_idle_routine (const struct cpuinfo_x86 *c)
arch/x86/lib/copy_user_64.S +11 -14
@@ -217,19 +217,19 @@ ENTRY(copy_user_generic_unrolled) /* table sorted by exception address */ .section __ex_table,"a" .align 8 - .quad .Ls1,.Ls1e - .quad .Ls2,.Ls2e - .quad .Ls3,.Ls3e - .quad .Ls4,.Ls4e - .quad .Ld1,.Ls1e + .quad .Ls1,.Ls1e /* Ls1-Ls4 have copied zero bytes */ + .quad .Ls2,.Ls1e + .quad .Ls3,.Ls1e + .quad .Ls4,.Ls1e + .quad .Ld1,.Ls1e /* Ld1-Ld4 have copied 0-24 bytes */ .quad .Ld2,.Ls2e .quad .Ld3,.Ls3e .quad .Ld4,.Ls4e - .quad .Ls5,.Ls5e - .quad .Ls6,.Ls6e - .quad .Ls7,.Ls7e - .quad .Ls8,.Ls8e - .quad .Ld5,.Ls5e + .quad .Ls5,.Ls5e /* Ls5-Ls8 have copied 32 bytes */ + .quad .Ls6,.Ls5e + .quad .Ls7,.Ls5e + .quad .Ls8,.Ls5e + .quad .Ld5,.Ls5e /* Ld5-Ld8 have copied 32-56 bytes */ .quad .Ld6,.Ls6e .quad .Ld7,.Ls7e .quad .Ld8,.Ls8e
@@ -244,11 +244,8 @@ ENTRY(copy_user_generic_unrolled) .quad .Le5,.Le_zero .previous - /* compute 64-offset for main loop. 8 bytes accuracy with error on the - pessimistic side. this is gross. it would be better to fix the - interface. */ /* eax: zero, ebx: 64 */ -.Ls1e: addl $8,%eax +.Ls1e: addl $8,%eax /* eax is bytes left uncopied within the loop (Ls1e: 64 .. Ls8e: 8) */ .Ls2e: addl $8,%eax .Ls3e: addl $8,%eax .Ls4e: addl $8,%eax
arch/x86/lib/copy_user_nocache_64.S +11 -14
@@ -145,19 +145,19 @@ ENTRY(__copy_user_nocache) /* table sorted by exception address */ .section __ex_table,"a" .align 8 - .quad .Ls1,.Ls1e - .quad .Ls2,.Ls2e - .quad .Ls3,.Ls3e - .quad .Ls4,.Ls4e - .quad .Ld1,.Ls1e + .quad .Ls1,.Ls1e /* .Ls[1-4] - 0 bytes copied */ + .quad .Ls2,.Ls1e + .quad .Ls3,.Ls1e + .quad .Ls4,.Ls1e + .quad .Ld1,.Ls1e /* .Ld[1-4] - 0..24 bytes coped */ .quad .Ld2,.Ls2e .quad .Ld3,.Ls3e .quad .Ld4,.Ls4e - .quad .Ls5,.Ls5e - .quad .Ls6,.Ls6e - .quad .Ls7,.Ls7e - .quad .Ls8,.Ls8e - .quad .Ld5,.Ls5e + .quad .Ls5,.Ls5e /* .Ls[5-8] - 32 bytes copied */ + .quad .Ls6,.Ls5e + .quad .Ls7,.Ls5e + .quad .Ls8,.Ls5e + .quad .Ld5,.Ls5e /* .Ld[5-8] - 32..56 bytes copied */ .quad .Ld6,.Ls6e .quad .Ld7,.Ls7e .quad .Ld8,.Ls8e
@@ -172,11 +172,8 @@ ENTRY(__copy_user_nocache) .quad .Le5,.Le_zero .previous - /* compute 64-offset for main loop. 8 bytes accuracy with error on the - pessimistic side. this is gross. it would be better to fix the - interface. */ /* eax: zero, ebx: 64 */ -.Ls1e: addl $8,%eax +.Ls1e: addl $8,%eax /* eax: bytes left uncopied: Ls1e: 64 .. Ls8e: 8 */ .Ls2e: addl $8,%eax .Ls3e: addl $8,%eax .Ls4e: addl $8,%eax
drivers/acpi/tables/tbinstal.c +7 -11
@@ -123,17 +123,13 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, } } -/* The table must be either an SSDT or a PSDT or an OEMx */ - -if ((!ACPI_COMPARE_NAME (table_desc->pointer->signature,ACPI_SIG_PSDT )) - && - (!ACPI_COMPARE_NAME (table_desc->pointer->signature,ACPI_SIG_SSDT )) - && (strncmp (table_desc->pointer->signature,"OEM" ,3 ))) { -ACPI_ERROR ((AE_INFO , -"Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx" , - table_desc->pointer->signature)); -return_ACPI_STATUS (AE_BAD_SIGNATURE ); - } +/* +* Originally, we checked the table signature for "SSDT" or "PSDT" here. +* Next, we added support for OEMx tables, signature "OEM". +* Valid tables were encountered with a null signature, so we've just +* given up on validating the signature, since it seems to be a waste +* of code. The original code was removed (05/2008). +*/ (void )acpi_ut_acquire_mutex (ACPI_MTX_TABLES );
drivers/ide/pci/opti621.c +4 -19
@@ -103,18 +103,6 @@* address: 50 ns, data: 50 ns, recovery: 100 ns. */ -/* #define READ_PREFETCH 0 */ -/* Uncomment for disable read prefetch. -* There is some readprefetch capatibility in hdparm, -* but when I type hdparm -P 1 /dev/hda, I got errors -* and till reset drive is inaccessible. -* This (hw) read prefetch is safe on my drive. -*/ - -#ifndef READ_PREFETCH -#define READ_PREFETCH 0x40/* read prefetch is enabled */ -#endif /* else read prefetch is disabled */ -#define READ_REG 0/* index of Read cycle timing register */ #define WRITE_REG 1/* index of Write cycle timing register */ #define CNTRL_REG 3/* index of Control register */
@@ -260,7 +248,8 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) cycle1 = ((first.data_time-1 )<<4 ) | (first.recovery_time-2 ); cycle2 = ((second.data_time-1 )<<4 ) | (second.recovery_time-2 ); - misc =READ_PREFETCH | ((ax-1 )<<4 ) | ((drdy-2 )<<1 ); + + misc = ((ax -1 ) <<4 ) | ((drdy -2 ) <<1 );#ifdef OPTI621_DEBUG printk("%s: master: address: %d, data: %d, "
@@ -335,20 +324,16 @@ static const struct ide_port_info opti621_chipsets[] __devinitdata = { .name = "OPTI621", .init_hwif = init_hwif_opti621, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, - .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | + .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO3, - .swdma_mask = ATA_SWDMA2, - .mwdma_mask = ATA_MWDMA2, },{ /* 1 */ .name = "OPTI621X", .init_hwif = init_hwif_opti621, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, - .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | + .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO3, - .swdma_mask = ATA_SWDMA2, - .mwdma_mask = ATA_MWDMA2, } };
drivers/net/virtio_net.c +5 -3
@@ -83,9 +83,7 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb,BUG_ON (len >MAX_PACKET_LEN );skb_trim (skb, len); - skb->protocol =eth_type_trans (skb, dev); -pr_debug ("Receiving skb proto 0x%04x len %i type %i\n" , -ntohs (skb->protocol), skb->len, skb->pkt_type); + dev->stats.rx_bytes += skb->len; dev->stats.rx_packets++;
@@ -95,6 +93,10 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb, goto frame_err; } + skb->protocol =eth_type_trans (skb, dev); +pr_debug ("Receiving skb proto 0x%04x len %i type %i\n" , +ntohs (skb->protocol), skb->len, skb->pkt_type); +if (hdr->gso_type !=VIRTIO_NET_HDR_GSO_NONE ) {pr_debug ("GSO!\n" );switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN ) {
drivers/net/wireless/b43/b43.h +0 -1
@@ -596,7 +596,6 @@ struct b43_dma {/* Context information for a noise calculation (Link Quality). */ struct b43_noise_calculation { -u8 channel_at_start;bool calculation_running;u8 nr_samples;s8 samples[8 ][4 ];
drivers/net/wireless/b43/dma.c +1 -1
@@ -850,6 +850,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,if (!ring) goto out; ring->type = type; + ring->dev = dev; nr_slots =B43_RXRING_SLOTS ;if (for_tx)
@@ -901,7 +902,6 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, DMA_TO_DEVICE); } - ring->dev = dev; ring->nr_slots = nr_slots; ring->mmio_base =b43_dmacontroller_base (type, controller_index); ring->index = controller_index;
drivers/net/wireless/b43/main.c +10 -6
@@ -1027,7 +1027,6 @@ static void b43_generate_noise_sample(struct b43_wldev *dev)b43_jssi_write (dev,0x7F7F7F7F );b43_write32 (dev,B43_MMIO_MACCMD ,b43_read32 (dev,B43_MMIO_MACCMD ) |B43_MACCMD_BGNOISE ); -B43_WARN_ON (dev->noisecalc.channel_at_start != dev->phy.channel); }static void b43_calculate_link_quality (struct b43_wldev *dev)
@@ -1036,7 +1035,6 @@ static void b43_calculate_link_quality(struct b43_wldev *dev)if (dev->noisecalc.calculation_running)return ; - dev->noisecalc.channel_at_start = dev->phy.channel; dev->noisecalc.calculation_running =1 ; dev->noisecalc.nr_samples =0 ;
@@ -1053,9 +1051,16 @@ static void handle_irq_noise(struct b43_wldev *dev)/* Bottom half of Link Quality calculation. */ +/* Possible race condition: It might be possible that the user +* changed to a different channel in the meantime since we +* started the calculation. We ignore that fact, since it's +* not really that much of a problem. The background noise is +* an estimation only anyway. Slightly wrong results will get damped +* by the averaging of the 8 sample rounds. Additionally the +* value is shortlived. So it will be replaced by the next noise +* calculation round soon. */ +B43_WARN_ON (!dev->noisecalc.calculation_running); -if (dev->noisecalc.channel_at_start != phy->channel) - goto drop_calculation; *((__le32 *)noise) =cpu_to_le32 (b43_jssi_read (dev));if (noise[0 ] ==0x7F || noise[1 ] ==0x7F || noise[2 ] ==0x7F || noise[3 ] ==0x7F )
@@ -1096,11 +1101,10 @@ static void handle_irq_noise(struct b43_wldev *dev) average -=48 ; dev->stats.link_noise = average; - drop_calculation: dev->noisecalc.calculation_running =0 ;return ; } - generate_new: +generate_new:b43_generate_noise_sample (dev); }
drivers/scsi/hosts.c +3 -2
@@ -455,9 +455,10 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)struct Scsi_Host *shost =ERR_PTR (-ENXIO ); cdev =class_find_child (&shost_class, &hostnum, __scsi_host_match); -if (cdev) +if (cdev) { shost =scsi_host_get (class_to_shost (cdev)); - +class_device_put (cdev); + }return shost; }EXPORT_SYMBOL (scsi_host_lookup);
drivers/scsi/sr.c +3 -0
@@ -178,6 +178,9 @@ int sr_test_unit_ready(struct scsi_device *sdev, struct scsi_sense_hdr *sshdr) the_result =scsi_execute_req (sdev, cmd,DMA_NONE ,NULL ,0 , sshdr,SR_TIMEOUT , retries--); +if (scsi_sense_valid (sshdr) && + sshdr->sense_key ==UNIT_ATTENTION ) + sdev->changed =1 ; } while (retries > 0 && (!scsi_status_is_good(the_result) ||
drivers/serial/8250.c +3 -1
@@ -2174,7 +2174,9 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios, }serial8250_set_mctrl (&up->port, up->port.mctrl);spin_unlock_irqrestore (&up->port.lock, flags); -tty_termios_encode_baud_rate (termios, baud, baud); +/* Don't rewrite B0 */ +if (tty_termios_baud_rate (termios)) +tty_termios_encode_baud_rate (termios, baud, baud); } static void
net/netfilter/nf_conntrack_core.c +1 -2
@@ -199,8 +199,6 @@ destroy_conntrack(struct nf_conntrack *nfct)if (l4proto && l4proto->destroy) l4proto->destroy (ct); -nf_ct_ext_destroy (ct); -rcu_read_unlock ();spin_lock_bh (&nf_conntrack_lock);
@@ -523,6 +521,7 @@ static void nf_conntrack_free_rcu(struct rcu_head *head)void nf_conntrack_free (struct nf_conn *ct) { +nf_ct_ext_destroy (ct);call_rcu (&ct->rcu, nf_conntrack_free_rcu); }EXPORT_SYMBOL_GPL (nf_conntrack_free);
net/netfilter/nf_conntrack_h323_main.c +15 -7
@@ -617,6 +617,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_h245 __read_mostly = { .me = THIS_MODULE, .max_expected = H323_RTP_CHANNEL_MAX * 4 + 2 /* T.120 */, .timeout = 240, + .tuple.src.l3num = AF_UNSPEC, .tuple.dst.protonum = IPPROTO_UDP, .help = h245_help };
@@ -1758,6 +1759,7 @@ static void __exit nf_conntrack_h323_fini(void)nf_conntrack_helper_unregister (&nf_conntrack_helper_ras[0 ]);nf_conntrack_helper_unregister (&nf_conntrack_helper_q931[1 ]);nf_conntrack_helper_unregister (&nf_conntrack_helper_q931[0 ]); +nf_conntrack_helper_unregister (&nf_conntrack_helper_h245);kfree (h323_buffer);pr_debug ("nf_ct_h323: fini\n" ); }
@@ -1770,28 +1772,34 @@ static int __init nf_conntrack_h323_init(void) h323_buffer =kmalloc (65536 ,GFP_KERNEL );if (!h323_buffer)return -ENOMEM ; - ret =nf_conntrack_helper_register (&nf_conntrack_helper_q931[0 ]); + ret =nf_conntrack_helper_register (&nf_conntrack_helper_h245);if (ret <0 ) goto err1; - ret =nf_conntrack_helper_register (&nf_conntrack_helper_q931[1 ]); + ret =nf_conntrack_helper_register (&nf_conntrack_helper_q931[0 ]);if (ret <0 ) goto err2; - ret =nf_conntrack_helper_register (&nf_conntrack_helper_ras[0 ]); + ret =nf_conntrack_helper_register (&nf_conntrack_helper_q931[1 ]);if (ret <0 ) goto err3; - ret =nf_conntrack_helper_register (&nf_conntrack_helper_ras[1 ]); + ret =nf_conntrack_helper_register (&nf_conntrack_helper_ras[0 ]);if (ret <0 ) goto err4; + ret =nf_conntrack_helper_register (&nf_conntrack_helper_ras[1 ]); +if (ret <0 ) + goto err5;pr_debug ("nf_ct_h323: init success\n" );return 0 ; -err4: +err5:nf_conntrack_helper_unregister (&nf_conntrack_helper_ras[0 ]); -err3: +err4:nf_conntrack_helper_unregister (&nf_conntrack_helper_q931[1 ]); -err2: +err3:nf_conntrack_helper_unregister (&nf_conntrack_helper_q931[0 ]); +err2: +nf_conntrack_helper_unregister (&nf_conntrack_helper_h245); err1: +kfree (h323_buffer);return ret; }