commit 90bc1a658a53f8832ee799685703977a450e5af9 Merge: 6ce90c4 54822de Author: Linus Torvalds Date: Tue Aug 4 15:49:11 2009 -0700 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (32 commits) MIPS: Wire up accept4 syscall. MIPS: VPE: Delete unused function get_tc_unused(). MIPS: VPE: Fix bogus indentation. MIPS: VPE: Make various functions static. MIPS: VPE: Free relocation chain on error. MIPS: VPE: Fix compiler warning. MIPS: Module: Make error messages unique. MIPS: Octeon: Run IPI code with interrupts disabled. MIPS: Jazz: Fix read buffer overflow MIPS: Use DIV_ROUND_CLOSEST MIPS: MTX-1: Request button GPIO before setting its direction MIPS: AR7: Override CFLAGS with -Werror MIPS: AR7: Remove unused tnetd7200_get_clock function MIPS: AR7: Use DMA_BIT_MASK(nn) instead of deprecated DMA_nnBIT_MASK MIPS: AR7: Fix build failures when CONFIG_SERIAL_8250 is not enabled MIPS: Fix read buffer overflow MIPS: AR7: Fix build warning on memory.c MIPS: Octeon PCIe: Make hardware and software bus numbers match. MIPS: RBTX4939: Fix IOC pin-enable register updating MIPS: Simplify and correct interrupt handling for MSP4200 ... commit 6ce90c430baef6e411dcf32e872913888bb3ef54 Merge: 9f3eea6 4b35d2c Author: Linus Torvalds Date: Tue Aug 4 15:39:55 2009 -0700 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Read buffer overflow ALSA: hda: Correct EAPD for Dell Inspiron 1525 ALSA: hda: warn on spurious response ALSA: hda: remember last command for each codec ALSA: hda: read CORBWP inside reg_lock ALSA: hda: take reg_lock in azx_init_cmd_io/azx_free_cmd_io ALSA: hda: take cmd_mutex in probe_codec() ALSA: hda: track CIRB/CORB command/response states for each codec ALSA: hda - Fix quirk for Toshiba Satellite A135-S4527 commit 9f3eea6a2fbf5a07625713dc35e5f8fb91adb12f Merge: 2cf812d cbe9352 Author: Linus Torvalds Date: Tue Aug 4 15:39:43 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: tty-ldisc: be more careful in 'put_ldisc' locking tty-ldisc: turn ldisc user count into a proper refcount tty-ldisc: make refcount be atomic_t 'users' count commit 2cf812d732442e86c1e2018e23ad82f9bc594a38 Merge: ae83060 14d9fa3 Author: Linus Torvalds Date: Tue Aug 4 15:39:16 2009 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block * 'for-linus' of git://git.kernel.dk/linux-2.6-block: Make SCSI SG v4 driver enabled by default and remove EXPERIMENTAL dependency, since udev depends on BSG block: Update topology documentation block: Stack optimal I/O size block: Add a wrapper for setting minimum request size without a queue block: Make blk_queue_stack_limits use the new stacking interface commit ae83060026537885fd23737af161fee8afd04f4b Merge: 2edb389 357eb46 Author: Linus Torvalds Date: Tue Aug 4 15:38:34 2009 -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: (47 commits) ehea: Fix napi list corruption on ifconfig down igbvf: Allow VF driver to correctly recognize failure to set mac 3c59x: Fix build failure with gcc 3.2 sky2: Avoid transmits during sky2_down() iwlagn: do not send key clear commands when rfkill enabled libertas: Read buffer overflow drivers/net/wireless: introduce missing kfree drivers/net/wireless/iwlwifi: introduce missing kfree zd1211rw: fix unaligned access in zd_mac_rx cfg80211: fix regression on beacon world roaming feature cfg80211: add two missing NULL pointer checks ixgbe: Patch to modify 82598 PCIe completion timeout values bluetooth: rfcomm_init bug fix mlx4_en: Fix double pci unmapping. mISDN: Fix handling of receive buffer size in L1oIP pcnet32: VLB support fixes pcnet32: remove superfluous NULL pointer check in pcnet32_probe1() net: restore the original spinlock to protect unicast list netxen: fix coherent dma mask setting mISDN: Read buffer overflow ... commit 2edb3898b82a20ec459a67fcf76ceddcbecfe395 Merge: c71c090 ffd4bc2 Author: Linus Torvalds Date: Tue Aug 4 15:38:10 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (23 commits) [SCSI] sd: Avoid sending extended inquiry to legacy devices [SCSI] libsas: fix wide port hotplug issues [SCSI] libfc: fix a circular locking warning during sending RRQ [SCSI] qla4xxx: Remove hiwat code so scsi eh does not get escalated when we can make progress [SCSI] qla4xxx: Fix srb lookup in qla4xxx_eh_device_reset [SCSI] qla4xxx: Fix Driver Fault Recovery Completion [SCSI] qla4xxx: add timeout handler [SCSI] qla4xxx: Correct Extended Sense Data Errors [SCSI] libiscsi: disable bh in and abort handler. [SCSI] zfcp: Fix tracing of request id for abort requests [SCSI] zfcp: Fix wka port processing [SCSI] zfcp: avoid double notify in lowmem scenario [SCSI] zfcp: Add port only once to FC transport class [SCSI] zfcp: Recover from stalled outbound queue [SCSI] zfcp: Fix erp escalation procedure [SCSI] zfcp: Fix logic for physical port close [SCSI] zfcp: Use -EIO for SBAL allocation failures [SCSI] zfcp: Use unchained mode for small ct and els requests [SCSI] zfcp: Use correct flags for zfcp_erp_notify [SCSI] zfcp: Return -ENOMEM for allocation failures in zfcp_fsf ... commit c71c090ff9c474d70af4796b5ea9f548a9d3b6b8 Merge: 78ec75c c271834 Author: Linus Torvalds Date: Tue Aug 4 15:35:47 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: amd64_edac: print debug statements only on error amd64_edac: fix ECC checking commit 78ec75cd1c81e01909005f392954c797f686d7bc Merge: 1ee5332cf c96e7c7 Author: Linus Torvalds Date: Tue Aug 4 15:34:30 2009 -0700 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/ttm: Read buffer overflow drm/radeon: Read buffer overflow drm/ttm: Fix a sync object leak. drm/radeon/kms: fix memory leak in radeon_driver_load_kms drm/radeon/kms: fix nomodeset. drm/ttm: Fix a potential comparison of structs. drm/radeon/kms: fix rv515 VRAM initialisation. drm/radeon: add some new r7xx pci ids drm: Catch stop possible NULL pointer reference drm: Small logic fix in drm_mode_setcrtc commit 1ee5332cf67c2f5f468ad1a59033d57453bcad1a Merge: 0786820 cae5a39 Author: Linus Torvalds Date: Tue Aug 4 15:34:09 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-2.6: parisc: hppb.c - fix printk format strings parisc: parisc-agp.c - use correct page_mask function parisc: sticore.c - check return values parisc: dino.c - check return value of pci_assign_resource() parisc: hp_sdc_mlc.c - check return value of down_trylock() parisc: includecheck fix for ccio-dma.c parisc: Set correct bit in protection flags parisc: isa-eeprom - Fix loff_t usage parisc: fixed faulty check in lba_pci parisc: Fix read buffer overflow in pdc_stable driver parisc: Fix GOT overflow during module load on 64bit kernel commit 07868201070d87484bd00610a4921e879be78746 Author: Jonathan Corbet Date: Tue Aug 4 13:35:17 2009 -0600 flex_array: remove unneeded index calculation flex_array_get() calculates an index value, then drops it on the floor; simply remove it. Signed-off-by: Jonathan Corbet Acked-by: Dave Hansen Signed-off-by: Linus Torvalds commit a40694a38a745af0dd7d8b796597ada1dd6caeb7 Merge: ea56342 f265426 Author: Linus Torvalds Date: Tue Aug 4 15:32:40 2009 -0700 Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf_counter: Set the CONFIG_PERF_COUNTERS default to y if CONFIG_PROFILING=y perf: Fix read buffer overflow perf top: Add mwait_idle_with_hints to skip_symbols[] perf tools: Fix faulty check perf report: Update for the new FORK/EXIT events perf_counter: Full task tracing perf_counter: Collapse inherit on read() tracing, perf_counter: Add help text to CONFIG_EVENT_PROFILE perf_counter tools: Fix link errors with older toolchains commit ea5634246beaedd91b93d7e7fce7d825232d1b78 Merge: 7193675 07903af Author: Linus Torvalds Date: Tue Aug 4 15:32:22 2009 -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: Fix race in cpupri introduced by cpumask_var changes sched: Fix latencytop and sleep profiling vs group scheduling commit 7193675dc8ffa0325d013602d2bbccc0954db502 Merge: 9c66812 70d715f Author: Linus Torvalds Date: Tue Aug 4 15:32:08 2009 -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: posix-timers: Fix oops in clock_nanosleep() with CLOCK_MONOTONIC_RAW commit 9c66812b6bee225950431de51dfc9dc664905038 Merge: b5a7c9a e16852c Author: Linus Torvalds Date: Tue Aug 4 15:31:51 2009 -0700 Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: tracing: Fix missing function_graph events when we splice_read from trace_pipe tracing: Fix invalid function_graph entry trace: stop tracer in oops_enter() ftrace: Only update $offset when we update $ref_func ftrace: Fix the conditional that updates $ref_func tracing: only truncate ftrace files when O_TRUNC is set tracing: show proper address for trace-printk format commit b5a7c9a0b3c5de22e1762120063daae9f91d5197 Merge: 067e181 1cef8e4 Author: Linus Torvalds Date: Tue Aug 4 15:29:25 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: twl4030 irq fixes commit 067e18133f01ee0136bcec2633eb93f7320721a2 Merge: 3f5760b dc731fb Author: Linus Torvalds Date: Tue Aug 4 15:28:59 2009 -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 compilation warning in arch/x86/kernel/apm_32.c x86, UV: Complete IRQ interrupt migration in arch_enable_uv_irq() x86, 32-bit: Fix double accounting in reserve_top_address() x86: Don't use current_cpu_data in x2apic phys_pkg_id x86, UV: Fix UV apic mode x86, UV: Fix macros for accessing large node numbers x86, UV: Delete mapping of MMR rangs mapped by BIOS x86, UV: Handle missing blade-local memory correctly x86: fix assembly constraints in native_save_fl() x86, msr: execute on the correct CPU subset x86: Fix assert syntax in vmlinux.lds.S x86: Make 64-bit efi_ioremap use ioremap on MMIO regions x86: Add quirk to make Apple MacBook5,2 use reboot=pci x86: Fix CPA memtype reserving in the set_pages_array*() cases x86, pat: Fix set_memory_wc related corruption x86: fix section mismatch for i386 init code commit 3f5760b90eb3bacfaa4d4c3e584152468ed327ca Merge: 624720e 4bc5d34 Author: Linus Torvalds Date: Tue Aug 4 15:28:46 2009 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] Make cpufreq suspend code conditional on powerpc. [CPUFREQ] Fix a kobject reference bug related to managed CPUs [CPUFREQ] Do not set policy for offline cpus [CPUFREQ] Fix NULL pointer dereference regression in conservative governor commit 624720e09c9b7913ef4bc6989878a6fcb7ecdff8 Merge: 849c9ca 01a261e Author: Linus Torvalds Date: Tue Aug 4 15:28:23 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: nilfs2: fix missing unlock in error path of nilfs_mdt_write_page nilfs2: fix oops due to inconsistent state in page with discrete b-tree nodes commit 849c9caa60642095060e9c21f14687ae9149a6f3 Merge: a33a052 d098564 Author: Linus Torvalds Date: Tue Aug 4 15:27:56 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] Update readme to reflect forceuid mount parms cifs: Read buffer overflow cifs: show noforceuid/noforcegid mount options (try #2) cifs: reinstate original behavior when uid=/gid= options are specified [CIFS] Updates fs/cifs/CHANGES cifs: fix error handling in mount-time DFS referral chasing code commit cbe9352fa08f90aa03b4dbf1bbabfc95d196e562 Author: Linus Torvalds Date: Mon Aug 3 14:54:56 2009 -0700 tty-ldisc: be more careful in 'put_ldisc' locking Use 'atomic_dec_and_lock()' to make sure that we always hold the tty_ldisc_lock when the ldisc count goes to zero. That way we can never race against 'tty_ldisc_try()' increasing the count again. Reported-by: OGAWA Hirofumi Signed-off-by: Linus Torvalds Tested-by: Sergey Senozhatsky Signed-off-by: Greg Kroah-Hartman commit 65b770468e98941e45e19780dff9283e663e6b8b Author: Linus Torvalds Date: Mon Aug 3 11:11:19 2009 -0700 tty-ldisc: turn ldisc user count into a proper refcount By using the user count for the actual lifetime rules, we can get rid of the silly "wait_for_idle" logic, because any busy ldisc will automatically stay around until the last user releases it. This avoids a host of odd issues, and simplifies the code. So now, when the last ldisc reference is dropped, we just release the ldisc operations struct reference, and free the ldisc. It looks obvious enough, and it does work for me, but the counting _could_ be off. It probably isn't (bad counting in the new version would generally imply that the old code did something really bad, like free an ldisc with a non-zero count), but it does need some testing, and preferably somebody looking at it. With this change, both 'tty_ldisc_put()' and 'tty_ldisc_deref()' are just aliases for the new ref-counting 'put_ldisc()'. Both of them decrement the ldisc user count and free it if it goes down to zero. They're identical functions, in other words. But the reason they still exist as sepate functions is that one of them was exported (tty_ldisc_deref) and had a stupid name (so I don't want to use it as the main name), and the other one was used in multiple places (and I didn't want to make the patch larger just to rename the users). In addition to the refcounting, I did do some minimal cleanup. For example, now "tty_ldisc_try()" actually returns the ldisc it got under the lock, rather than returning true/false and then the caller would look up the ldisc again (now without the protection of the lock). That said, there's tons of dubious use of 'tty->ldisc' without obviously proper locking or refcounting left. I expressly did _not_ want to try to fix it all, keeping the patch minimal. There may or may not be bugs in that kind of code, but they wouldn't be _new_ bugs. That said, even if the bugs aren't new, the timing and lifetime will change. For example, some silly code may depend on the 'tty->ldisc' pointer not changing because they hold a refcount on the 'ldisc'. And that's no longer true - if you hold a ref on the ldisc, the 'ldisc' itself is safe, but tty->ldisc may change. So the proper locking (remains) to hold tty->ldisc_mutex if you expect tty->ldisc to be stable. That's not really a _new_ rule, but it's an example of something that the old code might have unintentionally depended on and hidden bugs. Whatever. The patch _looks_ sensible to me. The only users of ldisc->users are: - get_ldisc() - atomically increment the count - put_ldisc() - atomically decrements the count and releases if zero - tty_ldisc_try_get() - creates the ldisc, and sets the count to 1. The ldisc should then either be released, or be attached to a tty. Signed-off-by: Linus Torvalds Tested-by: OGAWA Hirofumi Tested-by: Sergey Senozhatsky Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 18eac1cc100fa2afd5f39085aae6b694e417734b Author: Linus Torvalds Date: Mon Aug 3 10:58:29 2009 -0700 tty-ldisc: make refcount be atomic_t 'users' count This is pure preparation of changing the ldisc reference counting to be a true refcount that defines the lifetime of the ldisc. But this is a purely syntactic change for now to make the next steps easier. This patch should make no semantic changes at all. But I wanted to make the ldisc refcount be an atomic (I will be touching it without locks soon enough), and I wanted to rename it so that there isn't quite as much confusion between 'ldo->refcount' (ldisk operations refcount) and 'ld->refcount' (ldisc refcount itself) in the same file. So it's now an atomic 'ld->users' count. It still starts at zero, despite having a reference from 'tty->ldisc', but that will change once we turn it into a _real_ refcount. Signed-off-by: Linus Torvalds Tested-by: OGAWA Hirofumi Tested-by: Sergey Senozhatsky Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 14d9fa352592582e457cf75022202766baac1348 Author: John Stoffel Date: Tue Aug 4 22:10:17 2009 +0200 Make SCSI SG v4 driver enabled by default and remove EXPERIMENTAL dependency, since udev depends on BSG Make Block Layer SG support v4 the default, since recent udev versions depend on this to access serial numbers and other low level info properly. This should be backported to older kernels as well, since most distros have enabled this for a long time. Signed-off-by: John Stoffel Cc: stable@kernel.org Signed-off-by: Jens Axboe commit 357eb46d8f275b4e8484541234ea3ba06065e258 Author: Hannes Hering Date: Tue Aug 4 11:48:39 2009 -0700 ehea: Fix napi list corruption on ifconfig down This patch fixes the napi list handling when an ehea interface is shut down to avoid corruption of the napi list. Signed-off-by: Hannes Hering Signed-off-by: David S. Miller commit e0cff5ed27acd355264b210d9622da801a431e19 Author: Alexander Duyck Date: Tue Aug 4 11:46:41 2009 -0700 igbvf: Allow VF driver to correctly recognize failure to set mac The VF driver was not correctly recognizing that it did not correctly set it's mac address. As a result the VF driver was unable to receive network traffic until being unloaded and reloaded. The issue was root caused to the fact that the CTS bit was not taken into account when checking for the request being NAKed. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 4bc5d34135039566b8d6efa2de7515b2be505da8 Author: Dave Jones Date: Tue Aug 4 14:03:25 2009 -0400 [CPUFREQ] Make cpufreq suspend code conditional on powerpc. The suspend code runs with interrupts disabled, and the powerpc workaround we do in the cpufreq suspend hook calls the drivers ->get method. powernow-k8's ->get does an smp_call_function_single which needs interrupts enabled cpufreq's suspend/resume code was added in 42d4dc3f4e1e to work around a hardware problem on ppc powerbooks. If we make all this code conditional on powerpc, we avoid the issue above. Signed-off-by: Dave Jones commit d5194decd0a6f792b2789eebd4ddf022a248f655 Author: Thomas Renninger Date: Wed Jul 29 11:26:20 2009 +0200 [CPUFREQ] Fix a kobject reference bug related to managed CPUs The first offline/online cycle is successful, the second not. Doing: echo 0 >cpu1/online echo 1 >cpu1/online echo 0 >cpu1/online The last command will trigger: Jul 22 14:39:50 linux kernel: [ 593.210125] ------------[ cut here ]------------ Jul 22 14:39:50 linux kernel: [ 593.210139] WARNING: at lib/kref.c:43 kref_get+0x23/0x2b() Jul 22 14:39:50 linux kernel: [ 593.210144] Hardware name: To Be Filled By O.E.M. Jul 22 14:39:50 linux kernel: [ 593.210148] Modules linked in: powernow_k8 Jul 22 14:39:50 linux kernel: [ 593.210158] Pid: 378, comm: kondemand/2 Tainted: G W 2.6.31-rc2 #38 Jul 22 14:39:50 linux kernel: [ 593.210163] Call Trace: Jul 22 14:39:50 linux kernel: [ 593.210171] [] ? kref_get+0x23/0x2b Jul 22 14:39:50 linux kernel: [ 593.210181] [] warn_slowpath_common+0x77/0xa4 Jul 22 14:39:50 linux kernel: [ 593.210190] [] warn_slowpath_null+0xf/0x11 Jul 22 14:39:50 linux kernel: [ 593.210198] [] kref_get+0x23/0x2b Jul 22 14:39:50 linux kernel: [ 593.210206] [] kobject_get+0x1a/0x22 Jul 22 14:39:50 linux kernel: [ 593.210214] [] cpufreq_cpu_get+0x8a/0xcb Jul 22 14:39:50 linux kernel: [ 593.210222] [] __cpufreq_driver_getavg+0x1d/0x67 Jul 22 14:39:50 linux kernel: [ 593.210231] [] do_dbs_timer+0x158/0x27f Jul 22 14:39:50 linux kernel: [ 593.210240] [] worker_thread+0x200/0x313 ... The output continues on every do_dbs_timer ondemand freq checking poll. This regression was introduced by git commit: 3f4a782b5ce2698b1870b5a7b573cd721d4fce33 The policy is released when the cpufreq device is removed in: __cpufreq_remove_dev(): /* if this isn't the CPU which is the parent of the kobj, we * only need to unlink, put and exit */ Not creating the symlink is not sever at all. As long as: sysfs_remove_link(&sys_dev->kobj, "cpufreq"); handles it gracefully that the symlink did not exist. Possibly no error should be returned at all, because ondemand governor would still provide the same functionality. Userspace in userspace gov case might be confused if the link is missing. Resolves http://bugzilla.kernel.org/show_bug.cgi?id=13903 CC: Mathieu Desnoyers CC: Venkatesh Pallipadi Signed-off-by: Thomas Renninger Signed-off-by: Dave Jones commit 42c74b84c64633dd3badbfc2abd2ef1728b64b30 Author: Prarit Bhargava Date: Mon Aug 3 10:58:11 2009 -0400 [CPUFREQ] Do not set policy for offline cpus Suspend/Resume fails on multi socket, multi core systems because the cpufreq code erroneously sets the per_cpu policy_cpu value when a logical cpu is offline. This most notably results in missing sysfs files that are used to set the cpu frequencies of the various cpus. Signed-off-by: Prarit Bhargava Signed-off-by: Dave Jones commit 26d204afa18f7df177f21bdb3759e0098ca8f7d5 Author: Pallipadi, Venkatesh Date: Wed Jul 29 13:36:10 2009 -0700 [CPUFREQ] Fix NULL pointer dereference regression in conservative governor Commit ee88415caf736b89500f16e0a545614541a45005 introduced this regression when it removed enable bit in cpu_dbs_info_s. That added a possibility of dbs_cpufreq_notifier getting called for a CPU that is not yet managed by conservative governor. That will happen as the transition notifier is set as soon as one CPU switches to conservative governor and other CPUs can get a NULL pointer dereference without the enable bit check. Add the enable bit back again. Reported-by: Lermytte Christophe Signed-off-by: Venkatesh Pallipadi Signed-off-by: Dave Jones commit 1cef8e41073efe47e809f49670eb461307e52ccc Author: Russell King Date: Mon Jul 27 11:30:48 2009 +0530 mfd: twl4030 irq fixes The TWL4030 IRQ handler has a bug which leads to spinlock lock-up. It is calling the 'unmask' function in a process context. :The mask/unmask/ack functions are only designed to be called from the IRQ handler code, or the proper API interfaces found in linux/interrupt.h. Also there is no need to have IRQ chaining mechanism. The right way to handle this is to claim the parent interrupt as a standard interrupt and arrange for handle_twl4030_pih to take care of the rest of the devices. Mail thread on this issue can be found at: http://marc.info/?l=linux-arm-kernel&m=124629940123396&w=2 Signed-off-by: Russell King Tested-by: Santosh Shilimkar Acked-by: Tony Lindgren Signed-off-by: Samuel Ortiz commit f26542600e605482a1231c44ddb2966d69bd09b0 Author: Ingo Molnar Date: Mon Jun 29 10:40:20 2009 +0200 perf_counter: Set the CONFIG_PERF_COUNTERS default to y if CONFIG_PROFILING=y If user has already enabled profiling support in the kernel (for oprofile, old-style profiling of ftrace) then offer up perfcounters with a y default in interactive kconfig sessions. Still keep it off by default otherwise. Cc: Peter Zijlstra Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit dc731fbbadf5d65c98fcd6c86472aa286c16458a Author: Subrata Modak Date: Tue Jul 21 08:02:27 2009 +0530 x86: Work around compilation warning in arch/x86/kernel/apm_32.c The following fix was initially inspired by David Howells fix few days back: http://lkml.org/lkml/2009/7/9/109 However, Ingo disapproves such fixes as it's dangerous (it can hide future, relevant warnings) - in something as performance-uncritical. So, initialize 'err' to '0' to work around a GCC false positive warning: http://lkml.org/lkml/2009/7/18/89 Signed-off-by: Subrata Modak Cc: Sachin P Sant Cc: David Howells Cc: Balbir Singh Cc: Stephen Rothwell LKML-Reference: <20090721023226.31855.67236.sendpatchset@subratamodak.linux.ibm.com> Signed-off-by: Ingo Molnar commit 2a5ef41661b56cf4eee042a6967c4e14b63e8eac Author: Jack Steiner Date: Mon Jul 20 09:28:41 2009 -0500 x86, UV: Complete IRQ interrupt migration in arch_enable_uv_irq() In uv_setup_irq(), the call to create_irq() initially assigns IRQ vectors to cpu 0. The subsequent call to assign_irq_vector() in arch_enable_uv_irq() migrates the IRQ to another cpu and frees the cpu 0 vector - at least it will be freed as soon as the "IRQ move" completes. arch_enable_uv_irq() needs to send a cleanup IPI to complete the IRQ move. Otherwise, assignment of GRU interrupts on large systems (>200 cpus) will exhaust the cpu 0 interrupt vectors and initialization of the GRU driver will fail. Signed-off-by: Jack Steiner LKML-Reference: <20090720142840.GA8885@sgi.com> Signed-off-by: Ingo Molnar commit 6abf65510944d33b47575d151c6b318993c8d2b5 Author: Jan Beulich Date: Thu Jul 30 16:49:30 2009 +0100 x86, 32-bit: Fix double accounting in reserve_top_address() With VMALLOC_END included in the calculation of MAXMEM (as of 2.6.28) it is no longer correct to also bump __VMALLOC_RESERVE in reserve_top_address(). Doing so results in needlessly small lowmem. Signed-off-by: Jan Beulich LKML-Reference: <4A71DD2A020000780000D482@vpn.id2.novell.com> Signed-off-by: Ingo Molnar commit d8c7eb34c2db6268909ae8c3958be63bde254292 Author: Yinghai Lu Date: Sat Jul 25 03:23:09 2009 -0700 x86: Don't use current_cpu_data in x2apic phys_pkg_id One system has socket 1 come up as BSP. kexeced kernel reports BSP as: [ 1.524550] Initializing cgroup subsys cpuacct [ 1.536064] initial_apicid:20 [ 1.537135] ht_mask_width:1 [ 1.538128] core_select_mask:f [ 1.539126] core_plus_mask_width:5 [ 1.558479] CPU: Physical Processor ID: 0 [ 1.559501] CPU: Processor Core ID: 0 [ 1.560539] CPU: L1 I cache: 32K, L1 D cache: 32K [ 1.579098] CPU: L2 cache: 256K [ 1.580085] CPU: L3 cache: 24576K [ 1.581108] CPU 0/0x20 -> Node 0 [ 1.596193] CPU 0 microcode level: 0xffff0008 It doesn't have correct physical processor id and will get an error: [ 38.840859] CPU0 attaching sched-domain: [ 38.848287] domain 0: span 0,8,72 level SIBLING [ 38.851151] groups: 0 8 72 [ 38.858137] domain 1: span 0,8-15,72-79 level MC [ 38.868944] groups: 0,8,72 9,73 10,74 11,75 12,76 13,77 14,78 15,79 [ 38.881383] ERROR: parent span is not a superset of domain->span [ 38.890724] domain 2: span 0-7,64-71 level CPU [ 38.899237] ERROR: domain->groups does not contain CPU0 [ 38.909229] groups: 8-15,72-79 [ 38.912547] ERROR: groups don't span domain->span [ 38.919665] domain 3: span 0-127 level NODE [ 38.930739] groups: 0-7,64-71 8-15,72-79 16-23,80-87 24-31,88-95 32-39,96-103 40-47,104-111 48-55,112-119 56-63,120-127 it turns out: we can not use current_cpu_data in phys_pgd_id for x2apic. identify_boot_cpu() is called by check_bugs() before smp_prepare_cpus() and till smp_prepare_cpus() current_cpu_data for bsp is assigned with boot_cpu_data. Just make phys_pkg_id for x2apic is aligned to xapic. Signed-off-by: Yinghai Lu Acked-by: Suresh Siddha Cc: Andrew Morton LKML-Reference: <4A6ADD0D.10002@kernel.org> Signed-off-by: Ingo Molnar commit c5997fa8d7aca3c9876a6ff71bacf27c41095ce9 Author: Jack Steiner Date: Mon Jul 27 09:38:56 2009 -0500 x86, UV: Fix UV apic mode Change SGI UV default apicid mode to "physical". This is required to match settings in the UV hub chip. Signed-off-by: Jack Steiner LKML-Reference: <20090727143856.GA8905@sgi.com> Signed-off-by: Ingo Molnar commit 67e83f309ed0baaf01a2c956b5174905bcdc1242 Author: Jack Steiner Date: Mon Jul 27 09:38:08 2009 -0500 x86, UV: Fix macros for accessing large node numbers The UV chipset automatically supplies the upper bits on nodes being referenced by MMR accesses. These bit can be deleted from the hub addressing macros. Signed-off-by: Jack Steiner LKML-Reference: <20090727143808.GA8076@sgi.com> Signed-off-by: Ingo Molnar commit cc5e4fa1bd4d2f56da07f9092281afdcd2374ab9 Author: Jack Steiner Date: Mon Jul 27 09:36:56 2009 -0500 x86, UV: Delete mapping of MMR rangs mapped by BIOS The UV BIOS has added additional MMR ranges that are mapped via EFI virtual mode mappings. These ranges should be deleted from ranges mapped by uv_system_init(). Signed-off-by: Jack Steiner Cc: linux-mm@kvack.org LKML-Reference: <20090727143656.GA7698@sgi.com> Signed-off-by: Ingo Molnar commit 6c7184b77464261b7d55583a48accbd1350923a3 Author: Jack Steiner Date: Mon Jul 27 09:35:07 2009 -0500 x86, UV: Handle missing blade-local memory correctly UV blades may not have any blade-local memory. Add a field (nid) to the UV blade structure to indicates whether the node has local memory. This is needed by the GRU driver (pushed separately). Signed-off-by: Jack Steiner Cc: linux-mm@kvack.org LKML-Reference: <20090727143507.GA7006@sgi.com> Signed-off-by: Ingo Molnar commit e16852cfc5580b88cb327413ab8c89375f380592 Merge: bdff787 74e7ff8 Author: Ingo Molnar Date: Tue Aug 4 13:58:28 2009 +0200 Merge branch 'tracing/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into tracing/urgent commit c2718348b41a8e7646516d9af8bb0231c6a44374 Author: Doug Thompson Date: Tue Aug 4 12:02:20 2009 +0200 amd64_edac: print debug statements only on error Add forgotten return calls for the successful cases. Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 7e030655dda5b5efc4305e2a8f46c4967d32eb3d Author: Roel Kluin Date: Sun Aug 2 13:43:11 2009 +0200 perf: Fix read buffer overflow Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin Cc: a.p.zijlstra@chello.nl Cc: Andrew Morton LKML-Reference: <4A757BCF.40101@gmail.com> Signed-off-by: Ingo Molnar commit 70d715fd0597f18528f389b5ac59102263067744 Author: Hiroshi Shimamoto Date: Mon Aug 3 11:48:19 2009 +0900 posix-timers: Fix oops in clock_nanosleep() with CLOCK_MONOTONIC_RAW Prevent calling do_nanosleep() with clockid CLOCK_MONOTONIC_RAW, it may cause oops, such as NULL pointer dereference. Signed-off-by: Hiroshi Shimamoto Cc: Andrew Morton Cc: Thomas Gleixner Cc: John Stultz Cc: LKML-Reference: <4A764FF3.50607@ct.jp.nec.com> Signed-off-by: Ingo Molnar commit 0cb13536c3382004bd9b833565e2af33f26ed1fb Author: Jean Delvare Date: Mon Aug 3 21:10:01 2009 -0700 3c59x: Fix build failure with gcc 3.2 Fix the following build failure with gcc 3.2: CC [M] drivers/net/3c59x.o drivers/net/3c59x.c:2726:1: directives may not be used inside a macro argument drivers/net/3c59x.c:2725:59: unterminated argument list invoking macro "pr_err" drivers/net/3c59x.c: In function `dump_tx_ring': drivers/net/3c59x.c:2727: implicit declaration of function `pr_err' drivers/net/3c59x.c:2731: syntax error before ')' token Apparently gcc 3.2 doesn't like #if interleaved with a macro call. Signed-off-by: Jean Delvare Signed-off-by: David S. Miller commit d098564f3b2b5d555e51bca765a6a9e0dda8f2cd Author: Steve French Date: Tue Aug 4 03:53:28 2009 +0000 [CIFS] Update readme to reflect forceuid mount parms Signed-off-by: Steve French commit c96e7c7a3a79931446ecf9494a8415e4d164ebd8 Author: Roel Kluin Date: Mon Aug 3 14:22:53 2009 +0200 drm/ttm: Read buffer overflow Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin Signed-off-by: Dave Airlie commit fa99239cb73dbf419bea9f334b85ba94ac88a532 Author: Roel Kluin Date: Mon Aug 3 14:20:32 2009 +0200 drm/radeon: Read buffer overflow Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin Signed-off-by: Dave Airlie commit fee280d3fd9bc5247bef9f4ab35a4693bfffdcfd Author: Thomas Hellstrom Date: Mon Aug 3 12:39:06 2009 +0200 drm/ttm: Fix a sync object leak. If there are multiple simultaneous waiters for the same buffer object, a temporary reference to its sync object may be leaked. Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie commit c9b7fb54f0a51e587fa09be3a85666b43d36a850 Author: Xiaotian Feng Date: Wed Jul 29 21:28:24 2009 +0800 drm/radeon/kms: fix memory leak in radeon_driver_load_kms This patch fixes following kmemleak report: unreferenced object 0xffff88022cb53000 (size 4096): comm "work_for_cpu", pid 97, jiffies 4294672345 backtrace: [] create_object+0x19f/0x2a0 [] kmemleak_alloc+0x26/0x4c [] __kmalloc+0x187/0x1b0 [] kzalloc.clone.0+0x13/0x15 [radeon] [] radeon_driver_load_kms+0x26/0xe1 [radeon] [] drm_get_dev+0x37f/0x480 [drm] [] radeon_pci_probe+0x15/0x269 [radeon] [] local_pci_probe+0x17/0x1b [] do_work_for_cpu+0x18/0x2a [] kthread+0x8a/0x92 [] child_rip+0xa/0x20 [] 0xffffffffffffffff Signed-off-by: Xiaotian Feng Signed-off-by: Dave Airlie commit de05065ff5d6878523317ff4a0b48a1239f80f73 Author: Dave Airlie Date: Mon Aug 3 12:05:34 2009 +1000 drm/radeon/kms: fix nomodeset. The ordering was wrong to get the nomodeset parameter to work. Signed-off-by: Dave Airlie commit 6d0897ba58139523d37e97855ee0fe2d78629da6 Author: Thomas Hellstrom Date: Fri Jul 31 10:47:51 2009 +0200 drm/ttm: Fix a potential comparison of structs. On some architectures the comparison may cause a compilation failure. Original partial fix Signed-off-by: Thomas Hellstrom Signed-off-by: Pekka Paalanen Signed-off-by: Dave Airlie commit 0924d942256ac470c5f7b4ebaf7fe0415fc6fa59 Author: Dave Airlie Date: Mon Aug 3 12:03:03 2009 +1000 drm/radeon/kms: fix rv515 VRAM initialisation. This got missed in the VRAM init re-workings. Signed-of-by: Dave Airlie commit 7320700df1864b601cef5adbddce8654a0e3f78b Author: Alex Deucher Date: Mon Aug 3 17:01:53 2009 -0400 drm/radeon: add some new r7xx pci ids Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 4cb72b1727140f131b2df5f37c2e54f5965f98c2 Author: Jakob Bornecrantz Date: Mon Aug 3 13:43:59 2009 +0100 drm: Catch stop possible NULL pointer reference This was caught by Weiss. Also added some comments to the fb_changed and mode_changed variables to explain what they do. Signed-off-by: Jakob Bornecrantz Tested-by: Thomas White Signed-off-by: Dave Airlie commit 7781de74568bddfefbd2d32a934a8c791a2420cd Author: Jakob Bornecrantz Date: Mon Aug 3 13:43:58 2009 +0100 drm: Small logic fix in drm_mode_setcrtc Match the logic to the comments in the debug message Signed-off-by: Jakob Bornecrantz Signed-off-by: Dave Airlie commit eca4c3d2dd66d0230140c9af05dee591df6f0e42 Merge: f6caa14 99f1b01 Author: David S. Miller Date: Mon Aug 3 19:05:50 2009 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 commit f6caa14aa0b126d4a2933907d1519611b2a8524a Author: Mike McCormack Date: Fri Jul 31 01:57:42 2009 +0000 sky2: Avoid transmits during sky2_down() This patch supersedes my previous patch "sky2: Avoid transmitting during sky2_restart". I have reworked the patch to avoid crashes during both sky2_restart() and sky2_set_ringparam(). Without this patch, the sky2 driver can be crashed by doing: # pktgen eth1 & (transmit many packets on eth1) # ethtool -G eth1 tx 510 I am aware you object to storing extra state, but I can't see a way around this. Without remembering that we're restarting, netif_wake_queue() is called in the ISR from sky2_tx_complete(), and netif_tx_lock() is used in sky2_tx_done(). If anybody can see a way around this, please let me know. Signed-off-by: Mike McCormack Signed-off-by: David S. Miller commit f1f029c7bfbf4ee1918b90a431ab823bed812504 Author: H. Peter Anvin Date: Mon Aug 3 16:33:40 2009 -0700 x86: fix assembly constraints in native_save_fl() From Gabe Black in bugzilla 13888: native_save_fl is implemented as follows: 11static inline unsigned long native_save_fl(void) 12{ 13 unsigned long flags; 14 15 asm volatile("# __raw_save_flags\n\t" 16 "pushf ; pop %0" 17 : "=g" (flags) 18 : /* no input */ 19 : "memory"); 20 21 return flags; 22} If gcc chooses to put flags on the stack, for instance because this is inlined into a larger function with more register pressure, the offset of the flags variable from the stack pointer will change when the pushf is performed. gcc doesn't attempt to understand that fact, and address used for pop will still be the same. It will write to somewhere near flags on the stack but not actually into it and overwrite some other value. I saw this happen in the ide_device_add_all function when running in a simulator I work on. I'm assuming that some quirk of how the simulated hardware is set up caused the code path this is on to be executed when it normally wouldn't. A simple fix might be to change "=g" to "=r". Reported-by: Gabe Black Signed-off-by: H. Peter Anvin Cc: Stable Team commit bab9a3da93bfe09c609407dedae5708b07a7ac56 Author: Borislav Petkov Date: Thu Jul 30 11:10:01 2009 +0200 x86, msr: execute on the correct CPU subset Make rdmsr_on_cpus/wrmsr_on_cpus execute on the current CPU only if it is in the supplied bitmask. Signed-off-by: Borislav Petkov Signed-off-by: H. Peter Anvin commit d2ba8b211bb8abc29aa627dbd4dce08cfbc8082b Author: H. Peter Anvin Date: Mon Aug 3 14:44:54 2009 -0700 x86: Fix assert syntax in vmlinux.lds.S Older versions of binutils did not accept the naked "ASSERT" syntax; it is considered an expression whose value needs to be assigned to something. Reported-tested-and-fixed-by: Jean Delvare Signed-off-by: H. Peter Anvin commit 24e2fb615fd6b624c320cec9ea9d91a75dad902e Author: Roel Kluin Date: Sun Aug 2 13:00:18 2009 +0200 cifs: Read buffer overflow Check whether index is within bounds before testing the element. Acked-by: Jeff Layton Signed-off-by: Roel Kluin Signed-off-by: Steve French commit 4486d6ede16b362f89b29845af6fe1a26ae78a54 Author: Jeff Layton Date: Mon Aug 3 12:45:10 2009 -0400 cifs: show noforceuid/noforcegid mount options (try #2) Since forceuid is the default, we now need to show when it's disabled. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 6a7bbd57ed50bb62c9a81ae5f2e202ca689e5964 Author: Paul Mackerras Date: Mon Aug 3 22:38:10 2009 +1000 x86: Make 64-bit efi_ioremap use ioremap on MMIO regions Booting current 64-bit x86 kernels on the latest Apple MacBook (MacBook5,2) via EFI gives the following warning: [ 0.182209] ------------[ cut here ]------------ [ 0.182222] WARNING: at arch/x86/mm/pageattr.c:581 __cpa_process_fault+0x44/0xa0() [ 0.182227] Hardware name: MacBook5,2 [ 0.182231] CPA: called for zero pte. vaddr = ffff8800ffe00000 cpa->vaddr = ffff8800ffe00000 [ 0.182236] Modules linked in: [ 0.182242] Pid: 0, comm: swapper Not tainted 2.6.31-rc4 #6 [ 0.182246] Call Trace: [ 0.182254] [] ? __cpa_process_fault+0x44/0xa0 [ 0.182261] [] warn_slowpath_common+0x78/0xd0 [ 0.182266] [] warn_slowpath_fmt+0x64/0x70 [ 0.182272] [] ? update_page_count+0x3c/0x50 [ 0.182280] [] ? phys_pmd_init+0x140/0x22e [ 0.182286] [] __cpa_process_fault+0x44/0xa0 [ 0.182292] [] __change_page_attr_set_clr+0x5f0/0xb40 [ 0.182301] [] ? vm_unmap_aliases+0x175/0x190 [ 0.182307] [] change_page_attr_set_clr+0xfe/0x3d0 [ 0.182314] [] _set_memory_uc+0x2a/0x30 [ 0.182319] [] set_memory_uc+0x7b/0xb0 [ 0.182327] [] efi_enter_virtual_mode+0x2ad/0x2c9 [ 0.182334] [] start_kernel+0x2db/0x3f4 [ 0.182340] [] x86_64_start_reservations+0x99/0xb9 [ 0.182345] [] x86_64_start_kernel+0xe0/0xf2 [ 0.182357] ---[ end trace 4eaa2a86a8e2da22 ]--- [ 0.182982] init_memory_mapping: 00000000ffffc000-0000000100000000 [ 0.182993] 00ffffc000 - 0100000000 page 4k This happens because the 64-bit version of efi_ioremap calls init_memory_mapping for all addresses, regardless of whether they are RAM or MMIO. The EFI tables on this machine ask for runtime access to some MMIO regions: [ 0.000000] EFI: mem195: type=11, attr=0x8000000000000000, range=[0x0000000093400000-0x0000000093401000) (0MB) [ 0.000000] EFI: mem196: type=11, attr=0x8000000000000000, range=[0x00000000ffc00000-0x00000000ffc40000) (0MB) [ 0.000000] EFI: mem197: type=11, attr=0x8000000000000000, range=[0x00000000ffc40000-0x00000000ffc80000) (0MB) [ 0.000000] EFI: mem198: type=11, attr=0x8000000000000000, range=[0x00000000ffc80000-0x00000000ffca4000) (0MB) [ 0.000000] EFI: mem199: type=11, attr=0x8000000000000000, range=[0x00000000ffca4000-0x00000000ffcb4000) (0MB) [ 0.000000] EFI: mem200: type=11, attr=0x8000000000000000, range=[0x00000000ffcb4000-0x00000000ffffc000) (3MB) [ 0.000000] EFI: mem201: type=11, attr=0x8000000000000000, range=[0x00000000ffffc000-0x0000000100000000) (0MB) This arranges to pass the EFI memory type through to efi_ioremap, and makes efi_ioremap use ioremap rather than init_memory_mapping if the type is EFI_MEMORY_MAPPED_IO. With this, the above warning goes away. Signed-off-by: Paul Mackerras LKML-Reference: <19062.55858.533494.471153@cargo.ozlabs.ibm.com> Cc: Huang Ying Signed-off-by: H. Peter Anvin commit 6c6c51e4cc11a5456fb1172008f7c69d955af9f6 Author: Paul Mackerras Date: Mon Aug 3 22:47:32 2009 +1000 x86: Add quirk to make Apple MacBook5,2 use reboot=pci The latest Apple MacBook (MacBook5,2) doesn't reboot successfully under Linux; neither the EFI reboot method nor the default method using the keyboard controller works (the system just hangs and doesn't reset). However, the method using the "PCI reset register" at 0xcf9 does work. This adds a quirk to detect this machine via DMI and force the reboot_type to BOOT_CF9. With this it reboots successfully without requiring a command-line option. Note that the EFI code forces reboot_type to BOOT_EFI when the machine is booted via EFI, but this overrides that since the core_initcall runs after the EFI initialization code. Signed-off-by: Paul Mackerras LKML-Reference: <19062.56420.501516.316181@cargo.ozlabs.ibm.com> Signed-off-by: H. Peter Anvin commit 99f1b01562b7dcae75b043114f76163fbf84fcab Author: Reinette Chatre Date: Mon Aug 3 12:10:16 2009 -0700 iwlagn: do not send key clear commands when rfkill enabled Do all key clearing except sending sommands to device when rfkill enabled. When rfkill enabled the interface is brought down and will be brought back up correctly after rfkill is enabled again. Same change is not needed for iwl3945 as it ignores return code when sending key clearing command to device. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13742 Signed-off-by: Reinette Chatre Tested-by: Frans Pop Signed-off-by: John W. Linville commit b929c633b4067be18a335d278a66fd5deef3cabe Author: Roel Kluin Date: Sun Aug 2 09:44:12 2009 +0200 libertas: Read buffer overflow Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin Signed-off-by: John W. Linville commit 9f9857bb5e147b977b9878c46e3dd87c9e8caf50 Author: Julia Lawall Date: Sat Aug 1 10:55:53 2009 +0200 drivers/net/wireless: introduce missing kfree Error handling code following a kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // Signed-off-by: Julia Lawall Signed-off-by: John W. Linville commit c37457e69ffd7d3c94cbfcc1c39be9a45dd7ad21 Author: Julia Lawall Date: Mon Aug 3 11:11:45 2009 +0200 drivers/net/wireless/iwlwifi: introduce missing kfree Move orthogonal error handling code up before a kzalloc, so that it doesn't have to free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // Signed-off-by: Julia Lawall Acked-by: Zhu Yi Signed-off-by: John W. Linville commit dbc1eec485625228895ded6baf6bd01ce2475410 Author: Patrick Simmons Date: Sun Aug 2 02:46:28 2009 -0600 zd1211rw: fix unaligned access in zd_mac_rx Fix an unaligned memory access in the zd_mac_rx function of zd1211rw that causes problems on SPARC64. Signed-off-by: Patrick Simmons Signed-off-by: John W. Linville commit 371842448c05b42d11a4be1c8e4e81d62ecc7534 Author: Luis R. Rodriguez Date: Thu Jul 30 17:43:48 2009 -0700 cfg80211: fix regression on beacon world roaming feature A regression was added through patch a4ed90d6: "cfg80211: respect API on orig_flags on channel for beacon hint" We did indeed respect _orig flags but the intention was not clearly stated in the commit log. This patch fixes firmware issues picked up by iwlwifi when we lift passive scan of beaconing restrictions on channels its EEPROM has been configured to always enable. By doing so though we also disallowed beacon hints on devices registering their wiphy with custom world regulatory domains enabled, this happens to be currently ath5k, ath9k and ar9170. The passive scan and beacon restrictions on those devices would never be lifted even if we did find a beacon and the hardware did support such enhancements when world roaming. Since Johannes indicates iwlwifi firmware cannot be changed to allow beacon hinting we set up a flag now to specifically allow drivers to disable beacon hints for devices which cannot use them. We enable the flag on iwlwifi to disable beacon hints and by default enable it for all other drivers. It should be noted beacon hints lift passive scan flags and beacon restrictions when we receive a beacon from an AP on any 5 GHz non-DFS channels, and channels 12-14 on the 2.4 GHz band. We don't bother with channels 1-11 as those channels are allowed world wide. This should fix world roaming for ath5k, ath9k and ar9170, thereby improving scan time when we receive the first beacon from any AP, and also enabling beaconing operation (AP/IBSS/Mesh) on cards which would otherwise not be allowed to do so. Drivers not using custom regulatory stuff (wiphy_apply_custom_regulatory()) were not affected by this as the orig_flags for the channels would have been cleared upon wiphy registration. I tested this with a world roaming ath5k card. Cc: Jouni Malinen Signed-off-by: Luis R. Rodriguez Reviewed-by: Johannes Berg Signed-off-by: John W. Linville commit cd3468bad96c00b5a512f551674f36776129520e Author: Johannes Berg Date: Wed Jul 29 22:07:44 2009 +0200 cfg80211: add two missing NULL pointer checks These pointers can be NULL, the is_mesh() case isn't ever hit in the current kernel, but cmp_ies() can be hit under certain conditions. Signed-off-by: Johannes Berg Cc: stable@kernel.org [2.6.29, 2.6.30] Signed-off-by: John W. Linville commit 202ff1ec8e53d5dd36e1a5bd4b0a7ed7dbd45087 Author: Mallikarjuna R Chilakala Date: Mon Aug 3 07:20:38 2009 +0000 ixgbe: Patch to modify 82598 PCIe completion timeout values The default completion timeout values for 82598 should be in the range of 50us to 50ms, however the hardware default for these parts is 500us to 1ms which is less than the 10ms recommended by the pcie spec. To address this we need to increase the value to either 10ms to 250ms for capability version 1 configuration, or 16ms to 55ms for version 2. Signed-off-by: Mallikarjuna R Chilakala Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit af0d3b103bcfa877343ee338de12002cd50c9ee5 Author: Dave Young Date: Mon Aug 3 04:26:16 2009 +0000 bluetooth: rfcomm_init bug fix rfcomm tty may be used before rfcomm_tty_driver initilized, The problem is that now socket layer init before tty layer, if userspace program do socket callback right here then oops will happen. reporting in: http://marc.info/?l=linux-bluetooth&m=124404919324542&w=2 make 3 changes: 1. remove #ifdef in rfcomm/core.c, make it blank function when rfcomm tty not selected in rfcomm.h 2. tune the rfcomm_init error patch to ensure tty driver initilized before rfcomm socket usage. 3. remove __exit for rfcomm_cleanup_sockets because above change need call it in a __init function. Reported-by: Oliver Hartkopp Tested-by: Oliver Hartkopp Signed-off-by: Dave Young Signed-off-by: David S. Miller commit 8523acfe40efc1a8d3da8f473ca67cb195b06f0c Author: Thomas Hellstrom Date: Mon Aug 3 09:25:45 2009 +0200 x86: Fix CPA memtype reserving in the set_pages_array*() cases The code was incorrectly reserving memtypes using the page virtual address instead of the physical address. Furthermore, the code was not ignoring highmem pages as it ought to. ( upstream does not pass in highmem pages yet - but upcoming graphics code will do it and there's no reason to not handle this properly in the CPA APIs.) Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13884 Signed-off-by: Thomas Hellstrom Acked-by: Suresh Siddha Cc: Cc: dri-devel@lists.sourceforge.net Cc: venkatesh.pallipadi@intel.com LKML-Reference: <1249284345-7654-1-git-send-email-thellstrom@vmware.com> Signed-off-by: Ingo Molnar commit 54822de7793bf9aa56d79cc173281cdb23b37f9f Author: Ralf Baechle Date: Mon Aug 3 17:27:19 2009 +0100 MIPS: Wire up accept4 syscall. Signed-off-by: Ralf Baechle commit ce21f4e86f89d352efecd044958db1917033b49b Author: Ralf Baechle Date: Mon Aug 3 12:57:52 2009 +0100 MIPS: VPE: Delete unused function get_tc_unused(). Signed-off-by: Ralf Baechle commit 349c4229ed305146a558008d393c622d715cd11d Author: Ralf Baechle Date: Mon Aug 3 12:56:39 2009 +0100 MIPS: VPE: Fix bogus indentation. Signed-off-by: Ralf Baechle commit f18b51cc1f97ca290256e8f94127f6856a42d605 Author: Ralf Baechle Date: Mon Aug 3 12:54:35 2009 +0100 MIPS: VPE: Make various functions static. None of these is used outside the VPE loader. Signed-off-by: Ralf Baechle commit 477c4b07406357ad93d0e32788dbf3ee814eadaa Author: Ralf Baechle Date: Mon Aug 3 12:26:40 2009 +0100 MIPS: VPE: Free relocation chain on error. This may happen if a bad sequence of relocations is being encountered. Signed-off-by: Ralf Baechle commit e2a9cf96a0af24f33206b4bb98cc3a12242260c1 Author: Raghu Gandham Date: Fri Jul 10 02:01:32 2009 -0700 MIPS: VPE: Fix compiler warning. Signed-off-by: Raghu Gandham Signed-off-by: Ralf Baechle commit 6f9fdeb6761a46ded6bf4b799993a3f235ab853d Author: Ralf Baechle Date: Mon Aug 3 10:50:19 2009 +0100 MIPS: Module: Make error messages unique. There were three different errors resulting in a "dangerous relocation" message. Add the relocation type to the messgages to make them more useful. Signed-off-by: Ralf Baechle commit 39b3d44624e9c54e7406274beaf569fe33af2b96 Author: David Daney Date: Fri Jul 31 14:30:07 2009 -0700 MIPS: Octeon: Run IPI code with interrupts disabled. In mm/slab.c the function do_ccupdate_local requires that interrupts be disabled. If they are not, we panic with CONFIG_DEBUG_SLAB. So we disable interrupts while processing IPIs. Also these are not shared irqs, so get rid of the IRQF_SHARED flag. Signed-off-by: David Daney Signed-off-by: Ralf Baechle commit 3d4656d68bad84604f5b01f93e066cd02f77154b Author: Roel Kluin Date: Fri Jul 31 14:52:51 2009 +0200 MIPS: Jazz: Fix read buffer overflow Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin Signed-off-by: Ralf Baechle commit 64f1815507f207ec54ee6b9ae69c48bd153e83b4 Author: Julia Lawall Date: Sun Aug 2 10:48:08 2009 +0200 MIPS: Use DIV_ROUND_CLOSEST The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @haskernel@ @@ #include @depends on haskernel@ expression x,__divisor; @@ - (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // Signed-off-by: Julia Lawall Signed-off-by: Ralf Baechle commit a1b021d3992d9be03b0abec1a7ed78e713b94206 Author: Florian Fainelli Date: Sat Aug 1 23:51:20 2009 +0200 MIPS: MTX-1: Request button GPIO before setting its direction This patch fixes the following warning at boot time: WARNING: at drivers/gpio/gpiolib.c:83 0x8021d5e0() autorequest GPIO-207 Modules linked in: Call Trace:[<8011e0ec>] 0x8011e0ec [<80110a28>] 0x80110a28 [<80110a28>] 0x80110a28 [..snip..] The current code does not request the GPIO and attempts to set its direction, which is a violation of the GPIO API. This patch also unhardcode the GPIO we request and use the one we defined in the button driver. Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle commit 619e22632ea3110323b1851a7fecb52bf8505fd2 Author: Florian Fainelli Date: Fri Jul 24 13:19:10 2009 +0200 MIPS: AR7: Override CFLAGS with -Werror Now that we have removed all warnings from the ar7 board code we can use -Werror like on other MIPS boards. Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle commit e5b3837a52c7fe5c7086590bed902f0fac5f9ec0 Author: Florian Fainelli Date: Fri Jul 24 13:18:42 2009 +0200 MIPS: AR7: Remove unused tnetd7200_get_clock function Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle commit 8e84c1480d2e7d98d487b567100717b9cc9dcfd7 Author: Florian Fainelli Date: Fri Jul 24 13:18:16 2009 +0200 MIPS: AR7: Use DMA_BIT_MASK(nn) instead of deprecated DMA_nnBIT_MASK Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle commit 50ca961912be315035cb0f3508e35c974851da2a Author: Florian Fainelli Date: Fri Jul 24 13:24:15 2009 +0200 MIPS: AR7: Fix build failures when CONFIG_SERIAL_8250 is not enabled This patch fixes the following build failure when CONFIG_SERIAL_8250 is not enabled in the kernel configuration: arch/mips/ar7/built-in.o: In function 'ar7_register_devices': platform.c:(.init.text+0x61c): undefined reference to 'early_serial_setup' platform.c:(.init.text+0x61c): relocation truncated to fit: R_MIPS_26 against 'early_serial_setup' platform.c:(.init.text+0x68c): undefined reference to 'early_serial_setup' platform.c:(.init.text+0x68c): relocation truncated to fit: R_MIPS_26 against 'early_serial_setup' Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle commit ea85a0e4cc870d2bb92e3b2007007901209bb7de Author: Roel Kluin Date: Wed Jul 29 22:02:53 2009 +0200 MIPS: Fix read buffer overflow Signed-off-by: Roel Kluin Signed-off-by: Ralf Baechle commit dd34b5a82feadfaee4f8dea83a694d9349f94a28 Author: Florian Fainelli Date: Tue Jul 21 12:38:10 2009 +0200 MIPS: AR7: Fix build warning on memory.c This patch fixes the following build warning: arch/mips/ar7/memory.c: In function 'memsize': arch/mips/ar7/memory.c:55: warning: passing argument 1 of 'writel' makes integer from pointer without a cast Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle commit 838c05705ef8c110037a713526bb18762db0a241 Author: David Daney Date: Tue Jul 14 18:16:50 2009 -0700 MIPS: Octeon PCIe: Make hardware and software bus numbers match. Some SiliconImage PCIe SATA controlers are not detected when the bus numbers differ. Signed-off-by: David Daney Signed-off-by: Ralf Baechle commit 3e6e92183118d26d856e8efb549987164d1b49b4 Author: Atsushi Nemoto Date: Wed Jul 15 22:03:56 2009 +0900 MIPS: RBTX4939: Fix IOC pin-enable register updating The rbtx4939_update_ioc_pen() expects txx9_ce_res[] already initialized. Call it after tx4939_setup(). Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 0ca71737fee65521ede964afbd2d5484976ed0ed Author: Shane McDonald Date: Sun Jul 12 10:42:06 2009 -0600 MIPS: Simplify and correct interrupt handling for MSP4200 The current interrupt handling code for the MSP4200 always masks an interrupt before acknowledging it. This is not required, as that will be handled by the level interrupt handler. This change simplifies the MSP4200 code to remove the masking in the ack routine, and makes sure that the minimum required operation is performed for masking and acking, rather than always both masking and acking the interrupt. Signed-off-by: Shane McDonald Signed-off-by: Ralf Baechle commit 6577890fd68c2671850214663dd9ae97feacbc47 Author: Florian Fainelli Date: Mon Apr 27 16:47:23 2009 +0200 MIPS: MSPxxxx: define MIPS34K_MISSED_ITLB_WAR for other PMC-Sierra SoC Trying to build a PMC-Sierra MSP4200 VoIP gateway defconfig will not work since MIPS34K_MISSED_ITLB_WAR is not defined for all boards supported within pmc-serria/msp71xx. This patch defines MIPS34K_MISSED_ITLB_WAR to prevent such build failures: CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-mips CC arch/mips/kernel/asm-offsets.s In file included fromlinux-msp71xx/linux-2.6.29/arch/mips/include/asm/bitops.h:24, from include/linux/bitops.h:17, from include/linux/kernel.h:15, from include/linux/sched.h:52, from arch/mips/kernel/asm-offsets.c:13: linux-msp71xx/linux-2.6.29/arch/mips/include/asm/war.h:241:2: error: #error Check setting of MIPS34K_MISSED_ITLB_WAR for your platform This fixes a compile error when building for the MSP4200 boards. Identical patches to fix this were send by Florian Fainelli Shane McDonald Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle commit 4824f20c8b3adcbc5067c1bdd88408ee68da6bb2 Author: Florian Fainelli Date: Mon Apr 27 16:59:48 2009 +0200 MIPS: MSP71xx: fix build failures on msp_irq_slp.c Trying to build MSP4200 VoIP defconfig also fails on msp_irq_slp.c with a non-existing reference to mask_slp_irq, which is in turn mask_msp_slp_irq. Passed that, we will also miss a comma when calling set_irq_chip_and_handler. This patch fixes both issues. Signed-off-by: Florian Fainelli Acked-by: Shane McDonald Signed-off-by: Ralf Baechle commit 0e66fff883ef1b6e4c5031e8add8827cd0e2a195 Author: Gabor Juhos Date: Mon Jul 13 11:14:24 2009 +0200 MIPS: Fix loading of modules with unresolved weak symbols Loading of modules with unresolved weak symbols fails on MIPS since '88173507e4fc1e7ecd111b0565e8cba0cb7dae6d'. Modules: handle symbols that have a zero value The module subsystem cannot handle symbols that are zero. If symbols are present that have a zero value then the module resolver prints out a message that these symbols are unresolved. We have to use IS_ERR_VALUE() to check that a symbol has been resolved or not. Signed-off-by: Gabor Juhos Signed-off-by: Ralf Baechle commit d8e5f9fe5dab0e07985f2456cb6cc57788f53131 Author: Kurt Martin Date: Wed Jul 8 19:22:35 2009 -0700 MIPS: SMTC: Move cross VPE writes to after a TC is assigned to VPE. Signed-off-by: Chris Dearman Signed-off-by: Raghu Gandham Signed-off-by: Ralf Baechle commit 008ee96f1204225503934cb57ac38c49f519c7ab Author: Raghu Gandham Date: Wed Jul 8 17:00:44 2009 -0700 [PATCH] MIPS: SMTC: Fix compile error Commit fc03bc1715ca0ad4ccfe97aab16bcc9e7129c1a4 breaks when SMTC support is enabled on Malta. Signed-off-by: Raghu Gandham Signed-off-by: Ralf Baechle commit 484889fc85a223ef56edc31828b86751b2296b7c Author: David Daney Date: Wed Jul 8 10:07:50 2009 -0700 MIPS: Avoid clobbering struct pt_regs in kthreads The resume() implementation octeon_switch.S examines the saved cp0_status register. We were clobbering the entire pt_regs structure in kernel threads leading to random crashes. When switching away from a kernel thread, the saved cp0_status is examined and if bit 30 is set it is cleared and the CP2 state saved into the pt_regs structure. Since the kernel thread stack overlaid the pt_regs structure this resulted in a corrupt stack. When the kthread with the corrupt stack was resumed, it could crash if it used any of the data in the stack that was clobbered. We fix it by moving the kernel thread stack down so it doesn't overlay pt_regs. Signed-off-by: David Daney Signed-off-by: Ralf Baechle commit 1de010a2702eb21d90883b83bf8c737d5e69d234 Author: Huang Weiyi Date: Thu Jul 9 06:14:37 2009 +0800 MIPS: AR7: Remove unused inclusions of . Signed-off-by: Huang Weiyi Signed-off-by: Ralf Baechle commit 78fe01a5a80da4621321a1dc199c3a0875e2fbb0 Author: Yoichi Yuasa Date: Wed Jul 8 15:08:19 2009 +0900 MIPS: MIPSsim: Fix unbalance brace in mipssim get_c0_compare_int() cc1: warnings being treated as errors arch/mips/mipssim/sim_time.c: In function 'get_c0_compare_int': arch/mips/mipssim/sim_time.c:103: warning: ISO C90 forbids mixed declarations and code arch/mips/mipssim/sim_time.c:116: error: expected declaration or statement at end of input make[1]: *** [arch/mips/mipssim/sim_time.o] Error 1 Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit 7d35cdc07dd26eb6667f66f8e2f43f833a926ecf Author: Alexander Clouter Date: Sun Jul 5 12:00:55 2009 +0100 MIPS: Fix compile for !CONFIG_SMP Commit fc03bc1715ca0ad4ccfe97aab16bcc9e7129c1a4 breaks compiling MIPS with SMP disabled. This patch fixes that. Signed-off-by: Alexander Clouter Signed-off-by: Ralf Baechle commit a887b4dada2f23b2ff2aa725e0509c92dc652597 Author: Akinobu Mita Date: Sat Jul 4 01:33:09 2009 +0900 MIPS: Drop mmap_sem in pagefault oom path Fix the pagefault oom path which does not drop mm->mmap_sem. This was introduced by commit c7c1e3846bac1e4b8a8941f6a194812e28b0a519 Signed-off-by: Akinobu Mita Signed-off-by: Ralf Baechle commit 49316cbf0a9875f102f98dc8b7c80cfa142e33cf Author: Ralf Baechle Date: Mon Jul 6 09:13:17 2009 +0100 MIPS: Eleminate filenames from comments They tend to get not updated when files are moved around or copied and lack any obvious use. While at it zap some only too obvious comments and as per Shinya's suggestion, add a copyright header to extable.c. Signed-off-by: Ralf Baechle Acked-by: Shinya Kuribayashi Acked-by: Thadeu Lima de Souza Cascardo commit 1c1a90d866c5fb029099b9f0f40534e01b7c4d91 Author: Ralf Baechle Date: Sun Jul 5 19:23:30 2009 +0100 [PATCH] MIPS: Cavium: Move swapped comments to their rightful place. Signed-off-by: Ralf Baechle commit 126b67b8d26f6623d199aa59279f2e3243f2144c Author: Doug Thompson Date: Mon Aug 3 12:37:06 2009 +0200 amd64_edac: fix ECC checking On the good path of BIOS enabled ECC and no override, the value returned is 1 by omission and thus is deemed failing by the probe-function. Allow proper module initialization by clearing the retval explicitly. Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 4b35d2ca2307d40ccb6b3b6f9cc25ac9178b2a6c Author: Roel Kluin Date: Sun Aug 2 13:30:45 2009 +0200 ALSA: hda - Read buffer overflow Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai commit 84d3dc200fc8b878acf7c1840b238e6a0450e4d0 Author: Chengu Wang Date: Thu Jul 30 19:43:55 2009 +0800 ALSA: hda: Correct EAPD for Dell Inspiron 1525 The commit 24918b61b55c21e09a3e07cd82e1b3a8154782dc statically changes the model from dell-bios to dell-3stack to solve the sound decreasing regression (http://lkml.org/lkml/2008/9/12/203), however it leads to another problem that the 2nd headphone jack doesn't work (https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3987). So I think the commit 249**2dc is just a workaround. I would like to give a true solution here. The datasheet for STAC9228 says, GPIO2 is the same pin as VOL DOWN, and the EAPD pin is GPIO0. This is why the sound decreases if we set EAPD as GPIO2. This patch changes EAPD to GPIO0 to solve the problem. Signed-off-by: Chengu Wang Signed-off-by: Takashi Iwai commit e310bb0646e57a4f9182865115c5780931456c65 Author: Wu Fengguang Date: Sat Aug 1 19:18:45 2009 +0800 ALSA: hda: warn on spurious response To help disclose hardware bugs. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit feb273404f15d86098cb0e81e46330d5c1e22b1b Author: Wu Fengguang Date: Sat Aug 1 19:17:14 2009 +0800 ALSA: hda: remember last command for each codec Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit c32649feb4573b31f0a2bfdf35cbe1351256c764 Author: Wu Fengguang Date: Sat Aug 1 18:48:12 2009 +0800 ALSA: hda: read CORBWP inside reg_lock This converts the last CORBWP access outside of reg_lock. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit cdb1fbf23181c133fb24f12ad14ccea7dc399599 Author: Wu Fengguang Date: Sat Aug 1 18:47:41 2009 +0800 ALSA: hda: take reg_lock in azx_init_cmd_io/azx_free_cmd_io Just for safety. azx_init_cmd_io() and azx_free_cmd_io() may be called when switching to single command mode. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit a678cdee25a387c8fc3b2754974695412baf1d85 Author: Wu Fengguang Date: Sat Aug 1 18:46:46 2009 +0800 ALSA: hda: take cmd_mutex in probe_codec() Now that each codec will have its own module, it is possible for the user to load one codec while another one is running. So cmd_mutex would be a safe addition to probe_codec(). Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit deadff1665491afce124a8ff83f00f784161f660 Author: Wu Fengguang Date: Sat Aug 1 18:45:16 2009 +0800 ALSA: hda: track CIRB/CORB command/response states for each codec Recently we hit a bug in our dev board, whose HDMI codec#3 may emit redundant/spurious responses, which were then taken as responses to command for another onboard Realtek codec#2, and mess up both codecs. Extend the azx_rb.cmds and azx_rb.res to array and track each codec's commands/responses separately. This helps keep good codec safe from broken ones. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit ce577e8cf5ddb4216553c9d563a9835d6de70ffa Author: Takashi Iwai Date: Mon Aug 3 08:23:52 2009 +0200 ALSA: hda - Fix quirk for Toshiba Satellite A135-S4527 Use model=lenovo instead of model=dallas for Toshiba Satellite A135-S4527 with ALC861-VD codec. Reference: Novell bnc#526325 https://bugzilla.novell.com/show_bug.cgi?id=526325 Signed-off-by: Takashi Iwai commit a33a052f19a21d727847391c8c1aff3fb221c472 Merge: 4905f92 449aad3 Author: Linus Torvalds Date: Sun Aug 2 21:31:40 2009 -0700 Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: md: Use revalidate_disk to effect changes in size of device. md: allow raid5_quiesce to work properly when reshape is happening. md/raid5: set reshape_position correctly when reshape starts. md: Handle growth of v1.x metadata correctly. md: avoid array overflow with bad v1.x metadata md: when a level change reduces the number of devices, remove the excess. md: Push down data integrity code to personalities. md/raid6: release spare page at ->stop() commit eb4ad826419ab5b1260bc1625249114767d36bea Author: Yevgeny Petrilin Date: Sun Aug 2 20:22:18 2009 -0700 mlx4_en: Fix double pci unmapping. In cases of fragmented skb, with the data pointers being wrapped around the TX buffer, the completion handling code would not forward the data pointer and the firs fragment was unmapped several times, while others were not unmapped at all. Signed-off-by: Yevgeny Petrilin Signed-off-by: David S. Miller commit 449aad3e25358812c43afc60918c5ad3819488e7 Author: NeilBrown Date: Mon Aug 3 10:59:58 2009 +1000 md: Use revalidate_disk to effect changes in size of device. As revalidate_disk calls check_disk_size_change, it will cause any capacity change of a gendisk to be propagated to the blockdev inode. So use that instead of mucking about with locks and i_size_write. Also add a call to revalidate_disk in do_md_run and a few other places where the gendisk capacity is changed. Signed-off-by: NeilBrown commit 64bd660b51b2da92e99a5e97349f6558349f11c5 Author: NeilBrown Date: Mon Aug 3 10:59:58 2009 +1000 md: allow raid5_quiesce to work properly when reshape is happening. The ->quiesce method is not supposed to stop resync/recovery/reshape, just normal IO. But in raid5 we don't have a way to know which stripes are being used for normal IO and which for resync etc, so we need to wait for all stripes to be idle to be sure that all writes have completed. However reshape keeps at least some stripe busy for an extended period of time, so a call to raid5_quiesce can block for several seconds needlessly. So arrange for reshape etc to pause briefly while raid5_quiesce is trying to quiesce the array so that the active_stripes count can drop to zero. Signed-off-by: NeilBrown commit e516402c0d4fc02be4af9fa8c18954d4f9deb44e Author: NeilBrown Date: Mon Aug 3 10:59:57 2009 +1000 md/raid5: set reshape_position correctly when reshape starts. As the internal reshape_progress counter is the main driver for reshape, the fact that reshape_position sometimes starts with the wrong value has minimal effect. It is visible in sysfs and that is all. Signed-off-by: NeilBrown commit 70471dafe3390243c598a3165dfb86b8b8b3f4fe Author: NeilBrown Date: Mon Aug 3 10:59:57 2009 +1000 md: Handle growth of v1.x metadata correctly. The v1.x metadata does not have a fixed size and can grow when devices are added. If it grows enough to require an extra sector of storage, we need to update the 'sb_size' to match. Without this, md can write out an incomplete superblock with a bad checksum, which will be rejected when trying to re-assemble the array. Cc: stable@kernel.org Signed-off-by: NeilBrown commit 3673f305faf1bc66ead751344f8262ace851ff44 Author: NeilBrown Date: Mon Aug 3 10:59:56 2009 +1000 md: avoid array overflow with bad v1.x metadata We trust the 'desc_nr' field in v1.x metadata enough to use it as an index in an array. This isn't really safe. So range-check the value first. Signed-off-by: NeilBrown commit 3a981b03f38dc3b8a69b77cbc679e66c1318a44a Author: NeilBrown Date: Mon Aug 3 10:59:55 2009 +1000 md: when a level change reduces the number of devices, remove the excess. When an array is changed from RAID6 to RAID5, fewer drives are needed. So any device that is made superfluous by the level conversion must be marked as not-active. For the RAID6->RAID5 conversion, this will be a drive which only has 'Q' blocks on it. Cc: stable@kernel.org Signed-off-by: NeilBrown commit ac5e7113e74872928844d00085bd47c988f12728 Author: Andre Noll Date: Mon Aug 3 10:59:47 2009 +1000 md: Push down data integrity code to personalities. This patch replaces md_integrity_check() by two new public functions: md_integrity_register() and md_integrity_add_rdev() which are both personality-independent. md_integrity_register() is called from the ->run and ->hot_remove methods of all personalities that support data integrity. The function iterates over the component devices of the array and determines if all active devices are integrity capable and if their profiles match. If this is the case, the common profile is registered for the mddev via blk_integrity_register(). The second new function, md_integrity_add_rdev() is called from the ->hot_add_disk methods, i.e. whenever a new device is being added to a raid array. If the new device does not support data integrity, or has a profile different from the one already registered, data integrity for the mddev is disabled. For raid0 and linear, only the call to md_integrity_register() from the ->run method is necessary. Signed-off-by: Andre Noll Signed-off-by: NeilBrown commit 4905f92ed752d49ebe9cce4fe78a4bc39e710523 Merge: 0ce166b 5973bee Author: Linus Torvalds Date: Sun Aug 2 14:15:46 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: [WATCHDOG] Fix COH 901 327 watchdog enablement commit 0ce166b7b46122bf91a4766e20c85a6485448765 Merge: 57d7f28 3be4ee5 Author: Linus Torvalds Date: Sun Aug 2 14:15:27 2009 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: eeepc-laptop: fix hot-unplug on resume ACPI: Ingore the memory block with zero block size in course of memory hotplug ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver ACPI: bind workqueues to CPU 0 to avoid SMI corruption ACPI: root-only read protection on /sys/firmware/acpi/tables/* thinkpad-acpi: fix incorrect use of TPACPI_BRGHT_MODE_ECNVRAM thinkpad-acpi: restrict procfs count value to sane upper limit thinkpad-acpi: remove dock and bay subdrivers thinkpad-acpi: disable broken bay and dock subdrivers hp-wmi: check that an input device exists in resume handler Revert "ACPICA: Remove obsolete acpi_os_validate_address interface" commit 57d7f282271a83fe4ca4bd15eee79be577210210 Author: Greg Kroah-Hartman Date: Fri Jul 31 21:28:16 2009 -0700 TTY: Maintainer change Clearly, I am a glutton for punishment. I'll see if I can see Alan's changes through to the end, otherwise I'll be fending off a lot of bug reports for usb-serial devices. Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit 79896cf42f6a96d7e14f2dc3473443d68d74031d Author: Linus Torvalds Date: Sun Aug 2 14:04:19 2009 -0700 Make pci_claim_resource() use request_resource() rather than insert_resource() This function has traditionally used "insert_resource()", because before commit cebd78a8c5 ("Fix pci_claim_resource") it used to just insert the resource into whatever root resource tree that was indicated by "pcibios_select_root()". So there Matthew fixed it to actually look up the proper parent resource, which means that now it's actively wrong to then traverse the resource tree any more: we already know exactly where the new resource should go. And when we then did commit a76117dfd6 ("x86: Use pci_claim_resource"), which changed the x86 PCI code from the open-coded pr = pci_find_parent_resource(dev, r); if (!pr || request_resource(pr, r) < 0) { to using if (pci_claim_resource(dev, idx) < 0) { that "insert_resource()" now suddenly became a problem, and causes a regression covered by http://bugzilla.kernel.org/show_bug.cgi?id=13891 which this fixes. Reported-and-tested-by: Rafael J. Wysocki Cc: Matthew Wilcox Cc: Andrew Patterson Cc: Linux PCI Signed-off-by: Linus Torvalds commit b564afcfb82fe3e63a7ce05a944eb5e11244d7cb Author: Andreas Eversberg Date: Mon Jul 27 07:24:04 2009 +0000 mISDN: Fix handling of receive buffer size in L1oIP The size of receive buffer pointer was used to get size of receive buffer instead of recvbuf_size itself, so only 4/8 bytes could be transfered. This is a regression to 2.6.30 introduced by commit 8c90e11e3543d7de612194a042a148caeaab5f1d mISDN: Use kernel_{send,recv}msg instead of open coding Signed-off-by: Andreas Eversberg Signed-off-by: Karsten Keil Signed-off-by: David S. Miller commit 5973bee46fe66db94fab198979dec87f263fc2a8 Author: Linus Walleij Date: Tue Jul 21 00:40:46 2009 +0200 [WATCHDOG] Fix COH 901 327 watchdog enablement Since the COH 901 327 found in U300 is clocked at 32 kHz we need to wait for the interrupt clearing flag to propagate through hardware in order not to accidentally fire off any interrupts when we enable them. Signed-off-by: Linus Walleij Signed-off-by: Wim Van Sebroeck commit 63097b3ad85788a64c75091bff351ecc850761b2 Author: Don Fry Date: Fri Jul 31 08:45:29 2009 +0000 pcnet32: VLB support fixes VLB support has been broken since at least 2004-2005 period as some changes introduced back then assumed that ->pci_dev is always valid, lets try to fix it: - remove duplicated SET_NETDEV_DEV() call - call SET_NETDEV_DEV() only for PCI devices - check for ->pci_dev validity in pcnet32_open() [ Alternatively we may consider removing VLB support but there would not be much gain in it since an extra driver code needed for VLB support is minimal and quite simple. ] This takes care of the following entry from Dan's list: drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev' Reported-by: Dan Carpenter Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Don Fry Signed-off-by: David S. Miller commit df4e7f72f5156ef16a918da8a575ba90ec27ab77 Author: Don Fry Date: Fri Jul 31 08:40:06 2009 +0000 pcnet32: remove superfluous NULL pointer check in pcnet32_probe1() Move the debug printk() into the proper place and remove superfluous NULL pointer check in pcnet32_probe1(). This takes care of the following entry from Dan's list: drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev' Reported-by: Dan Carpenter Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Don Fry Signed-off-by: David S. Miller commit a6ac65db2329e7685299666f5f7b6093c7b0f3a0 Author: Jiri Pirko Date: Thu Jul 30 01:06:12 2009 +0000 net: restore the original spinlock to protect unicast list There is a path when an assetion in dev_unicast_sync() appears. igmp6_group_added -> dev_mc_add -> __dev_set_rx_mode -> -> vlan_dev_set_rx_mode -> dev_unicast_sync Therefore we cannot protect this list with rtnl. This patch restores the original protecting this list with spinlock. Signed-off-by: Jiri Pirko Tested-by: Meelis Roos Signed-off-by: David S. Miller commit 50c643e7652458e649955408685a16e88ea6dbae Author: Dhananjay Phadke Date: Sat Aug 1 21:36:16 2009 +0000 netxen: fix coherent dma mask setting Change default dma mask for NX3031 to 39 bit with ability to update it to 64-bit (if firmware indicates support). Old code was restricting it under 4GB (32-bit), sometimes causing failure to allocate descriptor rings on heavily populated system. NX2031 based NICs will still get 32-bit coherent mask. Signed-off-by: Dhananjay Phadke Signed-off-by: David S. Miller commit 9bfdac94c78faf68ce038d5c45a385927f2667ce Author: roel kluin Date: Fri Jul 31 03:43:59 2009 +0000 mISDN: Read buffer overflow Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin Acked-by: Karsten Keil Signed-off-by: David S. Miller commit 54706d99051582993037be5a076aa543fd7f1c38 Author: roel kluin Date: Sat Aug 1 20:20:13 2009 +0000 s6gmac: Read buffer overflow Check whether index is within bounds before testing the element. In the last iteration i is PHY_MAX_ADDR. the condition `!(p = pd->mii.bus->phy_map[PHY_MAX_ADDR])' is undefined and may evaluate to false, which leads to a dereference of this invalid phy_map in the phy_connect() below. Signed-off-by: Roel Kluin Signed-off-by: David S. Miller commit 1b994b5a1b3cb5395598a08ef3bb0ac118d75c1b Author: roel kluin Date: Sat Aug 1 20:26:52 2009 +0000 tulip: Read buffer overflow Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin Signed-off-by: David S. Miller commit 144586301f6af5ae5943a002f030d8c626fa4fdd Author: Eric Dumazet Date: Tue Jul 28 02:36:15 2009 +0000 net: net_assign_generic() fix memcpy() should take into account size of pointers, not only number of pointers to copy. Signed-off-by: Eric Dumazet Acked-by: Pavel Emelyanov Signed-off-by: David S. Miller commit 446e72f30eca76d6f9a1a54adf84d2c6ba2831f8 Author: Eric Dumazet Date: Tue Jul 28 03:47:39 2009 +0000 pppol2tp: calls unregister_pernet_gen_device() at unload time Failure to call unregister_pernet_gen_device() can exhaust memory if module is loaded/unloaded many times. Signed-off-by: Eric Dumazet Acked-by: Cyrill Gorcunov Signed-off-by: David S. Miller commit a53a8b56827cc429c6d9f861ad558beeb5f6103f Author: Ben McKeegan Date: Tue Jul 28 07:43:57 2009 +0000 ppp: fix lost fragments in ppp_mp_explode() (resubmit) This patch fixes the corner cases where the sum of MTU of the free channels (adjusted for fragmentation overheads) is less than the MTU of PPP link. There are at least 3 situations where this case might arise: - some of the channels are busy - the multilink session is running in a degraded state (i.e. with less than its full complement of active channels) - by design, where multilink protocol is being used to artificially increase the effective link MTU of a single link. Without this patch, at most 1 fragment is ever sent per free channel for a given PPP frame and any remaining part of the PPP frame that does not fit into those fragments is silently discarded. This patch restores the original behaviour which was broken by commit 9c705260feea6ae329bc6b6d5f6d2ef0227eda0a 'ppp:ppp_mp_explode() redesign'. Once all 'free' channels have been given a fragment, an additional fragment is queued to each available channel in turn, as many times as necessary, until the entire PPP frame has been consumed. Signed-off-by: Ben McKeegan Signed-off-by: David S. Miller commit 3be4ee5199ba20475749d768bf29c8399c755a69 Merge: 95452a6 d0006f3 Author: Len Brown Date: Sun Aug 2 12:55:51 2009 -0400 Merge branch 'misc-2.6.31' into release commit 95452a6ce17244059e184fe5f722bff66a2b52bf Merge: a571a79 7334546 Author: Len Brown Date: Sun Aug 2 12:36:01 2009 -0400 Merge branch 'bugzilla-13825' into release commit 7334546a52c6764df120459509b1f803a073eacc Author: Alan Jenkins Date: Mon Jun 29 09:40:07 2009 +0100 eeepc-laptop: fix hot-unplug on resume OOPS on resume when the wireless adaptor is disabled during suspend was introduced by "eeepc-laptop: read rfkill soft-blocked state on resume". Unable to handle kernel NULL pointer dereference Process s2disk Tainted: G W IP: klist_put Call trace: ? klist_del ? device_del ? device_unregister ? pci_stop_dev ? pci_stop_bus ? pci_remove_device ? eeepc_rfkill_hotplug [eeepc_laptop] ? eeepc_hotk_resume [eeepc_laptop] ? acpi_device_resume ? device_resume ? hibernation_snapshot It appears the PCI device is removed twice. The eeepc_rfkill_hotplug() call from the resume handler is racing against the call from the ACPI notifier callback. The ACPI notification is triggered by the resume handler when it refreshes the value of CM_ASL_WLAN. The fix is to serialize hotplug calls using a workqueue. http://bugzilla.kernel.org/show_bug.cgi?id=13825 Signed-off-by: Alan Jenkins Acked-by: Corentin Chary Signed-off-by: Len Brown commit a571a79a7e6b614f26d6bcc25b2ad48fd63fb829 Merge: 6a61487 5d2619f Author: Len Brown Date: Sun Aug 2 12:27:26 2009 -0400 Merge branch 'memhotplug-crash' into release commit 5d2619fca753d270e63e76c9e18437b0d9bc8d75 Author: Zhao Yakui Date: Tue Jul 7 10:56:11 2009 +0800 ACPI: Ingore the memory block with zero block size in course of memory hotplug If the memory block size is zero, ignore it and don't do the memory hotplug flowchart. Otherwise it will complain the following warning message: >System RAM resource 0 - ffffffffffffffff cannot be added Signed-off-by: Zhao Yakui Signed-off-by: Len Brown commit aa7b2b2e973874df99a45b31adbed5978b46be1f Author: Zhao Yakui Date: Fri Jul 3 10:49:03 2009 +0800 ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver Don't treat the generic error as ACPI error code. Otherwise when the generic code is returned, it will complain the following warning messag: >ACPI Exception (acpi_memhotplug-0171): UNKNOWN_STATUS_CODE, Cannot get acpi bus device [20080609] >ACPI: Cannot find driver data > ACPI Error (utglobal-0127): Unknown exception code: 0xFFFFFFED [20080609] > Pid: 85, comm: kacpi_notify Not tainted 2.6.27.19-5-default #1 Call Trace: [] show_trace_log_lvl+0x41/0x58 [] dump_stack+0x69/0x6f ..... At the same time when the generic error code is returned, the ACPI_EXCEPTION is replaced by the printk. Signed-off-by: Zhao Yakui Signed-off-by: Len Brown commit 6a61487791a8b8f85542c51132e8c7ed9bc7fd0b Merge: f63440e 74b5820 Author: Len Brown Date: Sun Aug 2 12:10:02 2009 -0400 Merge branch 'bugzilla-13751' into release commit 74b5820808215f65b70b05a099d6d3c969b82689 Author: Bjorn Helgaas Date: Wed Jul 29 15:54:25 2009 -0600 ACPI: bind workqueues to CPU 0 to avoid SMI corruption On some machines, a software-initiated SMI causes corruption unless the SMI runs on CPU 0. An SMI can be initiated by any AML, but typically it's done in GPE-related methods that are run via workqueues, so we can avoid the known corruption cases by binding the workqueues to CPU 0. References: http://bugzilla.kernel.org/show_bug.cgi?id=13751 https://bugs.launchpad.net/bugs/157171 https://bugs.launchpad.net/bugs/157691 Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit f63440eff06265fc56e73044f8727b12641b33f1 Merge: 437f8c8 59fe4fe Author: Len Brown Date: Sun Aug 2 11:34:24 2009 -0400 Merge branch 'thinkpad' into release commit 437f8c8ab99e7b6eed8e0d6d9cf46085c8de2e36 Merge: b8a848e daed953 Author: Len Brown Date: Sun Aug 2 11:33:01 2009 -0400 Merge branch 'bugzilla-13865' into release commit b8a848ed7ffda36ed069f63de085a9411d2aa39f Merge: ed680c4 7cb7f45 Author: Len Brown Date: Sun Aug 2 11:31:32 2009 -0400 Merge branch 'bugzilla-13620-revert' into release commit d0006f3281c920fbfead0f5035c62ec8053f980a Author: Len Brown Date: Thu Jul 30 16:00:53 2009 -0400 ACPI: root-only read protection on /sys/firmware/acpi/tables/* they were world readable. Signed-off-by: Len Brown commit cae5a39f34d52c46ca49edfc3f297656a0fd60b7 Author: Helge Deller Date: Sun Aug 2 15:42:39 2009 +0200 parisc: hppb.c - fix printk format strings Fix those warnings: drivers/parisc/hppb.c: In function 'hppb_probe': drivers/parisc/hppb.c:65: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'resource_size_t' drivers/parisc/hppb.c:77: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'resource_size_t' drivers/parisc/hppb.c:77: warning: format '%08x' expects type 'unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Helge Deller commit c43962321e8af5309dd3ffcd78743c89581265e5 Author: Helge Deller Date: Sun Aug 2 15:35:43 2009 +0200 parisc: parisc-agp.c - use correct page_mask function Fix those compiler warnings, which indeed point to a bug: drivers/char/agp/parisc-agp.c:228: warning: initialization from incompatible pointer type drivers/char/agp/parisc-agp.c:201: warning: 'parisc_agp_page_mask_memory' defined but not used Signed-off-by: Helge Deller commit 1a1dba32412c15c51d5fc0b9efadd2ea310356d7 Author: Helge Deller Date: Sun Aug 2 15:26:51 2009 +0200 parisc: sticore.c - check return values Signed-off-by: Helge Deller commit 01a261e09a21e0ba342d3907a79cf5c78ee3f37a Author: Ryusuke Konishi Date: Sun Aug 2 17:45:55 2009 +0900 nilfs2: fix missing unlock in error path of nilfs_mdt_write_page This adds a missing unlock of nilfs->ns_writer_mutex in nilfs_mdt_write_page() function. Signed-off-by: Ryusuke Konishi commit 1e0deabd35f210f22c03cc734a0335c07ae71ff3 Author: Helge Deller Date: Sun Aug 2 15:17:37 2009 +0200 parisc: dino.c - check return value of pci_assign_resource() Signed-off-by: Helge Deller commit c6fe6b0783a8fd923d11dd0388cbd561ff15bdf1 Author: Helge Deller Date: Sun Aug 2 15:13:29 2009 +0200 parisc: hp_sdc_mlc.c - check return value of down_trylock() Signed-off-by: Helge Deller commit 07903af152b0597d94e9b0030746b63c4664e787 Author: Gregory Haskins Date: Thu Jul 30 10:57:28 2009 -0400 sched: Fix race in cpupri introduced by cpumask_var changes Background: Several race conditions in the scheduler have cropped up recently, which Steven and I have tracked down using ftrace. The most recent one turns out to be a race in how the scheduler determines a suitable migration target for RT tasks, introduced recently with commit: commit 68e74568fbe5854952355e942acca51f138096d9 Date: Tue Nov 25 02:35:13 2008 +1030 sched: convert struct cpupri_vec cpumask_var_t. The original design of cpupri allowed lockless readers to quickly determine a best-estimate target. Races between the pri_active bitmap and the vec->mask were handled in the original code because we would detect and return "0" when this occured. The design was predicated on the *effective* atomicity (*) of caching the result of cpus_and() between the cpus_allowed and the vec->mask. Commit 68e74568 changed the behavior such that vec->mask is accessed multiple times. This introduces a subtle race, the result of which means we can have a result that returns "1", but with an empty bitmap. *) yes, we know cpus_and() is not a locked operator across the entire composite array, but it is implicitly atomic on a per-word basis which is all the design required to work. Implementation: Rather than forgoing the lockless design, or reverting to a stack-based cpumask_t, we simply check for when the race has been encountered and continue processing in the event that the race is hit. This renders the removal race as if the priority bit had been atomically cleared as well, and allows the algorithm to execute correctly. Signed-off-by: Gregory Haskins CC: Rusty Russell CC: Steven Rostedt Signed-off-by: Peter Zijlstra LKML-Reference: <20090730145728.25226.92769.stgit@dev.haskins.net> Signed-off-by: Ingo Molnar commit e414314cce7539788dd5d2c35decad11782dd858 Author: Peter Zijlstra Date: Thu Jul 23 20:13:26 2009 +0200 sched: Fix latencytop and sleep profiling vs group scheduling The latencytop and sleep accounting code assumes that any scheduler entity represents a task, this is not so. Cc: Arjan van de Ven Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 59b9005692d4c8b5d73cfc41aa7229f47be163a9 Author: Arnaldo Carvalho de Melo Date: Sun Jul 26 19:06:19 2009 -0300 perf top: Add mwait_idle_with_hints to skip_symbols[] We skip the display of idle routine related symbols because they are typically rather erratic and confusing: they depend on the IRQ rate or sometimes they dominate the profile if they are polling based. Add mwait_idle_with_hints too, this is one of the idle routines on x86. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 9b30a26bf3d2c56dcb1c3afaca28b73fcd6ed405 Author: Stoyan Gaydarov Date: Thu Jul 30 05:25:29 2009 -0500 perf tools: Fix faulty check This patch fixes a spelling error that has resulted from copy and pasting. The location of the error was found using a semantic patch but the semantic patch was not trying to find these errors. After looking things over it seemed logical that this change was needed. Please review it and then include the patch if it is in fact the correct change. Signed-off-by: Stoyan Gaydarov Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <1248949529-20891-1-git-send-email-sgayda2@uiuc.edu> Signed-off-by: Ingo Molnar commit 27d028de64bd7e1f8e72bdeae6b0586939574fcb Author: Peter Zijlstra Date: Thu Jul 23 16:52:41 2009 +0200 perf report: Update for the new FORK/EXIT events Since FORK is now also issued for threads, detect those by comparing the parent and child PID. Teach it about EXIT events and ignore them. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit 9f498cc5be7e013d8d6e4c616980ed0ffc8680d2 Author: Peter Zijlstra Date: Thu Jul 23 14:46:33 2009 +0200 perf_counter: Full task tracing In order to be able to distinguish between no samples due to inactivity and no samples due to task ended, Arjan asked for PERF_EVENT_EXIT events. This is useful to the boot delay instrumentation (bootchart) app. This patch changes the PERF_EVENT_FORK to be emitted on every clone, and adds PERF_EVENT_EXIT to be emitted on task exit, after the task's counters have been closed. This task tracing is controlled through: attr.comm || attr.mmap and through the new attr.task field. Suggested-by: Arjan van de Ven Cc: Paul Mackerras Cc: Anton Blanchard Signed-off-by: Peter Zijlstra [ cleaned up perf_counter.h a bit ] Signed-off-by: Ingo Molnar commit e53c0994709166b111fbe9162d1a16ece7dfc45b Author: Peter Zijlstra Date: Fri Jul 24 14:42:10 2009 +0200 perf_counter: Collapse inherit on read() Currently the counter value returned by read() is the value of the parent counter, to which child counters are only fed back on child exit. Thus read() can return rather erratic (and meaningless) numbers depending on the state of the child processes. Change this by always iterating the full child hierarchy on read() and sum all counters. Suggested-by: Corey Ashford Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit 470a1396c25c27b4aff08b14d5c9cd9b3da15e09 Author: Peter Zijlstra Date: Wed Jul 29 10:50:09 2009 +0200 tracing, perf_counter: Add help text to CONFIG_EVENT_PROFILE Explain what tracepoint profiling sources are about. Signed-off-by: Peter Zijlstra Acked-by: Jeff Garzik LKML-Reference: <1248856508.6987.3041.camel@twins> Signed-off-by: Ingo Molnar commit b10ff54f9f58adfb708b53e6e56ed3d7804ade74 Author: Jaswinder Singh Rajput Date: Wed Jul 8 15:27:20 2009 +0000 parisc: includecheck fix for ccio-dma.c fix the following 'make includecheck' warning: drivers/parisc/ccio-dma.c: linux/proc_fs.h is included more than once. Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Helge Deller commit 2678251b207394aa8b9d92c653c05a8b3449f1f5 Author: John David Anglin Date: Mon Jul 13 01:44:37 2009 +0000 parisc: Set correct bit in protection flags Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 6b4dbcd86a9d464057fcc7abe4d0574093071fcc Author: Michael Buesch Date: Mon Jul 20 22:58:44 2009 +0000 parisc: isa-eeprom - Fix loff_t usage loff_t is a signed type. If userspace passes a negative ppos, the "count" range check is weakened. "count"s bigger than HPEE_MAX_LENGTH will pass the check. Also, if ppos is negative, the readb(eisa_eeprom_addr + *ppos) will poke in random memory. Signed-off-by: Michael Buesch Cc: stable@kernel.org Signed-off-by: Helge Deller commit 450d6e306b4717bfae11218a02648509baf04ce1 Author: Stoyan Gaydarov Date: Thu Jul 30 10:25:19 2009 +0000 parisc: fixed faulty check in lba_pci This patche fixes a spelling error that has resulted from copy and pasting. The location of the error was found using a semantic patch but the semantic patch was not trying to find these errors. After looking things over it seemed logical that this change was needed. Signed-off-by: Stoyan Gaydarov Signed-off-by: Helge Deller commit 447c233da4d109c6194fefd69e5185cbc93cc062 Author: Roel Kluin Date: Sun Aug 2 08:02:28 2009 +0000 parisc: Fix read buffer overflow in pdc_stable driver Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin Signed-off-by: Helge Deller commit b4f2e2ad5348063ef94aa623f6f09b52ecaf0990 Author: John David Anglin Date: Sun Aug 2 12:34:08 2009 +0200 parisc: Fix GOT overflow during module load on 64bit kernel Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 59fe4fe34d7afdf63208124f313be9056feaa2f4 Author: Henrique de Moraes Holschuh Date: Sat Aug 1 12:04:20 2009 -0300 thinkpad-acpi: fix incorrect use of TPACPI_BRGHT_MODE_ECNVRAM HBRV-based default selection of backlight control strategy didn't work well, at least the X41 defines it but doesn't use it and I don't think it will stop there. Switch to a white/blacklist. All models that have HBRV defined have been included in the list, and initially all ATI GPUs will get ECNVRAM, and the Intel GPUs will get UCMS_STEP. Symptoms of incorrect backlight mode selection are: 1. Non-working backlight control through sysfs; 2. Backlight gets reset to the lowest level at every shutdown, reboot and when thinkpad-acpi gets unloaded; This fixes a regression in 2.6.30, bugzilla #13826 Signed-off-by: Henrique de Moraes Holschuh Reported-by: Tobias Diedrich Cc: stable@kernel.org Signed-off-by: Len Brown commit 5b05d4696d38c3172e79e855cc1e2ed044589508 Author: Michael Buesch Date: Sat Aug 1 12:04:19 2009 -0300 thinkpad-acpi: restrict procfs count value to sane upper limit Signed-off-by: Michael Buesch Acked-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown commit 9b9d6b2434fe942895c341b9a982f158529788ec Author: Jeff Layton Date: Fri Jul 31 06:56:09 2009 -0400 cifs: reinstate original behavior when uid=/gid= options are specified This patch fixes the regression reported here: http://bugzilla.kernel.org/show_bug.cgi?id=13861 commit 4ae1507f6d266d0cc3dd36e474d83aad70fec9e4 changed the default behavior when the uid= or gid= option was specified for a mount. The existing behavior was to always clobber the ownership information provided by the server when these options were specified. The above commit changed this behavior so that these options simply provided defaults when the server did not provide this information (unless "forceuid" or "forcegid" were specified) This patch reverts this change so that the default behavior is restored. It also adds "noforceuid" and "noforcegid" options to make it so that ownership information from the server is preserved, even when the mount has uid= or gid= options specified. It also adds a couple of printk notices that pop up when forceuid or forcegid options are specified without a uid= or gid= option. Reported-by: Tom Chiverton Reviewed-by: Shirish Pargaonkar Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 1f6fc2de9525e34ee93bd392fa046369a8cfbf1e Author: Henrique de Moraes Holschuh Date: Sat Aug 1 12:04:18 2009 -0300 thinkpad-acpi: remove dock and bay subdrivers The standard ACPI dock driver can handle the hotplug bays and docks of the ThinkPads just fine (including batteries) as of 2.6.27, and the code in thinkpad-acpi for the dock and bay subdrivers is currently broken anyway... Userspace needs some love to support the two-stage ejection nicely, but it is simple enough to do through udev rules (you don't even need HAL) so this wouldn't justify fixing the dock and bay subdrivers, either. That leaves warm-swap bays (_EJ3) support for thinkpad-acpi, as well as support for the weird dock of the model 570, but since such support has never left the "experimental" stage, it is also not a strong enough reason to find a way to fix this code. Users of ThinkPads with warm-swap bays are urged to request that _EJ3 support be added to the regular ACPI dock driver, if such feature is indeed useful for them. Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown commit 550e7fd8afb7664ae7cedb398c407694e2bf7d3c Author: Henrique de Moraes Holschuh Date: Sat Aug 1 12:04:17 2009 -0300 thinkpad-acpi: disable broken bay and dock subdrivers Currently, the ThinkPad-ACPI bay and dock drivers are completely broken, and cause a NULL pointer derreference in kernel mode (and, therefore, an OOPS) when they try to issue events (i.e. on dock, undock, bay ejection, etc). OTOH, the standard ACPI dock driver can handle the hotplug bays and docks of the ThinkPads just fine (including batteries) as of 2.6.27. In fact, it does a much better job of it than thinkpad-acpi ever did. It is just not worth the hassle to find a way to fix this crap without breaking the (deprecated) thinkpad-acpi dock/bay ABI. This is old, deprecated code that sees little testing or use. As a quick fix suitable for -stable backports, mark the thinkpad-acpi bay and dock subdrivers as BROKEN in Kconfig. The dead code will be removed by a later patch. This fixes bugzilla #13669, and should be applied to 2.6.27 and later. Signed-off-by: Henrique de Moraes Holschuh Reported-by: Joerg Platte Cc: stable@kernel.org Signed-off-by: Len Brown commit 0dd8486b5cfe8048e0613334659d9252ecd1b08a Author: Linus Torvalds Date: Sat Aug 1 11:18:56 2009 -0700 do_sigaltstack: small cleanups The previous commit ("do_sigaltstack: avoid copying 'stack_t' as a structure to user space") fixed a real bug. This one just cleans up the copy from user space to that gcc can generate better code for it (and so that it looks the same as the later copy back to user space). Signed-off-by: Linus Torvalds commit 0083fc2c50e6c5127c2802ad323adf8143ab7856 Author: Linus Torvalds Date: Sat Aug 1 10:34:56 2009 -0700 do_sigaltstack: avoid copying 'stack_t' as a structure to user space Ulrich Drepper correctly points out that there is generally padding in the structure on 64-bit hosts, and that copying the structure from kernel to user space can leak information from the kernel stack in those padding bytes. Avoid the whole issue by just copying the three members one by one instead, which also means that the function also can avoid the need for a stack frame. This also happens to match how we copy the new structure from user space, so it all even makes sense. [ The obvious solution of adding a memset() generates horrid code, gcc does really stupid things. ] Reported-by: Ulrich Drepper Signed-off-by: Linus Torvalds commit a97778457f22181e8c38c4cd7d7e528378738a98 Author: Ryusuke Konishi Date: Tue Jul 28 17:55:29 2009 +0900 nilfs2: fix oops due to inconsistent state in page with discrete b-tree nodes Andrea Gelmini gave me a report that a kernel oops hit on a nilfs filesystem with a 1KB block size when doing rsync. This turned out to be caused by an inconsistency of dirty state between a page and its buffers storing b-tree node blocks. If the page had multiple buffers split over multiple logs, and if the logs were written at a time, a dirty flag remained in the page even every dirty flag in the buffers was cleared. This will fix the failure by dropping the dirty flag properly for pages with the discrete multiple b-tree nodes. Reported-by: Andrea Gelmini Signed-off-by: Ryusuke Konishi Tested-by: Andrea Gelmini Cc: stable@kernel.org commit 2d1b6949d2c855f195de0f5146625015ecca3944 Author: Ingo Molnar Date: Sat Aug 1 13:15:36 2009 +0200 perf_counter tools: Fix link errors with older toolchains On older distros (F8 for example) the perf build could fail with such missing symbols: LINK perf /usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/libbfd.a(bfd.o): In function `bfd_demangle': (.text+0x2b3): undefined reference to `cplus_demangle' /usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/libbfd.a(bfd.o): In function `bfd_demangle': Link in -liberty too. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: Signed-off-by: Ingo Molnar commit 7e5f5fb09e6fc657f21816b5a18ba645a913368e Author: Martin K. Petersen Date: Fri Jul 31 11:49:13 2009 -0400 block: Update topology documentation Update topology comments and sysfs documentation based upon discussions with Neil Brown. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 70dd5bf3b99964d52862ad2810c24cc32a553535 Author: Martin K. Petersen Date: Fri Jul 31 11:49:12 2009 -0400 block: Stack optimal I/O size When stacking block devices ensure that optimal I/O size is scaled accordingly. Signed-off-by: Martin K. Petersen Reviewed-by: Mike Snitzer Signed-off-by: Jens Axboe commit 7c958e32649e0c35801762878fb0b6da8c55a515 Author: Martin K. Petersen Date: Fri Jul 31 11:49:11 2009 -0400 block: Add a wrapper for setting minimum request size without a queue Introduce blk_limits_io_min() and make blk_queue_io_min() call it. Signed-off-by: Mike Snitzer Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit fef246672b009cf3f7a74e2fc9a76932ef2eeed2 Author: Martin K. Petersen Date: Fri Jul 31 11:49:10 2009 -0400 block: Make blk_queue_stack_limits use the new stacking interface blk_queue_stack_limits() has been superceded by blk_stack_limits() and disk_stack_limits(). Wrap the function call for now, we'll deprecate it later. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 95fc17aac45300f45968aacd97a536ddd8db8101 Author: Dan Williams Date: Fri Jul 31 12:39:15 2009 +1000 md/raid6: release spare page at ->stop() Add missing call to safe_put_page from stop() by unifying open coded raid5_conf_t de-allocation under free_conf(). Cc: Signed-off-by: Dan Williams Signed-off-by: NeilBrown commit 0a924578bc4a2823a95c151f56975c71f5c156bb Author: Peter P Waskiewicz Jr Date: Thu Jul 30 12:26:00 2009 +0000 ixgbe: Fix RSC completion delay causing Rx interrupts to stop When a user disables interrupt throttling with ethtool on 82599 devices, the interrupt timer may not be re-enabled if hardware RSC is running. The RSC completions in hardware don't complete before the next ITR event tries to fire, so the ITR timer never gets re-armed. This patch increases the amount of time between interrupts when throttling is disabled (rx-usecs = 0) when the hardware RSC deature is enabled. Signed-off-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 0c19d6af9253f19b41821c29b9c49c2214f19425 Author: Peter P Waskiewicz Jr Date: Thu Jul 30 12:25:28 2009 +0000 ixgbe: Fix usage of second flags bitmap when using LRO/RSC A second set of feature flag bits was added, and the hardware RSC engine flags were moved there. However, the code itself didn't make the move completely to use the new bitmap. Signed-off-by: Peter P Waskiewicz Jr Acked-by: Mallikarjuna R Chilakala Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 8f9a71673d9f397a365f4d18c307e91141b8fe92 Author: Peter P Waskiewicz Jr Date: Thu Jul 30 12:25:09 2009 +0000 ixgbe: Fix netpoll to be properly multiqueue aware Our ndo_poll_controller callback is broken for anything but non-multiqueue setups. This fixes that issue. Signed-off-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit bdc6340f4eb68295b1e7c0ade2356b56dca93d93 Author: Pallipadi, Venkatesh Date: Thu Jul 30 14:43:19 2009 -0700 x86, pat: Fix set_memory_wc related corruption Changeset 3869c4aa18835c8c61b44bd0f3ace36e9d3b5bd0 that went in after 2.6.30-rc1 was a seemingly small change to _set_memory_wc() to make it complaint with SDM requirements. But, introduced a nasty bug, which can result in crash and/or strange corruptions when set_memory_wc is used. One such crash reported here http://lkml.org/lkml/2009/7/30/94 Actually, that changeset introduced two bugs. * change_page_attr_set() takes &addr as first argument and can the addr value might have changed on return, even for single page change_page_attr_set() call. That will make the second change_page_attr_set() in this routine operate on unrelated addr, that can eventually cause strange corruptions and bad page state crash. * The second change_page_attr_set() call, before setting _PAGE_CACHE_WC, should clear the earlier _PAGE_CACHE_UC_MINUS, as otherwise cache attribute will not be WC (will be UC instead). The patch below fixes both these problems. Sending a single patch to fix both the problems, as the change is to the same line of code. The change to have a addr_copy is not very clean. But, it is simpler than making more changes through various routines in pageattr.c. A huge thanks to Jerome for reporting this problem and providing a simple test case that helped us root cause the problem. Reported-by: Jerome Glisse Signed-off-by: Venkatesh Pallipadi Signed-off-by: Suresh Siddha LKML-Reference: <20090730214319.GA1889@linux-os.sc.intel.com> Acked-by: Dave Airlie Signed-off-by: H. Peter Anvin commit accff95c2500c7bce671c1f722de6f8810fe550d Author: Jiajun Wu Date: Thu Jul 30 14:20:42 2009 -0700 gianfar: fix coalescing setup in ethtool support Parameter order for using mk_ic_value(count, time) was reversed, the patch fixes this. Signed-off-by: Jiajun Wu Signed-off-by: Li Yang Signed-off-by: David S. Miller commit 72fc939789dbe7ca091b50b686d45ac0df15417a Author: Eric Dumazet Date: Tue Jul 28 23:43:08 2009 +0000 pppoe: fix /proc/net/pppoe If a socket is hashed in last slot of pppoe hash table (PPPOE_HASH_SIZE-1) we report it many times (up to filling seq buffer) (Only the last socket of last slot) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit daed953721850381673687c59f3a0df553eb6626 Author: Frans Pop Date: Thu Jul 30 17:16:05 2009 -0400 hp-wmi: check that an input device exists in resume handler Some systems may not support input events, or registering the input handler may have failed. So check that an input device exists before trying to set the docking and tablet mode state during resume. Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865 Reported-and-tested-by: Cédric Godin Signed-off-by: Frans Pop Acked-by: Matthew Garrett Signed-off-by: Len Brown commit f0c5b35c6c93c89a9d8ccab19b0b4842f5dfddc5 Author: roel kluin Date: Wed Jul 29 03:18:56 2009 +0000 eexpress: Read buffer overflow start_code is 69 words, but the code always writes a multiple of 16 words, so the last 11 words written are outside the array. Signed-off-by: Roel Kluin Signed-off-by: David S. Miller commit a3e8ee682003685b8b9c98c89340a42e48c3e813 Author: roel kluin Date: Wed Jul 29 23:46:59 2009 +0000 ipv4: ARP neigh procfs buffer overflow If arp_format_neigh_entry() can be called with n->dev->addr_len == 0, then a write to hbuffer[-1] occurs. Signed-off-by: Roel Kluin Signed-off-by: David S. Miller commit 3d54015b750e5d5e950a1dcee2735387fd4b6e1a Author: roel kluin Date: Thu Jul 30 00:26:32 2009 +0000 3c515: Write outside array bounds if dev_alloc_skb() fails on the first iteration, a write to cp->rx_ring[-1] occurs. Signed-off-by: Roel Kluin Signed-off-by: David S. Miller commit 2a8aaacda5097fa92a39948da1b4c6614b6e150e Author: Tobias Klauser Date: Thu Jul 30 13:10:50 2009 -0700 docbook: fix printk of ip address Use the %pI4 format string instead of %d.%d.%d.%d and NIPQUAD. Signed-off-by: Tobias Klauser Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller commit a541f8401d8e9113a89ee902cb8d8e412d6d3569 Author: Michael Chan Date: Wed Jul 29 08:49:52 2009 +0000 iscsi: Use GFP_ATOMIC in iscsi_offload_mesg(). Changing to GFP_ATOMIC because the only caller in cnic/bnx2i may be calling this function while holding spin_lock. This problem was discovered by Mike Christie. Signed-off-by: Michael Chan Acked-by: Mike Christie Signed-off-by: David S. Miller commit ca7daea612b480ecf0fc5bd1630b88447fe73fc5 Author: Julia Lawall Date: Thu Jul 30 04:38:19 2009 +0000 net/netlabel: Add kmalloc NULL tests The test on map4 should be a test on map6. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression *x; identifier f; constant char *C; @@ x = \(kmalloc\|kcalloc\|kzalloc\)(...); ... when != x == NULL when != x != NULL when != (x || ...) ( kfree(x) | f(...,C,...,x,...) | *f(...,x,...) | *x->f ) // Signed-off-by: Julia Lawall Acked-by: Paul Moore Signed-off-by: David S. Miller commit a1b97440eec0ea3e53183cde8fe82ff8c1ffb091 Merge: 27fed41 89c3a8a Author: David S. Miller Date: Thu Jul 30 10:35:45 2009 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 commit ffd4bc2a984fab40ed969163efdff321490e8032 Author: Martin K. Petersen Date: Wed Jul 29 14:06:53 2009 -0400 [SCSI] sd: Avoid sending extended inquiry to legacy devices Some USB devices crash when we send them an inquiry with the EVPD bit set, regardless of page requested (i.e. including page 0). We only need the extended inquiry to gain access to VPD pages 0xB0 and 0xB1. These appeared in SBC2 and SBC3 respectively, so we can restrict sending the extended inquiry to devices reporting SPC3 or higher. This fixes bugzilla.kernel.org #13657. Signed-off-by: Martin K. Petersen [jejb: added comment] Signed-off-by: James Bottomley commit 19252de6818ced0def0551d64a0a2975f52a523d Author: Tom Peng Date: Fri Jul 17 16:02:04 2009 +0800 [SCSI] libsas: fix wide port hotplug issues Hotplug of phys which form wide ports simply does not work at the moment. Fix this by adding checks at the hotplug points to see if the attached sas address of the phy already exists (in which case it's part of a wide port) and act accordingly. Signed-off-by: Tom Peng Signed-off-by: Jack Wang Signed-off-by: Lindar Liu Signed-off-by: Kevin Ao [jejb: tidied up coding, fixed an error case and made TRUE/FALSE lower case to fix a ppc64 compile error in linux-next] Signed-off-by: James Bottomley commit a0cc1ecc098e31d03b3265712a3e280a7fabf438 Author: Vasu Dev Date: Tue Jul 28 17:33:37 2009 -0700 [SCSI] libfc: fix a circular locking warning during sending RRQ Currently the fc_exch_rrq is called with fc_exch's ex_lock held. The fc_exch_rrq allocates new exch and that requires taking ex_lock again after EM lock. This locking order causes warning, see more details on this warning at :- http://www.open-fcoe.org/pipermail/devel/2009-July/003251.html This patch fixes this by dropping the ex_lock before calling fc_exch_rrq(). The fc_exch_rrq needs to grab ex_lock lock again to schedule RRQ retry and in the meanwhile fc_exch_reset could occur before ex_lock is grabbed inside fc_exch_rrq. So to handle this case, this patch adds additional check to detect fc_exch_reset after ex_lock acquired and in case the fc_exch_reset occurred then abandons the RRQ retry and releases the exch. Signed-off-by: Vasu Dev Signed-off-by: Robert Love Signed-off-by: James Bottomley commit 16ed55f9de6743ceece9bf528362cadff10f1c5c Author: Karen Higgins Date: Wed Jul 15 15:03:02 2009 -0500 [SCSI] qla4xxx: Remove hiwat code so scsi eh does not get escalated when we can make progress Removed unnecessary hiwat code to free up the number available IOCBs. Eliminates unnecessary eh_ escalations due to inability to obtain IOCB pkt for marker. v2. - Remove define not used anymore and fix req_q_coun accounting. Signed-off-by: Karen Higgins [michaelc: ported patch from qlogic.com driver to upstream] Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 612f73488785829d4f34aad00bfe30b904c94c9e Author: Karen Higgins Date: Wed Jul 15 15:03:01 2009 -0500 [SCSI] qla4xxx: Fix srb lookup in qla4xxx_eh_device_reset eh_device_reset may be called from scsi error handler or sg_reset, etc. When called from sg_reset, there will not be an associated srb. The driver should lookup the corresponding device handle given information from the supplied cmd structure and should not assume that there exists an srb. Signed-off-by: Karen Higgins Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit dca05c4c07c48da0509708d9e562578d269e90e5 Author: Karen Higgins Date: Wed Jul 15 15:03:00 2009 -0500 [SCSI] qla4xxx: Fix Driver Fault Recovery Completion Fixed driver bug where adapter recovery did not complete if there were outstanding commands detected on that host adapter. Signed-off-by: Karen Higgins Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 5c656af7e4edfe44c85034d6fa7002909f9c3c59 Author: Mike Christie Date: Wed Jul 15 15:02:59 2009 -0500 [SCSI] qla4xxx: add timeout handler Recently dm-multipath began calling blk_abort_queue. This causes all the commands/request running on the path to have the timeout function called. If a path does go down, and the LLD returns DID_*, dm-multpiath will eventually get this error and begin to call the cmd timeout handler. qla4xxx currently does not set a timed out handler and so the default one could return BLK_EH_NOT_HANDLED and end up firing the scsi eh and stopping IO to all paths on the host when only one path is affected. For software and offload iscsi we have a timed out handler already. This patch adds a driver specific one to qla4xxx because there are some ddb->state and session->state and command completion races that are better handled in the LLD. This also handles the problem where if the session is down, we do not need the scsi eh to run until the transport code has tried to reconnect us. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 94bced3c1b371014cbd187f2df5539b13a0e3b90 Author: Karen Higgins Date: Wed Jul 15 15:02:58 2009 -0500 [SCSI] qla4xxx: Correct Extended Sense Data Errors Fixed sense data errors occurring above the first 32 bytes, as required by some third party applications. Sense data in the first 32 bytes has always been correct. Patch updated to use srb data variables instead of scsi command scratchpad data area, as scratchpad area is already used. Also, corrected debug print alignment bug in dump_buffer routine. Changed KERN_DEBUG to KERN_INFO in printk statements in this routine. Changed version number to 5.01.00-k9 Signed-off-by: Karen Higgins [michaelc: fixed checkpath.pl errors] Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 6187c242089d334102be76427a5a020240e6c19a Author: Mike Christie Date: Wed Jul 15 15:02:57 2009 -0500 [SCSI] libiscsi: disable bh in and abort handler. The session lock can be held in the scsi eh thread or the completion paths run from the net softirq. This disables bhs in iscsi_eh_abort when taking the session lock. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit a11a52be115889a5d1f738ed2e154807bceed4ee Author: Christof Schmitt Date: Mon Jul 13 15:06:14 2009 +0200 [SCSI] zfcp: Fix tracing of request id for abort requests The trace record for SCSI abort requests has a field for the request id of the request to be aborted. Put the real request id instead of zero. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 27f492ccec94b6acd8440c83bfe0515ce4db0af0 Author: Swen Schillig Date: Mon Jul 13 15:06:13 2009 +0200 [SCSI] zfcp: Fix wka port processing Under certain conditions it is possible that a WKA port ist not opened within the expected timeframe of half a second. In this situation the WKA port remains in the state OPENING preventing any succeding request to open the port. This led to unrecoverable remote ports. Fixing this by always setting an appropriate WKA port status before leaving the function and removing the timeout value here since it's not needed here because the general timeout processing would deal with it if required. Signed-off-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 17a093ef018481ee1760da19568bad3c11da395d Author: Swen Schillig Date: Mon Jul 13 15:06:12 2009 +0200 [SCSI] zfcp: avoid double notify in lowmem scenario In a LOWMEM condition an ERP notification would have been sent twice causing an unpredictable behaviour of the ERP. Signed-off-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 379d6bf6573ee6541a38bbe9140c1f0b94e3feae Author: Christof Schmitt Date: Mon Jul 13 15:06:11 2009 +0200 [SCSI] zfcp: Add port only once to FC transport class When calling fc_remote_port_add make sure to not call it again before fc_remote_port_delete has been called. In other words, ensure to create a new fc_rport, then delete it, then create a new one again. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit cbf1ed0264da104573458aedc220ebfcd02567f6 Author: Christof Schmitt Date: Mon Jul 13 15:06:10 2009 +0200 [SCSI] zfcp: Recover from stalled outbound queue Depending on interruptions on some storage systems, the complete channel can stall which looks like an outbound queue stall to Linux. When trying to acquire a free SBAL for a non-SCSI command, zfcp waits for 5 seconds for a free slot to appear. This is the right place to detect a queue stall: If the wait times out, we assume a stalled queue and try to recover this. The overall strategy should be to trigger the erp from specific events, and not try an overall escalation from one failed port to a full-blown queue recovery. If we manage to send a command, the status codes for this command or a timeout will trigger the right follow-on actions. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 85600f7f8370fe5b4be0debd8b401de7986b52ae Author: Christof Schmitt Date: Mon Jul 13 15:06:09 2009 +0200 [SCSI] zfcp: Fix erp escalation procedure If an action fails, retry it until the erp count exceeds the threshold. If there is something fundamentally wrong, the FSF layer will trigger a more appropriate action depending on the FSF status codes. The followup for successful actions is a different followup than retrying failed actions, so split the code two functions to make this clear. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit ddb3e0c111fed0a8bf74884dc918274acec2b618 Author: Christof Schmitt Date: Mon Jul 13 15:06:08 2009 +0200 [SCSI] zfcp: Fix logic for physical port close After closing the port, we want it to be "not open" to consider the action to be successful. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 9072df4dc6e8fd569d583815edb0198af4b688b8 Author: Christof Schmitt Date: Mon Jul 13 15:06:07 2009 +0200 [SCSI] zfcp: Use -EIO for SBAL allocation failures -ENOMEM is for memory allocation problems, -EIO for queue/SBAL allocation problems. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 426f6059b0eb66cec139f4b9066168ab72b85774 Author: Christof Schmitt Date: Mon Jul 13 15:06:06 2009 +0200 [SCSI] zfcp: Use unchained mode for small ct and els requests The ELS ADISC and the GID_PN requests sent from zfcp fit into unchained FSF requests. Change the FSF allocation logic to use unchained requests whenever possible where everything fits in one SBAL. This avoids acquiring more SBALs than necessary, especially during zfcp recovery when things might be stalled. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 688a1820bde27749f22b18b94ef1c9bc179b1b29 Author: Christof Schmitt Date: Mon Jul 13 15:06:05 2009 +0200 [SCSI] zfcp: Use correct flags for zfcp_erp_notify zfcp_erp_notify uses the ZFCP_ERP_STATUS_* flags, so it is ZFCP_STATUS_ERP_LOWMEM instead of ZFCP_ERP_NOMEM. Signalling ZFCP_ERP_FAILED is not necessary, the missing d_id will show that the nameserver did not return the d_id. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 1e9b16430ff4fd09408a74342d6b8338228e2f70 Author: Christof Schmitt Date: Mon Jul 13 15:06:04 2009 +0200 [SCSI] zfcp: Return -ENOMEM for allocation failures in zfcp_fsf When a fsf_req or a qtcb cannot be allocated return -ENOMEM instead of -EIO. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit acf7b86150701de105aa8307b4b3f9dc533c45bb Author: Christof Schmitt Date: Mon Jul 13 15:06:03 2009 +0200 [SCSI] zfcp: Acquire qdio_stat_lock when reading the queue utilization req_q_util is not atomic, so the qdio_stat_lock must be held when reading this variable. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit dfb3cf00e402686f671db697adbd8b9f4c219268 Author: Swen Schillig Date: Mon Jul 13 15:06:02 2009 +0200 [SCSI] zfcp: Fix invalid command order We should not modify the port status after triggering an ERP action for the port. It is not guaranteed which status is finally active when the ERP action is performed. This can lead to situations which are unwanted and hard to debug in case of a failure. Signed-off-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 5bd9052d79daa4c8beb45436c408b6de672adb82 Author: Steve French Date: Thu Jul 30 02:26:14 2009 +0000 [CIFS] Updates fs/cifs/CHANGES Signed-off-by: Steve French commit 89c3a8aca28e6d57f2ae945d97858a372d624b81 Author: Johannes Berg Date: Tue Jul 28 18:10:17 2009 +0200 mac80211: fix suspend Jan reported that his b43-based laptop hangs during suspend. The problem turned out to be mac80211 asking the driver to stop the hardware before removing interfaces, and interface removal caused b43 to touch the hardware (while down, which causes the hang). This patch fixes mac80211 to do reorder these operations to have them in the correct order -- first remove interfaces and then stop the hardware. Some more code is necessary to be able to do so in a race-free manner, in particular it is necessary to not process frames received during quiescing. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13337. Reported-by: Jan Scholz Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit 57921c312e8cef72ba35a4cfe870b376da0b1b87 Author: Roel Kluin Date: Tue Jul 28 12:05:00 2009 +0200 libertas: Read buffer overflow Several arrays were read before checking whether the index was within bounds. ARRAY_SIZE() should be used to determine the size of arrays. rates->rates has an arraysize of 1, so calling get_common_rates() with a rates_size of MAX_RATES (14) was causing reads out of bounds. tmp_size can increment at most to (ARRAY_SIZE(lbs_bg_rates) - 1) * (*rates_size - 1), so that should be the number of elements of tmp[]. A goto can be eliminated: ret was already set upon its declaration. Signed-off-by: Roel Kluin Signed-off-by: John W. Linville commit 430453fc2a5f3f2c1d98ebc3c3d4c54f3060e3c3 Author: Roel Kluin Date: Tue Jul 28 09:59:47 2009 +0200 libertas: Read outside array bounds reads bss->rates[j] before checking bounds of index, and should use ARRAY_SIZE to determine the size of the array. Signed-off-by: Roel Kluin Acked-by: Holger Schurig Acked-by: Dan Williams Signed-off-by: John W. Linville commit 74e7ff8c50b6b022e6ffaa736b16a4dc161d3eaf Author: Lai Jiangshan Date: Tue Jul 28 20:17:22 2009 +0800 tracing: Fix missing function_graph events when we splice_read from trace_pipe About a half events are missing when we splice_read from trace_pipe. They are unexpectedly consumed because we ignore the TRACE_TYPE_NO_CONSUME return value used by the function graph tracer when it needs to consume the events by itself to walk on the ring buffer. The same problem appears with ftrace_dump() Example of an output before this patch: 1) | ktime_get_real() { 1) 2.846 us | read_hpet(); 1) 4.558 us | } 1) 6.195 us | } After this patch: 0) | ktime_get_real() { 0) | getnstimeofday() { 0) 1.960 us | read_hpet(); 0) 3.597 us | } 0) 5.196 us | } The fix also applies on 2.6.30 Signed-off-by: Lai Jiangshan Cc: Steven Rostedt Cc: stable@kernel.org LKML-Reference: <4A6EEC52.90704@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker commit 38ceb592fcac9110c6b3c87ea0a27bff68c43486 Author: Lai Jiangshan Date: Tue Jul 28 20:11:24 2009 +0800 tracing: Fix invalid function_graph entry When print_graph_entry() computes a function call entry event, it needs to also check the next entry to guess if it matches the return event of the current function entry. In order to look at this next event, it needs to consume the current entry before going ahead in the ring buffer. However, if the current event that gets consumed is the last one in the ring buffer head page, the ring_buffer may reuse the page for writers. The consumed entry will then become invalid because of possible racy overwriting. Me must then handle this entry by making a copy of it. The fix also applies on 2.6.30 Signed-off-by: Lai Jiangshan Cc: Steven Rostedt Cc: stable@kernel.org LKML-Reference: <4A6EEAEC.3050508@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker commit 27fed4175acf81ddd91d9a4ee2fd298981f60295 Author: Stephen Hemminger Date: Mon Jul 27 18:39:45 2009 -0700 ip: fix logic of reverse path filter sysctl Even though reverse path filter was changed from simple boolean to trinary control, the loose mode only works if both all and device are configured because of this logic error. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 7b91e2661addd8e2419cb45f6a322aa5dab9bcee Author: Jeff Layton Date: Thu Jul 23 15:22:30 2009 -0400 cifs: fix error handling in mount-time DFS referral chasing code If the referral is malformed or the hostname can't be resolved, then the current code generates an oops. Fix it to handle these errors gracefully. Reported-by: Sandro Mathys Acked-by: Igor Mammedov CC: Stable Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 7cb7f45c7feef43c8f71f5cfedfc0b19be2142f7 Author: Len Brown Date: Mon Jul 27 18:42:38 2009 -0400 Revert "ACPICA: Remove obsolete acpi_os_validate_address interface" This reverts commit f9ca058430333c9a24c5ca926aa445125f88df18. which caused a regression: http://bugzilla.kernel.org/show_bug.cgi?id=13620 Signed-off-by: Lin Ming Signed-off-by: Len Brown commit 0e83815be719d3391bf5ea24b7fe696c07dbd417 Author: Robert Richter Date: Mon Jul 27 19:43:52 2009 +0200 x86: fix section mismatch for i386 init code Startup code for i386 in arch/x86/kernel/head_32.S is using the reference variable initial_code that is located in the .cpuinit.data section. If CONFIG_HOTPLUG_CPU is enabled, startup code is not in an init section and can be called later too. In this case the reference initial_code must be kept too. This patch fixes this. See below for the section mismatch warning. WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel() The variable __cpuinitdata initial_code references a function __init i386_start_kernel(). If i386_start_kernel is only used by initial_code then annotate i386_start_kernel with a matching annotation. Signed-off-by: Robert Richter LKML-Reference: <1248716632-26844-1-git-send-email-robert.richter@amd.com> Signed-off-by: H. Peter Anvin commit 78f1a8b758d57c2d2c9f3db7199cd30803854c82 Author: Luis R. Rodriguez Date: Mon Jul 27 08:38:25 2009 -0700 mac80211: do not queue work after suspend in the dynamic ps timer Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit 082e708acc50a5b625b9bde0bb1af90dfdbd1942 Author: Roel Kluin Date: Sat Jul 25 23:34:31 2009 +0200 iwlwifi: Read outside array bounds tid is bounded (above) by the size of default_tid_to_tx_fifo (17 elements), but the size of priv->stations[].tid[] is MAX_TID_COUNT (9) elements. Signed-off-by: Roel Kluin Signed-off-by: John W. Linville commit 008749fc9917b799c469478141ddd1a4c81d06ca Author: Roel Kluin Date: Sat Jul 25 23:21:22 2009 +0200 ath9k: Read outside array bounds Incorrect limits leads to reads outside array bounds. Signed-off-by: Roel Kluin Acked-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit 3d0ccd021b23c18ea2d399fe4a43c955485c765c Author: Roel Kluin Date: Sat Jul 25 23:02:32 2009 +0200 airo: Buffer overflow SSID_rid has space for only 3 ssids. txPowerLevels[i] is read before the bounds check for i Signed-off-by: Roel Kluin Acked-by: Dan Williams Signed-off-by: John W. Linville commit 2a21f86917f7a9fe13b180e895a816871a234dee Author: Dan Carpenter Date: Sat Jul 25 15:22:59 2009 +0300 wireless: ERR_PTR vs null iwm_wdev_alloc() returns an ERR_PTR on failure and not null. It also prints its own dev_err() message so I removed that as well. Compile tested only. Sorry. Found by smatch (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter Acked-by: Zhu Yi Signed-off-by: John W. Linville commit 45f5fa32b130b2a59f9b726be45ce7fa73fb834c Author: reinette chatre Date: Tue Jul 21 09:29:07 2009 -0700 iwlagn: fix minimum number of queues setting We need to provide a reasonable minimum that will result in a working setup if used. Set minimum to be 10 to provide for 4 standard TX queues + 1 command queue + 2 (unused) HCCA queues + 4 HT queues (one per AC). We allow the user to change the number of queues used via a module parameter and use this minimum value to check if it is valid. Without this patch a user can select a value for the number of queues that will result in a failing setup. Signed-off-by: Reinette Chatre Reviewed-by: Tomas Winkler Acked-by: Tomas Winkler Signed-off-by: John W. Linville commit 3995bd9332a51b626237d6671cfeb7235e6c1305 Author: Johannes Berg Date: Fri Jul 24 11:13:14 2009 -0700 iwlwifi: fix TX queue race I had a problem on 4965 hardware (well, probably other hardware too, but others don't survive my stress testing right now, unfortunately) where the driver was sending invalid commands to the device, but no such thing could be seen from the driver's point of view. I could reproduce this fairly easily by sending multiple TCP streams with iperf on different TIDs, though sometimes a single iperf stream was sufficient. It even happened with a single core, but I have forced preemption turned on. The culprit was a queue overrun, where we advanced the queue's write pointer over the read pointer. After careful analysis I've come to the conclusion that the cause is a race condition between iwlwifi and mac80211. mac80211, of course, checks whether the queue is stopped, before transmitting a frame. This effectively looks like this: lock(queues) if (stopped(queue)) { unlock(queues) return busy; } unlock(queues) ... <-- this place will be important there is some more code here drv_tx(frame) The driver, on the other hand, can stop and start queues, which does lock(queues) mark_running/stopped(queue) unlock(queues) [if marked running: wake up tasklet to send pending frames] Now, however, once the driver starts the queue, mac80211 can see that and end up at the marked place above, at which point for some reason the driver seems to stop the queue again (I don't understand that) and then we end up transmitting while the queue is actually full. Now, this shouldn't actually matter much, but for some reason I've seen it happen multiple times in a row and the queue actually overflows, at which point the queue bites itself in the tail and things go completely wrong. This patch fixes this by just dropping the packet should this have happened, and making the lock in iwlwifi cover everything so iwlwifi can't race against itself (dropping the lock there might make it more likely, but it did seem to happen without that too). Since we can't hold the lock across drv_tx() above, I see no way to fix this in mac80211, but I also don't understand why I haven't seen this before -- maybe I just never stress tested it this badly. With this patch, the device has survived many minutes of simultanously sending two iperf streams on different TIDs with combined throughput of about 60 Mbps. Signed-off-by: Johannes Berg Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit bdff78707f3ce47e891f3201c9666122a70556ce Author: Thomas Gleixner Date: Fri Jul 24 15:30:45 2009 -0400 trace: stop tracer in oops_enter() If trace_printk_on_oops is set we lose interesting trace information when the tracer is enabled across oops handling and printing. We want the trace which might give us information _WHY_ we oopsed. Signed-off-by: Thomas Gleixner Signed-off-by: Steven Rostedt commit bd171d5ffc5cb2ba471e8205c679ee9d12b90116 Author: Matt Fleming Date: Thu Jul 23 17:16:15 2009 +0100 ftrace: Only update $offset when we update $ref_func The value of $offset should be the offset of $ref_func from the beginning of the object file. Therefore, we should set both variables together. This fixes a bug I was hitting on sh where $offset (which is used to calcualte the addends for the __mcount_loc entries) was being set multiple times and didn't correspond to $ref_func's offset in the object file. The addends in __mcount_loc were calculated incorrectly, resulting in ftrace dynamically modifying addresses that weren't mcount call sites. Signed-off-by: Matt Fleming LKML-Reference: <1248365775-25196-2-git-send-email-matt@console-pimps.org> Signed-off-by: Steven Rostedt commit fc4c73554c9d93b3e495f2f7acae1323b0d5db84 Author: Matt Fleming Date: Thu Jul 23 17:16:14 2009 +0100 ftrace: Fix the conditional that updates $ref_func Fix the conditional that checks if we already have a $ref_func and that the new function is weak. The code as previously checking whether either condition was false, and we really need to only update $ref_func is both cconditions are false. Signed-off-by: Matt Fleming LKML-Reference: <1248365775-25196-1-git-send-email-matt@console-pimps.org> Signed-off-by: Steven Rostedt commit 8650ae32ef7045e763825dee6256dde7f331bb85 Author: Steven Rostedt Date: Wed Jul 22 23:29:30 2009 -0400 tracing: only truncate ftrace files when O_TRUNC is set The current code will truncate the ftrace files contents if O_APPEND is not set and the file is opened in write mode. This is incorrect. It should only truncate the file if O_TRUNC is set. Otherwise if one of these files is opened by a C program with fopen "r+", it will incorrectly truncate the file. Reported-by: Jiri Olsa Signed-off-by: Steven Rostedt commit 4c739ff043e5787d97c9691d62cabf7a29e75a9d Author: Steven Rostedt Date: Wed Jul 22 23:11:03 2009 -0400 tracing: show proper address for trace-printk format Since the trace_printk may use pointers to the format fields in the buffer, they are exported via debugfs/tracing/printk_formats. This is used by utilities that read the ring buffer in binary format. It helps the utilities map the address of the format in the binary buffer to what the printf format looks like. Unfortunately, the way the output code works, it exports the address of the pointer to the format address, and not the format address itself. This makes the file totally useless in trying to figure out what format string a binary address belongs to. Signed-off-by: Steven Rostedt commit 5381837f125cc62ad703fbcdfcd7566fc81fd404 Author: Tom Peng Date: Wed Jul 1 20:37:26 2009 +0800 [SCSI] libsas: reuse the original port when hotplugging phys in wide ports There's a hotplug problem in the way libsas allocates ports: it loops over the available ports first trying to add to an existing for a wide port and otherwise allocating the next free port. This scheme only works if the port array is packed from zero, which fails if a port gets hot unplugged and the array becomes sparse. In that case, a new port is formed even if there's a wide port it should be part of. Fix this by creating two loops over all the ports: the first to see if the phy should be part of a wide port and the second to form a new port in an empty port slot. Signed-off-by: Tom Peng Signed-off-by: Jack Wang Signed-off-by: Lindar Liu Cc: Stable Tree Signed-off-by: James Bottomley