commit d25e26b61d59370eee8b7f2634641eb0fa76e952 Author: Linus Torvalds Date: Mon Aug 25 14:15:38 2008 -0700 [x86] Clean up MAXSMP Kconfig, and limit NR_CPUS to 512 This fixes a regression that was indirectly caused by commit 1184dc2ffe2c8fb9afb766d870850f2c3165ef25 ("x86: modify Kconfig to allow up to 4096 cpus"). Allowing 4k CPU's is not practical at this time, because we still have a number of places that have several 'cpumask_t's on the stack, and a 4k-bit cpumask is 512 bytes of stack-space for each such variable. This literally caused functions like 'smp_call_function_mask' to have a 2.5kB stack frame, and several functions to have 2kB stackframes. With an 8kB stack total, smashing the stack was simply much too likely. At least bugzilla entry http://bugzilla.kernel.org/show_bug.cgi?id=11342 was due to this. The earlier commit to not inline load_module() into sys_init_module() fixed the particular symptoms of this that Alan Brunelle saw in that bugzilla entry, but the huge stack waste by cpumask_t's was the more direct cause. Some day we'll have allocation helpers that allocate large CPU masks dynamically, but in the meantime we simply cannot allow cpumasks this large. Cc: Alan D. Brunelle Cc: Mike Travis Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Linus Torvalds commit 426e1eafdbd1d1349c852a2b90c7f20879d52ed2 Merge: ec73adb... 38c052f... Author: Linus Torvalds Date: Mon Aug 25 11:26:56 2008 -0700 Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rtc: fix deadlock commit ec73adba51b4dae11134f7e6ffc84feade9f15fa Merge: cc556c5... 2a61812... Author: Linus Torvalds Date: Mon Aug 25 11:26:33 2008 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: add X86_FEATURE_XMM4_2 definitions x86: fix cpufreq + sched_clock() regression x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3 x86: do not enable TSC notifier if we don't need it x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs x86: fix: make PCI ECS for AMD CPUs hotplug capable x86: fix: do not run code in amd_bus.c on non-AMD CPUs commit cc556c5c92a45763e23015a31efb27005a6132fa Merge: a56cb4e... 354879b... Author: Linus Torvalds Date: Mon Aug 25 11:26:02 2008 -0700 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched_clock: fix cpu_clock() commit a56cb4ecbdb66a504601dfacc31cd0cf91c97e7f Merge: b9b5036... ebca4f1... Author: Linus Torvalds Date: Mon Aug 25 11:25:10 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: fix reference leak in pci_get_dev_by_id() PCI: shpchp: Rename duplicate slot name N as N-1, N-2, N-M... PCI: pciehp: Rename duplicate slot name N as N-1, N-2, N-M... commit b9b50363e6c60d471fe2e71e48d434aad58b3749 Merge: 087713f... 3051e41... Author: Linus Torvalds Date: Mon Aug 25 11:24:51 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: ASoC: Fix double free and memory leak in many codec drivers ALSA: CA0106 on MSI K8N Diamond PLUS Motherboard commit 087713f4548e598be64bce28bae36009d41038a4 Merge: 7cf0bed... 1327138... Author: Linus Torvalds Date: Mon Aug 25 11:19:53 2008 -0700 Merge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm * 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: KVM: fix userspace ABI breakage KVM: MMU: Fix torn shadow pte KVM: Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot commit 7cf0bed9c322992c7d5f912cb9a83d2809e71881 Merge: ffb4ba7... 1dc3e3b... Author: Linus Torvalds Date: Mon Aug 25 11:18:49 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: lguest: update commentry stop_machine: Remove deprecated stop_machine_run stop_machine: wean Xen off stop_machine_run virtio_balloon: fix towards_target when deflating balloon commit ffb4ba76a25ab6c9deeec33e4f58395586ca747c Author: Linus Torvalds Date: Mon Aug 25 11:10:26 2008 -0700 [module] Don't let gcc inline load_module() 'load_module()' is a complex function that contains all the ELF section logic, and inlining it is utterly insane. But gcc will do it, simply because there is only one call-site. As a result, all the stack space that is allocated for all the work to load the module will still be active when we actually call the module init sequence, and the deep call chain makes stack overflows happen. And stack overflows are really hard to debug, because they not only corrupt random pages below the stack, but also corrupt the thread_info structure that is allocated under the stack. In this case, Alan Brunelle reported some crazy oopses at bootup, after loading the processor module that ends up doing complex ACPI stuff and has quite a deep callchain. This should fix it, and is the sane thing to do regardless. Cc: Alan D. Brunelle Cc: Arjan van de Ven Cc: Rusty Russell Signed-off-by: Linus Torvalds commit 354879bb977e06695993435745f06a0f6d39ce2b Author: Peter Zijlstra Date: Mon Aug 25 17:15:34 2008 +0200 sched_clock: fix cpu_clock() This patch fixes 3 issues: a) it removes the dependency on jiffies, because jiffies are incremented by a single CPU, and the tick is not synchronized between CPUs. Therefore relying on it to calculate a window to clip whacky TSC values doesn't work as it can drift around. So instead use [GTOD, GTOD+TICK_NSEC) as the window. b) __update_sched_clock() did (roughly speaking): delta = sched_clock() - scd->tick_raw; clock += delta; Which gives exponential growth, instead of linear. c) allows the sched_clock_cpu() value to warp the u64 without breaking. the results are more reliable sched_clock() deltas: before after sched_clock cpu_clock: 15750 51312 51488 cpu_clock: 59719 51052 50947 cpu_clock: 15879 51249 51061 cpu_clock: 1 50933 51198 cpu_clock: 1 50931 51039 cpu_clock: 1 51093 50981 cpu_clock: 1 51043 51040 cpu_clock: 1 50959 50938 cpu_clock: 1 50981 51011 cpu_clock: 1 51364 51212 cpu_clock: 1 51219 51273 cpu_clock: 1 51389 51048 cpu_clock: 1 51285 51611 cpu_clock: 1 50964 51137 cpu_clock: 1 50973 50968 cpu_clock: 1 50967 50972 cpu_clock: 1 58910 58485 cpu_clock: 1 51082 51025 cpu_clock: 1 50957 50958 cpu_clock: 1 50958 50957 cpu_clock: 1006128 51128 50971 cpu_clock: 1 51107 51155 cpu_clock: 1 51371 51081 cpu_clock: 1 51104 51365 cpu_clock: 1 51363 51309 cpu_clock: 1 51107 51160 cpu_clock: 1 51139 51100 cpu_clock: 1 51216 51136 cpu_clock: 1 51207 51215 cpu_clock: 1 51087 51263 cpu_clock: 1 51249 51177 cpu_clock: 1 51519 51412 cpu_clock: 1 51416 51255 cpu_clock: 1 51591 51594 cpu_clock: 1 50966 51374 cpu_clock: 1 50966 50966 cpu_clock: 1 51291 50948 cpu_clock: 1 50973 50867 cpu_clock: 1 50970 50970 cpu_clock: 998306 50970 50971 cpu_clock: 1 50971 50970 cpu_clock: 1 50970 50970 cpu_clock: 1 50971 50971 cpu_clock: 1 50970 50970 cpu_clock: 1 51351 50970 cpu_clock: 1 50970 51352 cpu_clock: 1 50971 50970 cpu_clock: 1 50970 50970 cpu_clock: 1 51321 50971 cpu_clock: 1 50974 51324 Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 2a61812af2e564cba2c8170cf96e1c823210f619 Author: Austin Zhang Date: Mon Aug 25 11:14:51 2008 -0400 x86: add X86_FEATURE_XMM4_2 definitions Added Intel processor SSE4.2 feature flag. No in-tree user at the moment, but makes the tree-merging life easier for the crypto tree. Signed-off-by: Austin Zhang Signed-off-by: Ingo Molnar commit 1327138e294ffda120a50c8f31d792addb196c79 Author: Adrian Bunk Date: Wed Aug 6 01:36:09 2008 +0300 KVM: fix userspace ABI breakage The following part of commit 9ef621d3be56e1188300476a8102ff54f7b6793f (KVM: Support mixed endian machines) changed on the size of a struct that is exported to userspace: include/linux/kvm.h: @@ -318,14 +318,14 @@ struct kvm_trace_rec { __u32 vcpu_id; union { struct { - __u32 cycle_lo, cycle_hi; + __u64 cycle_u64; __u32 extra_u32[KVM_TRC_EXTRA_MAX]; } cycle; struct { __u32 extra_u32[KVM_TRC_EXTRA_MAX]; } nocycle; } u; -}; +} __attribute__((packed)); Packing a struct was the correct idea, but it packed the wrong struct. Signed-off-by: Adrian Bunk Signed-off-by: Avi Kivity commit cd5998ebfbc9e6cb44408efa217c15d7eea13675 Author: Avi Kivity Date: Fri Aug 22 19:19:38 2008 +0300 KVM: MMU: Fix torn shadow pte The shadow code assigns a pte directly in one place, which is nonatomic on i386 can can cause random memory references. Fix by using an atomic setter. Signed-off-by: Avi Kivity commit 18b13e5457041429af3974afd52f647c3a5465dd Author: Eduardo Habkost Date: Tue Aug 19 20:00:08 2008 -0300 KVM: Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot vmlinux.lds expects the fixup code to be on a section named .fixup. The .text.fixup section is not mentioned on vmlinux.lds, and is included on the resulting vmlinux (just after .text) only because of ld heuristics on placing orphan sections. However, placing .text.fixup outside .text breaks the definition of _etext, making it exclude the .text.fixup contents. That makes .text.fixup be ignored by the kernel initialization code that needs to know about section locations, such as the code setting page protection bits. Signed-off-by: Eduardo Habkost Signed-off-by: Avi Kivity commit 1dc3e3bcbfe335843ec938bfdddb34d10f4dd278 Author: Rusty Russell Date: Tue Aug 26 00:19:27 2008 -0500 lguest: update commentry Signed-off-by: Rusty Russell commit bf2002967775cbb233876d51ff94e8daa7e77858 Author: Rusty Russell Date: Tue Aug 26 00:19:27 2008 -0500 stop_machine: Remove deprecated stop_machine_run Everyone should be using stop_machine() now. The staged API transition helped life in linux-next. Signed-off-by: Rusty Russell commit 37a7c0f3e3e808b8d24f2187a25d2de39e46d822 Author: Rusty Russell Date: Tue Aug 26 00:19:26 2008 -0500 stop_machine: wean Xen off stop_machine_run This is the last use of (the deprecated) stop_machine_run in the tree. Signed-off-by: Rusty Russell Acked-by: Jeremy Fitzhardinge commit 532a6086e35fa3b5761e68af36d4e42a550eba15 Author: Anthony Liguori Date: Mon Aug 18 17:15:31 2008 -0500 virtio_balloon: fix towards_target when deflating balloon Both v and vb->num_pages are u32 and unsigned int respectively. If v is less than vb->num_pages (and it is, when deflating the balloon), the result is a very large 32-bit number. Since we're returning a s64, instead of getting the same negative number we desire, we get a very large positive number. This handles the case where v < vb->num_pages and ensures we get a small, negative, s64 as the result. Rusty: please push this for 2.6.27-rc4. It's probably appropriate for the stable tree too as it will cause an unexpected OOM when ballooning. Signed-off-by: Anthony Liguori Signed-off-by: Rusty Russell (simplified) commit 52a8968ce95da8469ba0a9b3e4010fe31caf77a3 Author: Peter Zijlstra Date: Mon Aug 25 13:35:06 2008 +0200 x86: fix cpufreq + sched_clock() regression I noticed that my sched_clock() was slow on a number of machine, so I started looking at cpufreq. The below seems to fix the problem for me. Signed-off-by: Ingo Molnar commit f58899bb0224741eb0409ada67ecafe90ba137ef Merge: a2bd727... 83097ac... Author: Ingo Molnar Date: Mon Aug 25 14:39:12 2008 +0200 Merge branch 'linus' into x86/urgent commit 3051e41ab7daaa59d4564f20b25dcb8c03f35f2b Author: Jean Delvare Date: Mon Aug 25 11:49:20 2008 +0100 ALSA: ASoC: Fix double free and memory leak in many codec drivers Many SoC audio codec drivers have improper freeing of memory in error paths. * codec is allocated in the platform device probe function, but is not freed there in case of error. Instead it is freed in the i2c device probe function's error path. However the success or failure of both functions is not linked, so this could result in a double free (if the platform device is successfully probed, the i2c device probing fails and then the platform driver is unregistered.) * codec->private_data is allocated in many platform device probe functions but not freed in their error paths. This patch hopefully solves all these problems. Signed-off-by: Jean Delvare Signed-off-by: Mark Brown Signed-off-by: Takashi Iwai commit a2bd7274b47124d2fc4dfdb8c0591f545ba749dd Author: Yinghai Lu Date: Mon Aug 25 00:56:08 2008 -0700 x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3 David Witbrodt tracked down (and bisected) a hpet bootup hang on his system to the following problem: a BIOS bug made the hpet device visible as a generic PCI device. If e820 reserved entries happen to be registered first in the resource tree [which v2.6.26 started doing], then the PCI code will reallocate that device's BAR to some other address - breaking timer IRQs and hanging the system. ( Normally hpet devices are hidden by the BIOS from the OS's PCI discovery via chipset magic. Sometimes the hpet is not a PCI device at all. ) Solve this fundamental fragility by making non-PCI platform drivers insert resources into the resource tree even if it overlaps the e820 reserved entry, to keep the resource manager from updating the BAR. Also do these checks for the ioapic and mmconfig addresses, and emit a warning if this happens. Bisected-by: David Witbrodt Signed-off-by: Yinghai Lu Tested-by: David Witbrodt Signed-off-by: Ingo Molnar commit c5d44423d55e3abca7b1d544af9e4c97ec203999 Author: Travis Place Date: Mon Aug 25 08:11:50 2008 +0200 ALSA: CA0106 on MSI K8N Diamond PLUS Motherboard Correct a previous patch for the ca0106 onboard the MSI K8N Diamond PLUS motherboard. Confirmed to have Line/Mic/Aux working for input, and sound output working as expected. Signed-off-by: Travis Place Signed-off-by: Takashi Iwai commit 060700b571717c997a2ea5e2049b848fa248ee13 Author: Linus Torvalds Date: Sun Aug 24 11:52:06 2008 -0700 x86: do not enable TSC notifier if we don't need it Impact: crash on non-TSC-equipped CPUs Don't enable the TSC notifier if we *either*: 1. don't have a CPU, or 2. have a CPU with constant TSC. In either of those cases, the notifier is either damaging (1) or useless(2). From: Linus Torvalds Signed-off-by: H. Peter Anvin commit 83097aca8567a0bd593534853b71fe0fa9a75d69 Author: Arjan van de Ven Date: Sat Aug 23 21:45:21 2008 -0700 Fix oops in acer_wmi driver (acer_wmi_init) The acer_wmi driver does a DMI scan for quirks, and then sets flags into the "interface" datastructure for some cases. However, the quirks happen real early before "interface" is per se initialized from NULL. The patch below 1) adds a NULL pointer check and 2) (re)runs the quirks at the end, when "interface" has it's final value. Reported-by: kerneloops.org Acked-by: Carlos Corbacho CC: stable@vger.kernel.org Signed-off-by: Arjan van de Ven Signed-off-by: Linus Torvalds commit 6450f65168bcf3c03b5fb44c2fe96682c0d3086b Merge: 7a8fc9b... f410a1f... Author: Linus Torvalds Date: Sat Aug 23 12:14:42 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: ipv6: protocol for address routes icmp: icmp_sk() should not use smp_processor_id() in preemptible code pkt_sched: Fix qdisc list locking pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race sctp: fix potential panics in the SCTP-AUTH API. commit 7a8fc9b248e77a4eab0613acf30a6811799786b3 Author: Adrian Bunk Date: Sun Aug 17 17:36:59 2008 +0300 removed unused #include 's This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk Signed-off-by: Linus Torvalds commit 38c052f8cff1bd323ccfa968136a9556652ee420 Author: Ingo Molnar Date: Sat Aug 23 17:59:07 2008 +0200 rtc: fix deadlock if get_rtc_time() is _ever_ called with IRQs off, we deadlock badly in it, waiting for jiffies to increment. So make the code more robust by doing an explicit mdelay(20). This solves a very hard to reproduce/debug hard lockup reported by Mikael Pettersson. Reported-by: Mikael Pettersson Signed-off-by: Ingo Molnar commit 8735728ef8dc935c4fb351f913758fdbb62c308d Author: Rafael J. Wysocki Date: Fri Aug 22 22:23:09 2008 +0200 x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs During CPU hot-remove the sysfs directory created by threshold_create_bank(), defined in arch/x86/kernel/cpu/mcheck/mce_amd_64.c, has to be removed before its parent directory, created by mce_create_device(), defined in arch/x86/kernel/cpu/mcheck/mce_64.c . Moreover, when the CPU in question is hotplugged again, obviously the latter has to be created before the former. At present, the right ordering is not enforced, because all of these operations are carried out by CPU hotplug notifiers which are not appropriately ordered with respect to each other. This leads to serious problems on systems with two or more multicore AMD CPUs, among other things during suspend and hibernation. Fix the problem by placing threshold bank CPU hotplug callbacks in mce_cpu_callback(), so that they are invoked at the right places, if defined. Additionally, use kobject_del() to remove the sysfs directory associated with the kobject created by kobject_create_and_add() in threshold_create_bank(), to prevent the kernel from crashing during CPU hotplug operations on systems with two or more multicore AMD CPUs. This patch fixes bug #11337. Signed-off-by: Rafael J. Wysocki Acked-by: Andi Kleen Tested-by: Mark Langsdorf Signed-off-by: Ingo Molnar commit 91ede005d72df60d6b3f252be177a4743a6aa46a Author: Robert Richter Date: Fri Aug 22 20:23:38 2008 +0200 x86: fix: make PCI ECS for AMD CPUs hotplug capable Until now, PCI ECS setup was performed at boot time only and for cpus that are enabled then. This patch fixes this and adds cpu hotplug. Tests sequence (check if ECS bit is set when bringing cpu online again): # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' ) < /dev/cpu/1/msr 00000008 00404010 # ( perl -e 'sysseek(STDOUT, 0xC001001F, 0); print pack "l*", 8, 0x00400010' ) > /dev/cpu/1/msr # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' ) < /dev/cpu/1/msr 00000008 00400010 # echo 0 > /sys/devices/system/cpu/cpu1/online # echo 1 > /sys/devices/system/cpu/cpu1/online # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' ) < /dev/cpu/1/msr 00000008 00404010 Reported-by: Yinghai Lu Signed-off-by: Robert Richter Signed-off-by: Ingo Molnar commit 9b4e27b52853c5da77e61a4e36fbc40688b7a829 Author: Robert Richter Date: Fri Aug 22 20:23:37 2008 +0200 x86: fix: do not run code in amd_bus.c on non-AMD CPUs Jan Beulich wrote: > Even worse - this would even try to access the MSR on non-AMD CPUs > (currently probably prevented just by the fact that only AMD ones use > family values of 0x10 or higher). This patch adds cpu vendor check to the postcore_initcalls. Reported-by: Jan Beulich Signed-off-by: Robert Richter Signed-off-by: Ingo Molnar commit f410a1fba7afa79d2992620e874a343fdba28332 Author: Stephen Hemminger Date: Sat Aug 23 05:16:46 2008 -0700 ipv6: protocol for address routes This fixes a problem spotted with zebra, but not sure if it is necessary a kernel problem. With IPV6 when an address is added to an interface, Zebra creates a duplicate RIB entry, one as a connected route, and other as a kernel route. When an address is added to an interface the RTN_NEWADDR message causes Zebra to create a connected route. In IPV4 when an address is added to an interface a RTN_NEWROUTE message is set to user space with the protocol RTPROT_KERNEL. Zebra ignores these messages, because it already has the connected route. The problem is that route created in IPV6 has route protocol == RTPROT_BOOT. Was this a design decision or a bug? This fixes it. Same patch applies to both net-2.6 and stable. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit fdc0bde90a689b9145f2b6f271c03f4c99d09667 Author: Denis V. Lunev Date: Sat Aug 23 04:43:33 2008 -0700 icmp: icmp_sk() should not use smp_processor_id() in preemptible code Pass namespace into icmp_xmit_lock, obtain socket inside and return it as a result for caller. Thanks Alexey Dobryan for this report: Steps to reproduce: CONFIG_PREEMPT=y CONFIG_DEBUG_PREEMPT=y tracepath BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205 caller is icmp_sk+0x15/0x30 Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1 Call Trace: [] debug_smp_processor_id+0xe4/0xf0 [] icmp_sk+0x15/0x30 [] icmp_send+0x4b/0x3f0 [] ? trace_hardirqs_on_caller+0xd5/0x160 [] ? trace_hardirqs_on+0xd/0x10 [] ? local_bh_enable_ip+0x95/0x110 [] ? _spin_unlock_bh+0x39/0x40 [] ? mark_held_locks+0x4c/0x90 [] ? trace_hardirqs_on+0xd/0x10 [] ? trace_hardirqs_on_caller+0xd5/0x160 [] ip_fragment+0x8d4/0x900 [] ? ip_finish_output2+0x0/0x290 [] ? ip_finish_output+0x0/0x60 [] ? dst_output+0x0/0x10 [] ip_finish_output+0x4c/0x60 [] ip_output+0xa3/0xf0 [] ip_local_out+0x20/0x30 [] ip_push_pending_frames+0x27f/0x400 [] udp_push_pending_frames+0x233/0x3d0 [] udp_sendmsg+0x321/0x6f0 [] inet_sendmsg+0x45/0x80 [] sock_sendmsg+0xdf/0x110 [] ? autoremove_wake_function+0x0/0x40 [] ? validate_chain+0x415/0x1010 [] ? __do_fault+0x140/0x450 [] ? __lock_acquire+0x260/0x590 [] ? sockfd_lookup_light+0x45/0x80 [] sys_sendto+0xea/0x120 [] ? _spin_unlock_irqrestore+0x42/0x80 [] ? __up_read+0x4c/0xb0 [] ? up_read+0x26/0x30 [] system_call_fastpath+0x16/0x1b icmp6_sk() is similar. Signed-off-by: Denis V. Lunev Signed-off-by: David S. Miller commit d3ee1b405872214609868f3cde631ac157026dd0 Merge: 115399c... a697690... Author: Linus Torvalds Date: Fri Aug 22 08:38:00 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: authenc - Avoid using clobbered request pointer commit 115399cab1a4a1f54580c4a8c6a24c6cede569b3 Merge: ee26562... 1082c74... Author: Linus Torvalds Date: Fri Aug 22 08:37:45 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix call of alc888_coef_init() ALSA: hda_intel: enable snoop for nvidia HDA controller commit ee26562772f47a6e2030a79b230226b204a410b6 Merge: 43cc071... 4537398... Author: Linus Torvalds Date: Fri Aug 22 08:37:07 2008 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: Update documentation to remind users to update mke2fs.conf ext4: Fix small file fragmentation ext4: Initialize writeback_index to 0 when allocating a new inode ext4: make sure ext4_has_free_blocks returns 0 for ENOSPC ext4: journal credit fix for the delayed allocation's writepages() function ext4: Rework the ext4_da_writepages() function ext4: journal credits reservation fixes for DIO, fallocate ext4: journal credits reservation fixes for extent file writepage ext4: journal credits calulation cleanup and fix for non-extent writepage ext4: Fix bug where we return ENOSPC even though we have plenty of inodes ext4: don't try to resize if there are no reserved gdt blocks left ext4: Use ext4_discard_reservations instead of mballoc-specific call ext4: Fix ext4_dx_readdir hash collision handling ext4: Fix delalloc release block reservation for truncate ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty ext4: Handle unwritten extent properly with delayed allocation commit 43cc071db83b6311a8135f5cc56ae7fae1023504 Merge: 05f57f5... efc2dea... Author: Linus Torvalds Date: Fri Aug 22 08:36:55 2008 -0700 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: enable LB_BIAS by default commit 05f57f50e04aec3c629a652a776497b2c76c0d0b Merge: 3ffc3f9... 01dcb04... Author: Linus Torvalds Date: Fri Aug 22 08:36:42 2008 -0700 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rcu: fix synchronize_rcu() so that kernel-doc works commit 3ffc3f947de2b64f35f6bc4361e83a2bb9e12c71 Merge: 358c323... 3c4fbe5... Author: Linus Torvalds Date: Fri Aug 22 08:36:20 2008 -0700 Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: nohz: fix wrong event handler after online an offlined cpu commit 358c323c17ac527b82c6333db6a485112c21ab0d Merge: a7b354e... 9754a5b... Author: Linus Torvalds Date: Fri Aug 22 08:23:53 2008 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: work around MTRR mask setting, v2 x86: fix section mismatch warning - uv_cpu_init x86: fix VMI for early params x86: fix two modpost warnings in mm/init_64.c x86: fix 1:1 mapping init on 64-bit (memory hotplug case) x86: work around MTRR mask setting x86: PAT Update validate_pat_support for intel CPUs devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS x86: PAT proper tracking of set_memory_uc and friends x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable) x86: export pv_lock_ops non-GPL x86, mmiotrace: silence section mismatch warning - leave_uniprocessor x86: use WARN() in arch/x86/kernel x86: use WARN() in arch/x86/mm/ioremap.c werror: fix pci calgary x86: fix oprofile + hibernation badness x86, SGI UV: hardcode the TLB flush interrupt system vector x86: fix Xorg startup/shutdown slowdown with PAT x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)" x86 iommu: remove unneeded parenthesis commit a7b354e868bc2f887dfb0a418aa7d96df1afc399 Merge: f7edd5f... 4ef2818... Author: Linus Torvalds Date: Fri Aug 22 08:22:33 2008 -0700 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: [libata] pata_it821x: fix warning libata: Fix a large collection of DMA mode mismatches ahci: sis controllers actually can do PMP pata_via: clean up recent tf_load changes libata: restore SControl on detach libata: use ata_link_printk() when printing SError libata: always do follow-up SRST if hardreset returned -EAGAIN libata: fix EH action overwriting in ata_eh_reset() sata_mv: add the Gen IIE flag to the SoC devices. ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs sata_mv: don't issue two DMA commands concurrently libata: implement no[hs]rst force params commit f7edd5fbde8af44fa06218f56e0f648fc7a527c8 Merge: a22c50c... 45dd75d... Author: Linus Torvalds Date: Fri Aug 22 08:21:48 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IPoIB: Fix deadlock on RTNL in ipoib_stop() IB/ipath: Fix incorrect check for max physical address in TID IB/ipath: Fix lost UD send work request commit a697690bece75d4ba424c1318eb25c37d41d5829 Author: Herbert Xu Date: Sat Aug 23 01:04:06 2008 +1000 crypto: authenc - Avoid using clobbered request pointer Authenc works in two stages for encryption, it first encrypts and then computes an ICV. The context memory of the request is used by both operations. The problem is that when an asynchronous encryption completes, we will compute the ICV and then reread the context memory of the encryption to get the original request. It just happens that we have a buffer of 16 bytes in front of the request pointer, so ICVs of 16 bytes (such as SHA1) do not trigger the bug. However, any attempt to uses a larger ICV instantly kills the machine when the first asynchronous encryption is completed. This patch fixes this by saving the request pointer before we start the ICV computation. Signed-off-by: Herbert Xu commit 1082c7487cbe5a40755ba9e33552b6ecbf419bf2 Author: Takashi Iwai Date: Fri Aug 22 15:24:22 2008 +0200 ALSA: hda - Fix call of alc888_coef_init() Using init_hook to call alc888_coef_init() is problematic for configurations that already set another init_hook. Better to put it in alc_init() as is (although it looks a bit hackish). Signed-off-by: Takashi Iwai commit 9754a5b840a209bc1f192d59f63e81b698a55ac8 Author: Ingo Molnar Date: Fri Aug 22 08:22:23 2008 +0200 x86: work around MTRR mask setting, v2 improve the debug printout: - make it actually display something - print it only once would be nice to have a WARN_ONCE() facility, to feed such things to kerneloops.org. Signed-off-by: Ingo Molnar commit c4bd1fdab0deec0f69aeabab22075cb22ac8ad44 Author: Marcin Slusarz Date: Thu Aug 21 20:49:05 2008 +0200 x86: fix section mismatch warning - uv_cpu_init WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init() The function __cpuinit uv_cpu_init() references a function __init uv_system_init(). If uv_system_init is only used by uv_cpu_init then annotate uv_system_init with a matching annotation. uv_system_init was ment to be called only once, so do it from codepath (native_smp_prepare_cpus) which is called once, right before activation of other cpus (smp_init). Note: old code relied on uv_node_to_blade being initialized to 0, but it'a not initialized from anywhere. Signed-off-by: Marcin Slusarz Acked-by: Jack Steiner Signed-off-by: Ingo Molnar commit f6e0b239a2657ea8cb67f0d83d0bfdbfd19a481b Author: Jarek Poplawski Date: Fri Aug 22 03:24:05 2008 -0700 pkt_sched: Fix qdisc list locking Since some qdiscs call qdisc_tree_decrease_qlen() (so qdisc_lookup()) without rtnl_lock(), adding and deleting from a qdisc list needs additional locking. This patch adds global spinlock qdisc_list_lock and wrapper functions for modifying the list. It is considered as a temporary solution until hfsc_dequeue(), netem_dequeue() and tbf_dequeue() (or qdisc_tree_decrease_qlen()) are redone. With feedback from Herbert Xu and David S. Miller. Signed-off-by: Jarek Poplawski Acked-by: Herbert Xu Signed-off-by: David S. Miller commit 4ef281853474389fea952e9e59650e599ecf2d62 Author: Jeff Garzik Date: Fri Aug 22 02:33:23 2008 -0400 [libata] pata_it821x: fix warning Reported by Andrew Morton: drivers/ata/pata_it821x.c: In function 'it821x_port_start': drivers/ata/pata_it821x.c:609: warning: 'mtype' may be used uninitialized in this function Pretty horrid fix, but so's a warning.. Signed-off-by: Jeff Garzik commit b15b3ebae102f89c25ccbcae0b2099af312f2e82 Author: Alan Cox Date: Fri Aug 1 09:18:34 2008 +0100 libata: Fix a large collection of DMA mode mismatches Dave Müller sent a diff for the pata_oldpiix that highlighted a problem where a lot of the ATA drivers assume dma_mode == 0 means "no DMA" while the core code uses 0xFF. This turns out to have other consequences such as code doing >= XFER_UDMA_0 also catching 0xFF as UDMAlots. Fortunately it doesn't generally affect set_dma_mode, although some drivers call back into their own set mode code from other points. Having been through the drivers I've added helpers for using_udma/using_mwdma dma_enabled so that people don't open code ranges that may change (eg if UDMA8 appears somewhere) Thanks to David for the initial bits [and added fix for pata_oldpiix from and signed-off-by Dave Mueller -jg] Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 20e2de4a505aa02131a95665e8920eb053fce686 Author: Tejun Heo Date: Fri Aug 1 12:51:43 2008 +0900 ahci: sis controllers actually can do PMP SIS controllers were blacklisted for PMP as enabling it made device detection fail whether the device was PMP or not - the natural conclusion was the controller chokes on SRST w/ pmp==15. However, it turned out that the controller just didn't like issuing SRST after hardreset w/o clearing SError first. Interestingly, the SRST itself succeeds but the following commands fail. If SError is cleared between hardreset and SRST, which is the default behavior now, everything works fine and SIS controllers work with PMPs happily. Remove PMP blacklisting for SIS AHCIs. Signed-off-by: Tejun Heo Cc: Piter PUNK Signed-off-by: Jeff Garzik commit ff04715bd5171d6d5c4ddff40c7bdc8d2dc90f7d Author: Tejun Heo Date: Thu Jul 31 18:02:35 2008 +0900 pata_via: clean up recent tf_load changes Commit bfce5e0179ad059035df28558724ff60af708e09 implemented custom tf_load for pata_via. This patch cleans it up a bit. * Instead of duplicating whole body, copy tf and set ATA_TFLAG_DEVICE when necessary. * Rename via_ata_tf_load() to via_tf_load(). * No need to set .tf_load in via_port_ops_noirq as it inherits from via_port_ops. * Clean up indentation. Signed-off-by: Tejun Heo Cc: Joseph Chan Signed-off-by: Jeff Garzik commit d127ea7b8643a93d14d1f3c542974407f14d3663 Author: Tejun Heo Date: Thu Jul 31 16:09:34 2008 +0900 libata: restore SControl on detach Save SControl during probing and restore it on detach. This prevents adjustments made by libata drivers to seep into the next driver which gets attached (be it a libata one or not). It's not clear whether SControl also needs to be restored on suspend. The next system to have control (ACPI or kexec'd kernel) would probably like to see the original SControl value but there's no guarantee that a link is gonna keep working after SControl is adjusted without a reset and adding a reset and modified recovery cycle soley for this is an overkill. For now, do it only for detach. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit da0e21d3fa2340114fe24821718a1b57123e4664 Author: Tejun Heo Date: Thu Jul 31 16:08:38 2008 +0900 libata: use ata_link_printk() when printing SError SError belongs to link not port. Use ata_link_printk() to print it. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 5dbfc9cb59d4ad75199949d7dd8a8c6d7bc518df Author: Tejun Heo Date: Thu Jul 31 16:08:02 2008 +0900 libata: always do follow-up SRST if hardreset returned -EAGAIN As an optimization, follow-up SRST used to be skipped if classification wasn't requested even when hardreset requested it via -EAGAIN. However, some hardresets can't wait for device readiness and skipping SRST can cause timeout or other failures during revalidation. Always perform follow-up SRST if hardreset returns -EAGAIN. This makes reset paths more predictable and thus less error-prone. While at it, move hardreset error checking such that it's done right after hardreset is finished. This simplifies followup SRST condition check a bit and makes the reset path easier to modify. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit a674050e068a2919908730279f0b731ae6d2e005 Author: Tejun Heo Date: Thu Jul 31 16:07:04 2008 +0900 libata: fix EH action overwriting in ata_eh_reset() ehc->i.action got accidentally overwritten to ATA_EH_HARD/SOFTRESET in ata_eh_reset(). The original intention was to clear reset action which wasn't selected. This can cause unexpected behavior when other EH actions are scheduled together with reset. Fix it. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit eb3a55a9f43f0f8e770c2abf70e65bdda2d5ff1e Author: Saeed Bishara Date: Mon Aug 4 00:52:55 2008 -1100 sata_mv: add the Gen IIE flag to the SoC devices. The SoC sata port is based on the 7042/6042 devices (Gen IIE). This patch will fix various issues when working with PMP and/or NCQ. Signed-off-by: Saeed Bishara Signed-off-by: Jeff Garzik commit c6c6a1afefe51d488c050464f261d4711bea9a37 Author: Seth Heasley Date: Mon Aug 11 17:03:18 2008 -0700 ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs This patch adds the Intel Ibex Peak (PCH) IDE mode SATA Controller DeviceIDs. Signed-off-by: Seth Heasley Signed-off-by: Jeff Garzik commit adcb5308dda3d2749342685f23953e13ba74ff68 Author: Seth Heasley Date: Mon Aug 11 17:03:09 2008 -0700 ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs Resend with proper whitespace. This patch adds the Intel Ibex Peak (PCH) SATA RAID Controller DeviceIDs. Signed-off-by: Seth Heasley Signed-off-by: Jeff Garzik commit 4bdee6c5103696a2729d3db2f235d202191788e4 Author: Tejun Heo Date: Wed Aug 13 20:24:16 2008 +0900 sata_mv: don't issue two DMA commands concurrently sata_mv allowed issuing two DMA commands concurrently which the hardware allows. Unfortunately, libata core layer isn't ready for this yet and spews ugly warning message and malfunctions on this. Don't allow concurrent DMA commands for now. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 05944bdf6fadb5394710269df6770dde447b23ca Author: Tejun Heo Date: Wed Aug 13 20:19:09 2008 +0900 libata: implement no[hs]rst force params Implement force params nohrst, nosrst and norst. This is to work around reset related problems and ease debugging. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 3a6ddd5f18405ca92e004416af8ed44b9c9783d7 Author: Alok Kataria Date: Thu Aug 21 11:32:26 2008 -0700 x86: fix VMI for early params while fixing a different bug i moved the call to vmi_init before early params could be parsed. This broke the vmi specific commandline parameters. Fix that, by moving vmi initialization after kernel has got a chance to parse early parameters. Signed-off-by: Alok N Kataria Signed-off-by: Ingo Molnar commit 9482ac6e34dd1890a9a956d460a135bf992cb54a Author: Jan Beulich Date: Thu Aug 21 14:28:42 2008 +0100 x86: fix two modpost warnings in mm/init_64.c early_io{re,un}map() are __init and hence can't be called from __meminit functions. Signed-off-by: Jan Beulich Signed-off-by: Ingo Molnar commit 8ae3a5a8dff2c92bd1087bb97c4a3bb61174303e Author: Jan Beulich Date: Thu Aug 21 14:27:22 2008 +0100 x86: fix 1:1 mapping init on 64-bit (memory hotplug case) While I don't have a hotplug capable system at hand, I think two issues need fixing: - pud_phys (in kernel_physical_ampping_init()) would remain uninitialized in the after_bootmem case - the locking done just around phys_pmd_{init,update}() would leave out pgd updates, and it was needlessly covering code portions that do allocations (perhaps using a more friendly gfp value in alloc_low_page() would then be possible) Signed-off-by: Jan Beulich Signed-off-by: Ingo Molnar commit 38cc1c3df77c1bb739a4766788eb9fa49f16ffdf Author: Yinghai Lu Date: Thu Aug 21 20:24:24 2008 -0700 x86: work around MTRR mask setting Joshua Hoblitt reported that only 3 GB of his 16 GB of RAM is usable. Booting with mtrr_show showed us the BIOS-initialized MTRR settings - which are all wrong. So the root cause is that the BIOS has not set the mask correctly: > [ 0.429971] MSR00000200: 00000000d0000000 > [ 0.433305] MSR00000201: 0000000ff0000800 > should be ==> [ 0.433305] MSR00000201: 0000003ff0000800 > > [ 0.436638] MSR00000202: 00000000e0000000 > [ 0.439971] MSR00000203: 0000000fe0000800 > should be ==> [ 0.439971] MSR00000203: 0000003fe0000800 > > [ 0.443304] MSR00000204: 0000000000000006 > [ 0.446637] MSR00000205: 0000000c00000800 > should be ==> [ 0.446637] MSR00000205: 0000003c00000800 > > [ 0.449970] MSR00000206: 0000000400000006 > [ 0.453303] MSR00000207: 0000000fe0000800 > should be ==> [ 0.453303] MSR00000207: 0000003fe0000800 > > [ 0.456636] MSR00000208: 0000000420000006 > [ 0.459970] MSR00000209: 0000000ff0000800 > should be ==> [ 0.459970] MSR00000209: 0000003ff0000800 So detect this borkage and add the prefix 111. Signed-off-by: Yinghai Lu Cc: Signed-off-by: Ingo Molnar commit a22c50c302c58ba2d1d2846e85239ba80da61a56 Merge: 61311e1... 55d8460... Author: Linus Torvalds Date: Thu Aug 21 16:31:08 2008 -0700 Merge master.kernel.org:/home/rmk/linux-2.6-arm * master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 5212/1: pxa: fix build error when CPU_PXA310 is not defined [ARM] 5208/1: fsg-setup.c fixes [ARM] fix impd1.c build warning [ARM] e400 config use MFP [ARM] e740 config use MFP [ARM] Fix eseries IRQ limit [ARM] clocklib: Update users of aliases to new API [ARM] clocklib: Allow dynamic alias creation [ARM] eseries: whitespace fixes and cleanup commit ebca4f1bce1eb7b91a63c515db66316db9391221 Author: Greg KH Date: Thu Aug 21 13:47:58 2008 -0700 PCI: fix reference leak in pci_get_dev_by_id() Alex Chiang and Matthew Wilcox pointed out that pci_get_dev_by_id() does not properly decrement the reference on the from pointer if it is present, like the documentation for the function states it will. It fixes a pretty bad leak in the hotplug core (we were leaking an entire struct pci_dev for each function of each offlined card, the first time around; subsequent onlines/offlines were ok). Cc: Matthew Wilcox Cc: stable Tested-by: Alex Chiang Acked-by: Alex Chiang Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jesse Barnes commit d6a9e9b40be7da84f82eb414c2ad98c5bb69986b Author: Alex Chiang Date: Thu Aug 21 15:13:47 2008 -0600 PCI: shpchp: Rename duplicate slot name N as N-1, N-2, N-M... Commit ef0ff95f136f0f2d035667af5d18b824609de320 (shpchp: fix slot name) introduces the shpchp_slot_with_bus module parameter, which was intended to help work around broken firmware that assigns the same name to multiple slots. Commit b3bd307c628af2f0a581c42d5d7e4bcdbbf64b6a (shpchp: add message about shpchp_slot_with_bus option) tells the user to use the above parameter in the event of a name collision. This approach is sub-optimal because it requires too much work from the user. Instead, let's rename the slot on behalf of the user. If firmware assigns the name N to multiple slots, then: The first registered slot is assigned N The second registered slot is assigned N-1 The third registered slot is assigned N-2 The Mth registered slot becomes N-M In the event we overflow the slot->name parameter, we report an error to the user. This is a temporary fix until the entire PCI core can be reworked such that individual drivers no longer have to manage their own slot names. Tested-by: Kenji Kaneshige Acked-by: Kenji Kaneshige Signed-off-by: Alex Chiang Signed-off-by: Jesse Barnes commit 167e782e301188c7c7e31e486bbeea5f918324c1 Author: Alex Chiang Date: Thu Aug 21 15:13:29 2008 -0600 PCI: pciehp: Rename duplicate slot name N as N-1, N-2, N-M... Commit 3800345f723fd130d50434d4717b99d4a9f383c8 (pciehp: fix slot name) introduces the pciehp_slot_with_bus module parameter, which was intended to help work around broken firmware that assigns the same name to multiple slots. Commit 9e4f2e8d4ddb04ad16a3828cd9a369a5a5287009 (pciehp: add message about pciehp_slot_with_bus option) tells the user to use the above parameter in the event of a name collision. This approach is sub-optimal because it requires too much work from the user. Instead, let's rename the slot on behalf of the user. If firmware assigns the name N to multiple slots, then: The first registered slot is assigned N The second registered slot is assigned N-1 The third registered slot is assigned N-2 The Mth registered slot becomes N-M In the event we overflow the slot->name parameter, we report an error to the user. This is a temporary fix until the entire PCI core can be reworked such that individual drivers no longer have to manage their own slot names. Tested-by: Kenji Kaneshige Acked-by: Kenji Kaneshige Signed-off-by: Alex Chiang Signed-off-by: Jesse Barnes commit 61311e1bbc299b3a3a42b8d7f491b428ded964f0 Merge: 691a559... 5e4c656... Author: Linus Torvalds Date: Thu Aug 21 13:48:37 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: pnp: fix "add acpi:* modalias entries" UIO: generic irq handling for some uio platform devices UIO: uio_pdrv: fix license specification UIO: uio_pdrv: fix memory leak block: drop references taken by class_find_device() block: fix partial read() of /proc/{partitions,diskstats} PM: Remove WARN_ON from device_pm_add driver core: add init_name to struct device PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set driver model: anti-oopsing medicine dev_printk(): constify the `dev' argument drivers/base/driver.c: remove unused to_dev() macro Documentation: HOWTO-ja_JP-sync patch Japanese translation of Documentation/SubmitChecklist kobject: Replace ALL occurrences of '/' with '!' instead of only the first one. commit 691a55998cc2fc645b51d28edb4f4d36b512826e Merge: cce7496... eaea043... Author: Linus Torvalds Date: Thu Aug 21 13:48:07 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp. USB: automatically enable RHSC interrupts USB: Don't rebind before "complete" callback USB: Add new PM callback methods for USB USB: Defer Set-Interface for suspended devices USB: Add udev argument to interface suspend/resume functions USB: cdc-acm: don't unlock acm->mutex on error path MUSB: Fix index register corruption seen with g_ether and Windows host usb: musb: get rid of MUSB_LOGLEVEL and use parameter usb: musb: get rid of procfs entry USB: Fix pxa27x_udc usb speed handling. USB: cdc-acm: quirk for Conexant CX93010 USB modem USB: fix bug in usb_unlink_anchored_urbs() usb-serial: option support HSDPA modem A2502 USB: ISP1760: fixed trivial math in comment commit cce7496d3d5910a003109207f9737c3be658aa1a Author: Martin Schwidefsky Date: Thu Aug 21 19:46:41 2008 +0200 [S390] Update default configuration. Signed-off-by: Martin Schwidefsky commit 04f64b5756872b474d9429e3b6987ada10bb8012 Author: Gerald Schaefer Date: Thu Aug 21 19:46:40 2008 +0200 [S390] dcssblk: fix race in dcssblk_add_store() Concurrently adding the same segment may lead to duplicate device_register() calls, which will trigger an error in kobject code: "... don't try to register things with the same name in the same directory". This patch adds a check to avoid this. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 91c36919a456589f4f073671474a1f899e0d3c2b Author: Peter Oberparleiter Date: Thu Aug 21 19:46:39 2008 +0200 [S390] cio: call ccw driver notify function with lock held Calling a ccw driver's notify function without the ccw device lock held opens up a race window between discovery and handling of a change in the device operational state. As a result, the device driver may encounter unexpected device malfunction, leading to out-of-retry situations or similar. Remove race by extending the ccw device lock from state change discovery to the calling of the notify function. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit 49fd38bdaa96f093fcad3176a781a4d0de8f8602 Author: Stefan Weinhuber Date: Thu Aug 21 19:46:38 2008 +0200 [S390] dasd: fix data size for PSF/PRSSD command The Perform Subsystem Function/Prepare for Read Subsystem Data command requires 12 bytes of parameter data, but the respective data structure dasd_psf_prssd_data has a length of 16 bytes. Current storage servers ignore the obsolete bytes, but older models fail to execute the command and report an incorrect length error. This causes the device initilization for these devices to fail. To fix this problem we need to correct the dasd_psf_prssd_data structure and shorten it to the correct length. Reported-by: Ivan Warren Reviewed-by: Ivan Warren Tested-by: Ivan Warren CC: stable Signed-off-by: Stefan Weinhuber commit 152382af4056aadc0c2ea2e8e8258b277be085bf Author: Eric Sandeen Date: Thu Aug 21 19:46:37 2008 +0200 [S390] fix ext2_find_next_bit ext4 does not work on s390 because ext2_find_next_bit is broken. Fortunately this function is only used by ext4. The function uses ffs which does not work analog to ffz. The result of ffs has an offset of 1 which is not taken into account. To fix this use the low level __ffs_word function directly instead of the ill defined ffs. In addition the patch improves find_next_zero_bit and ext2_find_next_zero_bit by passing the bit offset into __ffz_word instead of adding it after the function call returned. Signed-off-by: Eric Sandeen Signed-off-by: Martin Schwidefsky commit 16f7f9564c3ae190954f2ec55f385a268b93ac4d Author: Peter Oberparleiter Date: Thu Aug 21 19:46:36 2008 +0200 [S390] cio: fix ccw group device cleanup Fix ccw group device initialization: initialize device object before using reference counting during cleanup. Fixes the following message when group device initialization fails (e.g. because too few devices where specified): kobject: '' (..): is not initialized, yet kobject_put() is being called. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit 0686e402c365c92396d4c7abfaa24810f9cb77cc Author: Jan Glauber Date: Thu Aug 21 19:46:35 2008 +0200 [S390] qdio: remove the module_get & module_put pair Increasing the qdio reference count for every used subchannel is unnecessary since unloading qdio (if build as a module) is only possible if other modules that use qdio are unloaded. Unloading modules that use qdio in turn requires that these modules shut down all qdio subchannels. Therefore the additional module_get reference is not needed. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit 58eb27cd7f4f1de2932b3e0e39ea54a27e9fef43 Author: Jan Glauber Date: Thu Aug 21 19:46:34 2008 +0200 [S390] qdio: improve s390 debug feature usage Improve s390 debug feature usage: - log busy bit in dbf - increase size of dbf views - consistent logging of qdio api calls to setup view - print subchannel number so one can associate the interface with the dbf data - only log events to one view Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit 53b41ba7ce4563c33a0449fbcbbd70665477d654 Author: Jan Glauber Date: Thu Aug 21 19:46:33 2008 +0200 [S390] qdio: prevent oopsing if qdio_establish fails If qdio_establish fails we call qdio_shutdown to cleanup the qdio subchannel. The tiq_list entry may not be valid at that time, therefore we must ignore queues with an invalid list entry in tiqdio_remove_input_queues. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit 8853e505a15f31fe608cb50e038ba2f794eed923 Author: Heiko Carstens Date: Thu Aug 21 19:46:32 2008 +0200 [S390] Remove unneeded spinlock initialization. Remove the now unneeded s390_idle.lock spinlock initialization after Josef Sipek did it the right way in arch/s390/kernel/process.c. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 3e972394f9ee1511e5fdbcf50ac7d79e9cf563bd Author: Josef 'Jeff' Sipek Date: Thu Aug 21 19:46:31 2008 +0200 [S390] Fix uninitialized spinlock use Ever since commit 43ca5c3a1cefdaa09231d64485b8f676118bf1e0 ([S390] Convert monitor calls to function calls.), the kernel refused to IPL with spinlock debugging enabled. BUG: spinlock bad magic on CPU#0, swapper/0 lock: 00000000003a4668, .magic: 00000000, .owner: /-1, .owner_cpu: 0 CPU: 0 Not tainted 2.6.25 #1 Process swapper (pid: 0, task: 000000000034f958, ksp: 0000000000377d60) 0000000000377ab8 0000000000352628 0000000000377d60 0000000000377d60 0000000000016af4 00000000fffff7b5 0000000000377d60 0000000000000000 0000000000000000 0000000000377a18 0000000000000009 0000000000377a18 0000000000377a78 000000000023c920 0000000000016af4 0000000000377a18 0000000000000005 0000000000000000 0000000000377b58 0000000000377ab8 Call Trace: ([<0000000000016a60>] show_trace+0xdc/0x108) [<0000000000016b4e>] show_stack+0xc2/0xfc [<0000000000016c9a>] dump_stack+0xb2/0xc0 [<0000000000172dd4>] Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 0983e56835cbf4796e8f5780c549c32ac1c3afac Author: Julien Brunel Date: Thu Aug 21 19:46:30 2008 +0200 [S390] drivers/s390: Use an IS_ERR test rather than a NULL test In case of error, functions dasd_kmalloc_request and idal_buffer_alloc return an ERR pointer, but never return the NULL pointer. So after a call to one of these functions, a NULL test should be replaced by an IS_ERR test. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @correct_null_test@ expression x,E; statement S1, S2; @@ x = ( dasd_kmalloc_request(...) | idal_buffer_alloc(...) ) <... when != x = E if ( ( - x@p2 != NULL + ! IS_ERR ( x ) | - x@p2 == NULL + IS_ERR( x ) ) ) S1 else S2 ...> ? x = E; // Signed-off-by: Julien Brunel Signed-off-by: Julia Lawall Signed-off-by: Martin Schwidefsky commit eaea04353e0114a9805fc2cf1ff832cb0ac2570b Author: Stefan Lippers-Hollmann Date: Thu Aug 21 13:46:11 2008 +0200 USB: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp. sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp. usb 1-2: new high speed USB device using ehci_hcd and address 4 usb 1-2: configuration #1 chosen from 1 choice usb 1-2: USB2VGA dongle found at address 4 usb 1-2: Allocated 8 output buffers usb 1-2: 8MB 1 ch/1 r SDR SDRAM, bus width 32 usb 1-2: New USB device found, idVendor=0711, idProduct=0918 usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Signed-off-by: Stefan Lippers-Hollmann Signed-off-by: Greg Kroah-Hartman commit b5fb454f69642f9d933b327b185a2ba06dd0945c Author: Alan Stern Date: Wed Aug 20 17:22:05 2008 -0400 USB: automatically enable RHSC interrupts This patch (as1069c) changes the way OHCI root-hub status-change interrupts are enabled. Currently a special HCD method, hub_irq_enable(), is called when the hub driver is finished using a root hub. This approach turns out to be subject to races, resulting in unnecessary polling. The patch does away with the method entirely. Instead, the driver automatically enables the RHSC interrupt when no more status changes are present. This scheme is safe with controllers using level-triggered semantics for their interrupt flags. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 5096aedcd2eb70fbea83f09281f97f9ec973d9de Author: Alan Stern Date: Tue Aug 12 14:34:14 2008 -0400 USB: Don't rebind before "complete" callback This patch (as1130) fixes an incompatibility between the new PM infrastructure and USB power management. We are not allowed to call drivers' probe routines during a system sleep transition between the "prepare" and "complete" callbacks, but that's exactly what we do when a driver doesn't have full suspend/resume support. Such drivers are unbound during the "suspend" call and reprobed during the "resume" call. The patch causes the reprobe step to be skipped if the "complete" callback hasn't been issued yet, i.e., if the interface's dev.power.status field is not equal to DPM_ON. Thus during the "resume" callback nothing bad will happen, and during the final "complete" callback the reprobing will occur as desired. This fixes the problem reported in Bugzilla #11263. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit f2189c477c986db47ac7f9cc32d05f6df18bfe9e Author: Alan Stern Date: Tue Aug 12 14:34:10 2008 -0400 USB: Add new PM callback methods for USB This patch (as1129) adds support for the new PM callbacks to usbcore. The new callbacks merely invoke the same old USB power management routines as the old ones did. A minor improvement is that the callbacks are present only in the "USB-device" device_type structure, rather than in the bus_type structure. This way they will be invoked only for USB devices, not for USB interfaces. The core USB PM routines automatically handle suspending and resuming interfaces along with their devices. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 55151d7daba185f94e9dc561a5a2ba36b5f647dd Author: Alan Stern Date: Tue Aug 12 14:33:59 2008 -0400 USB: Defer Set-Interface for suspended devices This patch (as1128) fixes one of the problems related to the new PM infrastructure. We are not allowed to register new child devices during the middle of a system sleep transition, but unbinding a USB driver causes the core to automatically install altsetting 0 and thereby create new endpoint pseudo-devices. The patch fixes this problem (and the related problem that installing altsetting 0 will fail if the device is suspended) by deferring the Set-Interface call until some later time when it is legal and can succeed. Possible later times are: when a new driver is being probed for the interface, and when the interface is being resumed. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 65605ae8e587d714f73e674369bc4cd5a1e53a9b Author: Alan Stern Date: Tue Aug 12 14:33:27 2008 -0400 USB: Add udev argument to interface suspend/resume functions This patch (as1127) makes a minor change to the prototypes of the usb_suspend_interface() and usb_resume_interface() routines. Now the usb_device structure is passed as an argument, instead of being computed on-the-fly from the usb_interface argument. It makes the code look simpler, even if it really isn't much different from before. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 74573ee7096a4ffc2f098108d21c85801b9c7434 Author: Alexey Dobriyan Date: Wed Aug 20 16:56:04 2008 -0700 USB: cdc-acm: don't unlock acm->mutex on error path On Wed, Jul 23, 2008 at 03:52:36PM +0300, Andrei Popa wrote: > I installed gnokii-0.6.22-r2 and gave the command "gnokii --identify" > and the kernel oopsed: > > BUG: unable to handle kernel NULL pointer dereference at 00000458 > IP: [] mutex_unlock+0x0/0xb > [] acm_tty_open+0x4c/0x214 Signed-off-by: Alexey Dobriyan Tested-by: Andrei Popa Cc: stable [2.6.25.x, 2.6.26.x] Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit fb85d991616046f1b640ed9c4eab9b44908dab74 Author: Anand Gadiyar Date: Thu Aug 21 20:21:00 2008 +0530 MUSB: Fix index register corruption seen with g_ether and Windows host If Indexed Mode register accesses are enabled, the ep0_rxstate() function calls musb_g_ep0_giveback() before writing to the CSR register. When control returns to this ep0_rxstate, the index register contents are over-written. This causes the CSR register write to fail. Fixed by writing the correct value into the index register before writing to the CSR. This was observed only in ep0_rxstate() with g_ether loaded and the device connected to a MS Windows host PC. Anticipatively fixed ep0_txstate() as well. Signed-off-by: Anand Gadiyar Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit e8164f64caff68d4e878e1719d88d145faa75f1d Author: Felipe Balbi Date: Sun Aug 10 21:22:35 2008 +0300 usb: musb: get rid of MUSB_LOGLEVEL and use parameter We can change debugging level on the fly via /sys/module/musb_hdrc/parameters/debug. We can also get rid of the LOGLEVEL facility in Kconfig and rely only in module parameter. Cc: Anand Gadiyar Cc: Bryan Wu Cc: David Brownell Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 746cdd0b2d1254b11382789b6630c4d379bdcf13 Author: Felipe Balbi Date: Sun Aug 10 21:22:34 2008 +0300 usb: musb: get rid of procfs entry Drivers should not add procfs. The functionality in the old procfs file will be moved to debugfs. Cc: Anand Gadiyar Cc: Bryan Wu Cc: David Brownell Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit bf31338bfd5d04434adf2294255847bb7dad687a Author: Robert Jarzmik Date: Mon Aug 11 18:28:13 2008 +0200 USB: Fix pxa27x_udc usb speed handling. The new composite framework revealed a weakness in the pxa27x_udc driver gadget register function. Instead of checking if speed asked for was USB_LOW_SPEED upon usb_gadget_register() to deny service, it checked only for USB_FULL_SPEED, thus denying service to usb high speed capable gadgets (like g_ether). Signed-off-by: Robert Jarzmik Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit c8fd2c37b99c55c8d24888e0ed9d5f4f73458c9c Author: Eric Sandeen Date: Thu Aug 14 08:25:40 2008 -0500 USB: cdc-acm: quirk for Conexant CX93010 USB modem This patch gets my Rosewill RNX-56USB USB modem (with Conexant CX93010 chipset) up and running to the point where I can send AT commands and retrieve caller ID data, which is all I want to do with it. Signed-off-by: Eric Sandeen Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 77571f05a483c0259e42ba2f482c82debc9a63af Author: Oliver Neukum Date: Mon Aug 18 16:36:52 2008 +0200 USB: fix bug in usb_unlink_anchored_urbs() Irqs must not accidentally be reenabled. Signed-off-by: Oliver Neukum Acked-by: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman commit f8033827d8e92db6159d34ed45c608522674ecd8 Author: Hiroshi Miura Date: Tue Aug 19 10:58:25 2008 +0200 usb-serial: option support HSDPA modem A2502 This patch support NTT DoCoMo A2502 3G/HSDPA modem on option driver. It is produced by AnyDATA Corp. and also sold as KT Freetelecom (Korea) ADU 620UW. It support 3.6Mbps/7.2Mbps hight speed communication. I have tested A2502 with NTT DoCoMo MoperaU ISP service. Signed-off-by: Hiroshi Miura Signed-off-by: Matthias Urlichs Signed-off-by: Greg Kroah-Hartman commit 380ec6780a0461bb4a4592484d6fe75aa096edeb Author: Enrico Scholz Date: Wed Aug 20 00:06:22 2008 +0200 USB: ISP1760: fixed trivial math in comment Signed-off-by: Enrico Scholz Acked-by: Sebastian Siewior Signed-off-by: Greg Kroah-Hartman commit 5e4c6564c95ce127beeefe75e15cd11c93487436 Author: Kay Sievers Date: Thu Aug 21 15:28:56 2008 +0200 pnp: fix "add acpi:* modalias entries" With 22454cb99fc39f2629ad06a7eccb3df312f8830e we added only the first entry of the device table. We need to loop over the whole device list. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit c767db0ab4bc85f06119f2b42369e31b29991f16 Author: Magnus Damm Date: Fri Jul 11 18:55:27 2008 +0900 UIO: generic irq handling for some uio platform devices This is V3 of uio_pdrv_genirq.c, a platform driver for UIO with generic IRQ handling code. This driver is very similar to the regular UIO platform driver, but is only suitable for devices that are connected to the interrupt controller using unique interrupt lines. The uio_pdrv_genirq driver includes generic interrupt handling code which disables the serviced interrupt in the interrupt controller and makes the user space driver responsible for acknowledging the interrupt in the device and reenabling the interrupt in the interrupt controller. Shared interrupts are not supported since the in-kernel interrupt handler will disable the interrupt line in the interrupt controller, and in a shared interrupt configuration this will stop other devices from delivering interrupts. Signed-off-by: Magnus Damm Signed-off-by: Hans J. Koch Signed-off-by: Greg Kroah-Hartman commit 0f90927da11d596802d196cf299e91293abc90c5 Author: Uwe Kleine-König Date: Fri Jul 11 11:10:37 2008 +0200 UIO: uio_pdrv: fix license specification Thanks to Magnus Damm for pointing that out. Signed-off-by: Uwe Kleine-König Cc: Magnus Damm Acked-by: Hans J. Koch Signed-off-by: Greg Kroah-Hartman commit 331995e78385a0b9860f4c4c1766e842e61c450a Author: Uwe Kleine-König Date: Fri Jul 11 11:10:36 2008 +0200 UIO: uio_pdrv: fix memory leak Thanks to Magnus Damm for pointing that out. Signed-off-by: Uwe Kleine-König Cc: Magnus Damm Acked-by: Hans J. Koch Signed-off-by: Greg Kroah-Hartman commit 5c0ef6d0214a08e5c846f4c45228adf135d8d0ef Author: Kay Sievers Date: Sat Aug 16 14:30:30 2008 +0200 block: drop references taken by class_find_device() Otherwise we leak references, which is not a good thing to do. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 068281d302def5efd96d84a163ba17e85f5ea564 Author: Kay Sievers Date: Sat Aug 16 14:30:30 2008 +0200 block: fix partial read() of /proc/{partitions,diskstats} The proc files get truncated if they do not fit into the buffer with a single read(). We need to move the seq_file index from the callback of class_find_device() to the caller of class_find_device(), to keep its value across multiple invocations of the callback. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit f5a6d958b5d0a10e7e7a9dee1862fb31d08c6d26 Author: Rafael J. Wysocki Date: Sat Aug 9 01:05:13 2008 +0200 PM: Remove WARN_ON from device_pm_add PM: Remove WARN_ON from device_pm_add Fix message in device_pm_add() saying that the device will not be added to dpm_list, although in fact the device is going to be added to the list regardless of the ordering violation. Remove the WARN_ON(true) triggered in that situation, because it is hit by USB very often and spams the users' logs. This patch fixes bug #11263 Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman commit c906a48adc74fc455378137ac5124b13e7030a15 Author: Greg Kroah-Hartman Date: Fri May 30 10:45:12 2008 -0700 driver core: add init_name to struct device This gives us a way to handle both the bus_id and init_name values being used for a while during the transition period. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 3b98aeaf3a75f544dc945694f4fcf6e1c4bab89d Author: Alan Stern Date: Thu Aug 7 13:06:12 2008 -0400 PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set This patch (as1124) fixes a couple of bugs in the PM core. The new dev->power.status field should be initialized regardless of whether CONFIG_PM_SLEEP is enabled, and similarly dpm_sysfs_add() should be called whenever CONFIG_PM is enabled. The patch separates out the call to dpm_sysfs_add() from the call to device_pm_add(). As a result device_pm_add() can no longer return an error, so its return type is changed to void. Signed-off-by: Alan Stern Tested-by: Romit Dasgupta Acked-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman commit 7c2250352e11bf956c4cfa20b01ae6ba72882788 Author: David Brownell Date: Wed Aug 6 18:52:44 2008 -0700 driver model: anti-oopsing medicine Anti-oops medicine for the class iterators ... the oops was observed when a class was implicitly referenced before it was initialized. [Modified by Greg to spit a warning back so someone knows to fix their code] Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit bf9ca69fc8d19d4034391d3df4c35dccdef9d28c Author: Jean Delvare Date: Wed Jul 30 12:29:21 2008 -0700 dev_printk(): constify the `dev' argument Add const markings to dev_name and dev_driver_string to make it clear that dev_printk doesn't modify dev. This is a prerequisite to adding more const markings to other functions make it clearer, which functions can modify dev and which can't. Signed-off-by: Jean Delvare Cc: Kay Sievers Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 26d02d1db7d84729b1e49789341e69a493c60ceb Author: Joe Perches Date: Wed Jul 30 12:29:20 2008 -0700 drivers/base/driver.c: remove unused to_dev() macro Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit ac60fc218caacba5ae3bc70cc835cb9f16794d89 Author: Tsugikazu Shibata Date: Thu Aug 21 11:42:39 2008 +0900 Documentation: HOWTO-ja_JP-sync patch Here is a patch for Documentation/ja_JP/HOWTO sync with latest Documentation/HOWTO. It includes translation of changes done by Jon Corbet,Jiri Pirko and me: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=history;f=Documentation/HOWTO;h=c2371c5a98f99b5eaa785bd0affd6c40187e84e3;hb=HEAD Singed-off-by: Tsugikazu Shibata Signed-off-by: Greg Kroah-Hartman commit 95e0a8778ebf53b745763032485d2c96f47ed39b Author: Takenori Nagano Date: Tue Jul 15 17:49:42 2008 +0900 Japanese translation of Documentation/SubmitChecklist Hi, This patch adds SubmitChecklist translated into Japanese to Documentation/ja_JP directory. The translated SubmitChecklist has already been reviewed by JF project. SubmitChecklist is one of the important policy documents. So, I would like to merge into 2.6.27. Signed-off-by: Takenori Nagano Signed-off-by: Greg Kroah-Hartman commit 25fdeb3f4468595ab2885687b13515fa848731c2 Author: Ingo Oeser Date: Wed Jul 23 01:25:01 2008 +0200 kobject: Replace ALL occurrences of '/' with '!' instead of only the first one. A recent patch from Kay Sievers replaced the first occurrence of '/' with '!' as needed for block devices. Now do some cheap defensive coding and replace all of them to avoid future issues in this area. Signed-off-by: Ingo Oeser Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 2540e0511ea17e25831be543cdf9381e6209950d Author: Jarek Poplawski Date: Thu Aug 21 05:11:14 2008 -0700 pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race dev_deactivate() can skip rescheduling of a qdisc by qdisc_watchdog() or other timer calling netif_schedule() after dev_queue_deactivate(). We prevent this checking aliveness before scheduling the timer. Since during deactivation the root qdisc is available only as qdisc_sleeping additional accessor qdisc_root_sleeping() is created. With feedback from Herbert Xu Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller commit 8323444b5dba3fe55e56a95d20d8f55c1d6745af Author: venkatesh.pallipadi@intel.com Date: Wed Aug 20 16:45:53 2008 -0700 x86: PAT Update validate_pat_support for intel CPUs Pentium III and Core Solo/Duo CPUs have an erratum " Page with PAT set to WC while associated MTRR is UC may consolidate to UC " which can result in WC setting in PAT to be ineffective. We will disable PAT on such CPUs, so that we can continue to use MTRR WC setting. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Ingo Molnar commit 28df82ebab79c6a2b4295dd94fd8de88196a49df Author: venkatesh.pallipadi@intel.com Date: Wed Aug 20 16:45:52 2008 -0700 devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS All kernel mappings like ioremap(), etc uses UC_MINUS as the type. /dev/mem mappings with /dev/mem being opened with O_SYNC however was using UC, resulting in a conflict with /dev/mem mmap failing. This seems to be affecting some apps (one being flashrom) which are using O_SYNC and which were working before. Switch /dev/mem with O_SYNC also to UC_MINUS. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Ingo Molnar commit c15238df3b65e34fadb1021b0fb0d5aebc7c42c6 Author: venkatesh.pallipadi@intel.com Date: Wed Aug 20 16:45:51 2008 -0700 x86: PAT proper tracking of set_memory_uc and friends Big thinko in pat memtype tracking code. reserve_memtype should be called with physical address and not virtual address. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Suresh Siddha Signed-off-by: Ingo Molnar commit b2a6a58ca6a3ddf4e278a53199c5b8fd39adbc0e Author: Vegard Nossum Date: Wed Aug 20 18:18:26 2008 +0200 x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable) This section mismatch: >> Seems to be a section mismatch; init_intel() is __cpuinit while >> numaq_tsc_disable() is __init. Seems to be introduced in: >> >> commit 64898a8bad8c94ad7a4bd5cc86b66edfbb081f4a >> Author: Yinghai Lu >> Date: Sat Jul 19 18:01:16 2008 -0700 >> >> x86: extend and use x86_quirks to clean up NUMAQ code > > Oops, I am wrong about numaq_tsc_disable() being __init. Still, I > believe that Yinghai might be able to say what's really wrong :-) Would lead to this crash: BUG: unable to handle kernel paging request at c08a45f0 IP: [] numaq_tsc_disable+0x0/0x40 Fixed by the patch below. Signed-off-by: Vegard Nossum Signed-off-by: Ingo Molnar commit 7946612de2087e163308e26034286fc2dc9dacf1 Author: Jeremy Fitzhardinge Date: Wed Aug 20 11:31:07 2008 -0700 x86: export pv_lock_ops non-GPL None of the spinlock API is exported GPL, so there's no reason for pv_lock_ops to be. Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Ingo Molnar Cc: drago01 commit 7701e8c59b0e7cbcf21c1bc49d8b8c6db43027a4 Author: Marcin Slusarz Date: Wed Aug 20 21:07:47 2008 +0200 x86, mmiotrace: silence section mismatch warning - leave_uniprocessor WARNING: vmlinux.o(.text+0x180af): Section mismatch in reference from the function leave_uniprocessor() to the function .cpuinit.text:cpu_up() The function leave_uniprocessor() references the function __cpuinit cpu_up(). This is often because leave_uniprocessor lacks a __cpuinit annotation or the annotation of cpu_up is wrong. leave_uniprocessor calls cpu_up only when CONFIG_HOTPLUG_CPU is set, so it can be safely annotated as __ref Signed-off-by: Marcin Slusarz Cc: Pekka Paalanen Signed-off-by: Ingo Molnar Cc: Ingo Molnar Cc: Pekka Paalanen commit 5e739d1752aca4e8f3e794d431503bfca3162df4 Author: Vlad Yasevich Date: Thu Aug 21 03:34:25 2008 -0700 sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API and address all of the crash scenarios. Signed-off-by: Vlad Yasevich Signed-off-by: David S. Miller commit 320dcc30f498e0a8b282b14cf0feed1897ea3b34 Author: Peer Chen Date: Wed Aug 20 16:43:24 2008 -0700 ALSA: hda_intel: enable snoop for nvidia HDA controller Enable the snoop for nvidia hda controller to avoid data coherence issue. Signed-off-by: Peer Chen Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai commit bde78a79a6eb015f33aa4660df1b06f5135def20 Author: Arjan van de Ven Date: Tue Jul 8 09:51:56 2008 -0700 x86: use WARN() in arch/x86/kernel Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. This also allowed the folding of some if()'s into the WARN() Signed-off-by: Arjan van de Ven Cc: akpm@linux-foundation.org Signed-off-by: Ingo Molnar commit 0c072bb452f0cfd4959bc01ff3627d6385255b20 Author: Arjan van de Ven Date: Tue Jul 8 09:50:22 2008 -0700 x86: use WARN() in arch/x86/mm/ioremap.c Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven Cc: akpm@linux-foundation.org Signed-off-by: Ingo Molnar commit 85d577979a8a94a32ca1d828a91c2eb8300bc9f2 Author: David Howells Date: Mon Aug 18 11:58:17 2008 +0200 werror: fix pci calgary Fix an integer comparison always false warning in the PCI Calgary 64 driver. A u8 is being compared to something that's 512 by default, resulting in the following warning: arch/x86/kernel/pci-calgary_64.c:1285: warning: comparison is always false due to limited range of data type This was introduced by patch b34e90b8f0f30151349134f87b5dc6ef75a5218c. Signed-off-by: David Howells Signed-off-by: Ingo Molnar commit 3c4fbe5e01d7e5309be5045e7ae0db20a049e6dc Author: Miao Xie Date: Wed Aug 20 16:37:38 2008 -0700 nohz: fix wrong event handler after online an offlined cpu On the tickless system(CONFIG_NO_HZ=y and CONFIG_HIGH_RES_TIMERS=n), after I made an offlined cpu online, I found this cpu's event handler was tick_handle_periodic, not tick_nohz_handler. After debuging, I found this bug was caused by the wrong tick mode. the tick mode is not changed to NOHZ_MODE_INACTIVE when the cpu is offline. This patch fixes this bug. Signed-off-by: Miao Xie Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar commit 01dcb0443ed89eccf26c2b43f1ea13b368ae740d Author: Randy Dunlap Date: Wed Aug 20 16:35:19 2008 -0700 rcu: fix synchronize_rcu() so that kernel-doc works Fix RCU's synchronize_rcu() so that it looks like a C function, enabling it to be recognized as a function with kernel-doc annotation. Warning(linux-2.6.26-git11//kernel/rcupdate.c:81): No description found for parameter 'synchronize_rcu' Warning(linux-2.6.26-git11//kernel/rcupdate.c:81): No description found for parameter 'call_rcu' [akpm@linux-foundation.org: fix comment] Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar commit efc2dead2c82cae31943828f6d977c483942b0eb Author: Peter Zijlstra Date: Wed Aug 20 12:44:55 2008 +0200 sched: enable LB_BIAS by default Yanmin reported a significant regression on his 16-core machine due to: commit 93b75217df39e6d75889cc6f8050343286aff4a5 Author: Peter Zijlstra Date: Fri Jun 27 13:41:33 2008 +0200 Flip back to the old behaviour. Reported-by: "Zhang, Yanmin" Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 55d8460c921ed725f5bf46c826a6bddbe8a75c46 Author: Mike Rapoport Date: Wed Aug 20 06:10:06 2008 +0100 [ARM] 5212/1: pxa: fix build error when CPU_PXA310 is not defined Fix arch/arm/mach-pxa/pxa300.c:94: error: 'CKEN_MMC3' undeclared here (not in a function) when building for PXA300. Signed-off-by: Mike Rapoport Acked-by: Eric Miao Signed-off-by: Russell King commit 80a8c9fffa78f57d7d4351af2f15a56386805ceb Author: Andi Kleen Date: Tue Aug 19 03:13:38 2008 +0200 x86: fix oprofile + hibernation badness Vegard Nossum reported oprofile + hibernation problems: > Now some warnings: > > ------------[ cut here ]------------ > WARNING: at /uio/arkimedes/s29/vegardno/git-working/linux-2.6/kernel/smp.c:328 s > mp_call_function_mask+0x194/0x1a0() The usual problem: the suspend function when interrupts are already disabled calls smp_call_function which is not allowed with interrupt off. But at this point all the other CPUs should be already down anyways, so it should be enough to just drop that. This patch should fix that problem at least by fixing cpu hotplug& suspend support. [ mingo@elte.hu: fixed 5 coding style errors. ] Signed-off-by: Andi Kleen Tested-by: Vegard Nossum Signed-off-by: Ingo Molnar commit 99dd8713306a89f3e106143581244e550e00a644 Author: Cliff Wickman Date: Tue Aug 19 12:51:59 2008 -0500 x86, SGI UV: hardcode the TLB flush interrupt system vector The UV TLB shootdown mechanism needs a system interrupt vector. Its vector had been hardcoded as 200, but needs to moved to the reserved system vector range so that it does not collide with some device vector. This is still temporary until dynamic system IRQ allocation is provided. But it will be needed when real UV hardware becomes available and runs 2.6.27. Signed-off-by: Cliff Wickman Signed-off-by: Ingo Molnar commit 80c5e73d6028e0f03ab0c70e7c4cbf98ac2e0c43 Author: Venki Pallipadi Date: Tue Aug 19 16:28:01 2008 -0700 x86: fix Xorg startup/shutdown slowdown with PAT Rene Herman reported significant Xorg startup/shutdown slowdown due to PAT. It turns out that the memtype list has thousands of entries. Add cached_entry to list add routine, in order to speed up the lookup for sequential reserve_memtype calls. Reported-by: Rene Herman Signed-off-by: Venkatesh Pallipadi Signed-off-by: Ingo Molnar commit c6744955d0ec0cb485c28c51eeb7185e260f6172 Author: Samuel Sieb Date: Wed Aug 6 22:06:29 2008 -0700 x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)" Cyrix MediaGXm/Cx5530 Unicorn Revision 1.19.3B has stopped booting starting at v2.6.22. The reason is this commit: > commit f25f64ed5bd3c2932493681bdfdb483ea707da0a > Author: Juergen Beisert > Date: Sun Jul 22 11:12:38 2007 +0200 > > x86: Replace NSC/Cyrix specific chipset access macros by inlined functions. this commit activated a macro which was dormant before due to (buggy) macro side-effects. I've looked through various datasheets and found that the GXm and GXLV Geode processors don't have an incrementor. Remove the incrementor setup entirely. As the incrementor value differs according to clock speed and we would hope that the BIOS configures it correctly, it is probably the right solution. Cc: Signed-off-by: Ingo Molnar commit 45dd75d83cef8c4e4a8d78bc8ed072a01196d30c Merge: 24babad... a77a57a... Author: Roland Dreier Date: Tue Aug 19 15:01:45 2008 -0700 Merge branches 'ipath' and 'ipoib' into for-linus commit a77a57a1a22afc31891d95879fe3cf2ab03838b0 Author: Roland Dreier Date: Tue Aug 19 15:01:32 2008 -0700 IPoIB: Fix deadlock on RTNL in ipoib_stop() Commit c8c2afe3 ("IPoIB: Use rtnl lock/unlock when changing device flags") added a call to rtnl_lock() in ipoib_mcast_join_task(), which is run from the ipoib_workqueue. However, ipoib_stop() (which is run inside rtnl_lock()) flushes this workqueue, which leads to a deadlock if the join task is pending. Fix this by simply not flushing the workqueue from ipoib_stop(). It turns out that we really don't care about workqueue tasks running during or after ipoib_stop(), as long as we make sure to flush the workqueue before unregistering a netdev. This fixes . Signed-off-by: Roland Dreier commit d90c1add96a038fc45c7239017ba4f9a9a5ca42b Author: Tomasz Chmielewski Date: Tue Aug 19 09:54:20 2008 +0100 [ARM] 5208/1: fsg-setup.c fixes This patch against 2.6.27-rc3 does the following changes to FSG-3 setup code: 1) Enable RTC on FSG-3 (proper name is needed). This change is needed due to a recent change in i2c. 2) i variable is only used when compiling for big endian. So move its declaration to ARMEB ifdef to silence the warning when compiling for LE. Mailing list link: http://lists.arm.linux.org.uk/lurker/message/20080813.091556.cae2917e.en.html Signed-off-by: Tomasz Chmielewski Signed-off-by: Russell King commit 8a7c5ef3ba8cca8f9c4f91ddef3d081f517914ae Author: Jiri Kosina Date: Tue Aug 19 02:13:55 2008 +0200 x86 iommu: remove unneeded parenthesis The parenthesis in __iommu_queue_command() are not needed when assigning into 'target' variable. Signed-off-by: Jiri Kosina Signed-off-by: Ingo Molnar commit 1a1dc50442ef1a3e5ef938a8541466ac38d163a9 Merge: faa64c9... 908cbc1... Author: Russell King Date: Mon Aug 18 22:17:37 2008 +0100 Merge branch 'for_rmk_17' of git://git.mnementh.co.uk/linux-2.6-im commit faa64c93ae3fa3b3c97e502e60ce8430ab61cd9d Author: Russell King Date: Tue Aug 5 10:36:00 2008 +0100 [ARM] fix impd1.c build warning CC arch/arm/mach-integrator/impd1.o arch/arm/mach-integrator/impd1.c: In function `impd1_probe': arch/arm/mach-integrator/impd1.c:408: warning: too few arguments for format Signed-off-by: Russell King commit 24babadec0209e5f84c067cb89aca6515486d35c Author: Dave Olson Date: Fri Aug 15 11:25:20 2008 -0700 IB/ipath: Fix incorrect check for max physical address in TID The check for max physical address was incorrect, thus limiting the range of allowed physical addresses. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit 7ec01ff950c455aa1f1ccfaf347eb1aa9ec160d5 Author: Ralph Campbell Date: Fri Aug 15 11:23:47 2008 -0700 IB/ipath: Fix lost UD send work request If a UD QP has some work requests queued to be sent by the DMA engine followed by a local loopback work request, we have to wait for the previous work requests to finish or the completion for the local loopback work request would be generated out of order. The problem was that the work request queue pointer was already updated so that the request would not be processed when the DMA queue drained. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 908cbc10135755ea055feaa6a8ec209edfe489be Author: Ian Molton Date: Sat Aug 9 21:50:28 2008 +0100 [ARM] e400 config use MFP This patch updates e400 to use the new MFP GPIO setup code. Signed-off-by: Ian Molton commit 2836548826b4187ba770b14d36bc40d52a76b49c Author: Ian Molton Date: Sat Aug 9 21:48:45 2008 +0100 [ARM] e740 config use MFP This patch updates e740 to use the new MFP GPIO setup code. Signed-off-by: Ian Molton commit dec5abe9219aebf6d65e9af95de1c031d7039bdb Author: Ian Molton Date: Sat Aug 9 21:26:59 2008 +0100 [ARM] Fix eseries IRQ limit The max IRQ is too small for all e-series machines which have at least one GPIO expander chip in them. Signed-off-by: Ian Molton commit c1ed406c212973bd59712a0ab722639a75381898 Author: Ian Molton Date: Sat Jul 26 00:52:36 2008 +0100 [ARM] clocklib: Update users of aliases to new API This patch removes the hardcoded alias array from pxa25x.c and reimplements its functionality using the new clock alias call. Signed-off-by: Ian Molton commit 5fedd0afd661cf2d387a6eb1b0df78ddbc0c9086 Author: Ian Molton Date: Fri Jul 25 12:02:31 2008 +0100 [ARM] clocklib: Allow dynamic alias creation This patch allows dynamic creation of clock aliases in order to make it possible to have platform independent clock names for use in device drivers. Signed-off-by: Ian Molton commit 67a6e80ede815224db22518cd08350277bbeddb9 Author: Ian Molton Date: Sat Jul 26 00:51:12 2008 +0100 [ARM] eseries: whitespace fixes and cleanup Signed-off-by: Ian Molton commit 4537398d91e6e03811ba971d959b762137058c1a Author: Theodore Ts'o Date: Sun Jul 27 19:59:21 2008 -0400 ext4: Update documentation to remind users to update mke2fs.conf Signed-off-by: "Theodore Ts'o" commit 5e745b041f2ccad63077118b40468521306f3962 Author: Aneesh Kumar K.V Date: Mon Aug 18 18:00:57 2008 -0400 ext4: Fix small file fragmentation For small file block allocations, mballoc uses per cpu prealloc space. Use goal block when searching for the right prealloc space. Also make sure ext4_da_writepages tries to write all the pages for small files in single attempt Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit 91246c009094142f95ecc7573b7caed2bcef52c7 Author: Aneesh Kumar K.V Date: Tue Aug 19 21:14:52 2008 -0400 ext4: Initialize writeback_index to 0 when allocating a new inode The write_cache_pages() function uses the mapping->writeback_index as the starting index to write out when range_cyclic is set. Properly initialize writeback_index so that we start the writeout at index 0. This was found when debugging the small file fragmentation on ext4. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit 16eb72956496594d023a7d7cd14a86404ad195ad Author: Aneesh Kumar K.V Date: Tue Aug 19 21:16:54 2008 -0400 ext4: make sure ext4_has_free_blocks returns 0 for ENOSPC Fix ext4_has_free_blocks() to return 0 when we don't have enough space. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 525f4ed8dcb72c71b306a78ecbf06f41d08fe441 Author: Mingming Cao Date: Tue Aug 19 22:15:58 2008 -0400 ext4: journal credit fix for the delayed allocation's writepages() function Previous delalloc writepages implementation started a new transaction outside of a loop which called get_block() to do the block allocation. Since we didn't know exactly how many blocks would need to be allocated, the estimated journal credits required was very conservative and caused many issues. With the reworked delayed allocation, a new transaction is created for each get_block(), thus we don't need to guess how many credits for the multiple chunk of allocation. We start every transaction with enough credits for inserting a single exent. When estimate the credits for indirect blocks to allocate a chunk of blocks, we need to know the number of data blocks to allocate. We use the total number of reserved delalloc datablocks; if that is too big, for non-extent files, we need to limit the number of blocks to EXT4_MAX_TRANS_BLOCKS. Code cleanup from Aneesh. Signed-off-by: Mingming Cao Reviewed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit a1d6cc563bfdf1bf2829d3e6ce4d8b774251796b Author: Aneesh Kumar K.V Date: Tue Aug 19 21:55:02 2008 -0400 ext4: Rework the ext4_da_writepages() function With the below changes we reserve credit needed to insert only one extent resulting from a call to single get_block. This makes sure we don't take too much journal credits during writeout. We also don't limit the pages to write. That means we loop through the dirty pages building largest possible contiguous block request. Then we issue a single get_block request. We may get less block that we requested. If so we would end up not mapping some of the buffer_heads. That means those buffer_heads are still marked delay. Later in the writepage callback via __mpage_writepage we redirty those pages. We should also not limit/throttle wbc->nr_to_write in the filesystem writepages callback. That cause wrong behaviour in generic_sync_sb_inodes caused by wbc->nr_to_write being <= 0 Signed-off-by: Aneesh Kumar K.V Reviewed-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit f3bd1f3fa8ca7ec70cfd87aa94dc5e1a260901f2 Author: Mingming Cao Date: Tue Aug 19 22:16:03 2008 -0400 ext4: journal credits reservation fixes for DIO, fallocate DIO and fallocate credit calculation is different than writepage, as they do start a new journal right for each call to ext4_get_blocks_wrap(). This patch uses the helper function in DIO and fallocate case, passing a flag indicating that the modified data are contigous thus could account less indirect/index blocks. This patch also fixed the journal credit reservation for direct I/O (DIO). Previously the estimated credits for DIO only was calculated for non-extent files, which was not enough if the file is extent-based. Also fixed was fallocate double-counting credits for modifying the the superblock. Signed-off-by: Mingming Cao Reviewed-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit ee12b630687d510f6f4b6d4acdc4e267fd4adeda Author: Mingming Cao Date: Tue Aug 19 22:16:05 2008 -0400 ext4: journal credits reservation fixes for extent file writepage This patch modified the writepage/write_begin credit calculation for extent files, to use the credits caculation helper function. The current calculation of how many index/leaf blocks should be accounted is too conservetive, it always considered the worse case, where the tree level is 5, and in the case of multiple chunk allocations, it always assumed no blocks were dirtied in common across the allocations. This path uses the accurate depth of the inode with some extras to calculate the index blocks, and also less conservative in the case of multiple allocation accounting. Signed-off-by: Mingming Cao Reviewed-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit a02908f19c819aeec5e3dcf238adaa6deddd70b0 Author: Mingming Cao Date: Tue Aug 19 22:16:07 2008 -0400 ext4: journal credits calulation cleanup and fix for non-extent writepage When considering how many journal credits are needed for modifying a chunk of data, we need to account for the super block, inode block, quota blocks and xattr block, indirect/index blocks, also, group bitmap and group descriptor blocks for new allocation (including data and indirect/index blocks). There are many places in ext4 do the calculation on their own and often missed one or two meta blocks, and often they assume single block allocation, and did not considering the multile chunk of allocation case. This patch is trying to cleanup current journal credit code, provides some common helper funtion to calculate the journal credits, to be used for writepage, writepages, DIO, fallocate, migration, defrag, and for both nonextent and extent files. This patch modified the writepage/write_begin credit caculation for nonextent files, to use the new helper function. It also fixed the problem that writepage on nonextent files did not consider the case blocksize Reviewed-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit c001077f4003fa75793bb62979baa6241dd8eb19 Author: Eric Sandeen Date: Tue Aug 19 22:19:50 2008 -0400 ext4: Fix bug where we return ENOSPC even though we have plenty of inodes The find_group_flex() function starts with best_flex as the parent_fbg_group, which happens to have 0 inodes free. Some of the flex groups searched have free blocks and free inodes, but the flex_freeb_ratio is < 10, so they're skipped. Then when a group is compared to the current "best" flex group, it does not have more free blocks than "best", so it is skipped as well. This continues until no flex group with free inodes is found which has a proper ratio or which has more free blocks than the "best" group, and we're left with a "best" group that has 0 inodes free, and we return -ENOSPC. We fix this by changing the logic so that if the current "best" flex group has no inodes free, and the current one does have room, it is promoted to the next "best." Signed-off-by: Eric Sandeen Signed-off-by: "Theodore Ts'o" commit 37609fd5ae62db75026d9f53096a1fbc35e040d9 Author: Josef Bacik Date: Tue Aug 19 22:13:41 2008 -0400 ext4: don't try to resize if there are no reserved gdt blocks left When trying to resize an ext4 fs and you run out of reserved gdt blocks, you get an error that doesn't actually tell you what went wrong, it just says that the gdb it picked is not correct, which is the case since you don't have any reserved gdt blocks left. This patch adds a check to make sure you have reserved gdt blocks to use, and if not prints out a more relevant error. Signed-off-by: Josef Bacik Cc: Cc: Andreas Dilger Signed-off-by: Andrew Morton Signed-off-by: "Theodore Ts'o" commit 88aa3cff4e9a38b953de9fbc54c96e619a2bb9f9 Author: Theodore Ts'o Date: Sat Aug 16 07:57:35 2008 -0400 ext4: Use ext4_discard_reservations instead of mballoc-specific call In ext4_ext_truncate(), we should use the more generic ext4_discard_reservations() call so we do the right thing when the filesystem is mounted with the nomballoc option. Signed-off-by: "Theodore Ts'o" Reviewed-by: Mingming Cao commit d015641734cde55d2fce48a6db3983c8a029fe05 Author: Theodore Ts'o Date: Tue Aug 19 21:57:43 2008 -0400 ext4: Fix ext4_dx_readdir hash collision handling This fixes a bug where readdir() would return a directory entry twice if there was a hash collision in an hash tree indexed directory. Signed-off-by: Eugene Dashevsky Signed-off-by: Mike Snitzer Signed-off-by: "Theodore Ts'o" commit cd21322616c3af265d39bf15321d436e667a5dd1 Author: Mingming Cao Date: Tue Aug 19 22:16:59 2008 -0400 ext4: Fix delalloc release block reservation for truncate Ext4 will release the reserved blocks for delayed allocations when inode is truncated/unlinked. If there is no reserved block at all, we shouldn't need to do so. But current code still tries to release the reserved blocks regardless whether the counters's value is 0. Continue to do that causes the later calculation to go wrong and a kernel BUG_ON() caught that. This doesn't happen for extent-based files, as the calculation for 0 reserved blocks was right for extent based file. This patch fixed the kernel BUG() due to above reason. It adds checks for 0 to avoid unnecessary release and fix calculation for non-extent files. Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit b4df2030858bde986cb6ff2e4b45945f84649e32 Author: Theodore Ts'o Date: Wed Aug 13 21:44:34 2008 -0400 ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty We need to call ext4_discard_reservation() earlier in ext4_truncate(), to avoid a BUG() in ext4_mb_return_to_preallocation(), which is called (ultimately) by ext4_free_blocks(). So we must ditch the blocks on i_prealloc_list before we start freeing the data blocks. Signed-off-by: "Theodore Ts'o" commit bf068ee266f9dbaa6dacb8433a366bb399e7ae5b Author: Aneesh Kumar K.V Date: Tue Aug 19 22:16:43 2008 -0400 ext4: Handle unwritten extent properly with delayed allocation When using fallocate the buffer_heads are marked unwritten and unmapped. We need to map them in the writepages after a get_block. Otherwise we split the uninit extents, but never write the content to disk. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o"