commit 59c5f46fbe01a00eedf54a23789634438bb80603 Author: Linus Torvalds Date: Mon Jun 6 18:06:33 2011 +0900 Linux 3.0-rc2 commit e0dcd8a05be438b3d2e49ef61441ea3a463663f8 Author: Hugh Dickins Date: Sun Jun 5 22:03:13 2011 -0700 mm: fix ENOSPC returned by handle_mm_fault() Al Viro observes that in the hugetlb case, handle_mm_fault() may return a value of the kind ENOSPC when its caller is expecting a value of the kind VM_FAULT_SIGBUS: fix alloc_huge_page()'s failure returns. Signed-off-by: Hugh Dickins Acked-by: Al Viro Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit 0d6925d43bd637fe4da7acb7bf1d0b92d38ab34b Merge: c12f667e7563 3190dad97b51 Author: Linus Torvalds Date: Mon Jun 6 17:51:28 2011 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: usb - turn off de-emphasis in s/pdif for cm6206 ALSA: asihpi: Use angle brackets for system includes ALSA: fm801: add error handling if auto-detect fails ALSA: hda - Check pin support EAPD in ad198x_power_eapd_write ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd() ALSA: 6fire: Don't leak firmware in error path ASoC: Fix wm_hubs input PGA ZC bits ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared commit c12f667e7563c2c0e0908c997900b91b41b23592 Merge: 0792644d2285 942c1a927bf2 Author: Linus Torvalds Date: Mon Jun 6 17:48:02 2011 +0900 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (max6642): Better chip detection schema hwmon: (coretemp) Further relax temperature range checks hwmon: (coretemp) Fix TjMax detection for older CPUs hwmon: (coretemp) Relax target temperature range check hwmon: (max6642) Rename temp_fault sysfs attribute to temp2_fault commit 3190dad97b5105ec9b9720f6d7bea54ee830fc2d Merge: 157186bc185c ea02c63d57d7 Author: Takashi Iwai Date: Mon Jun 6 09:28:49 2011 +0200 Merge branch 'fix/asoc' into for-linus commit 0792644d22852f40c8ad16c4ba1fefd76aba5643 Merge: e6ece70732b9 f2a4d8ae4d40 Author: Linus Torvalds Date: Sun Jun 5 08:11:11 2011 +0900 Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra * 'for-linus' of git://android.git.kernel.org/kernel/tegra: ARM: Tegra: Harmony: Fix conflicting GPIO numbering commit f2a4d8ae4d40f6f5482d207f47fd4d53b3ae0ed4 Author: Stephen Warren Date: Tue May 31 15:14:07 2011 -0600 ARM: Tegra: Harmony: Fix conflicting GPIO numbering Currently, both the WM8903 and TPS6586x chips attempt to register with gpiolib using the same GPIO numbers. This causes the audio driver to fail to initialize. To solve this, add a define to board-harmony.h for the TPS6586x, and make board-harmony-power.c use this define, instead of directly referencing TEGRA_NR_GPIOS. This fixes a regression introduced by commit 6f168f2fa60f87e85e0df25e87e2372f22f5eb7c. ARM: tegra: harmony: initialize the TPS65862 PMIC Signed-off-by: Stephen Warren Signed-off-by: Colin Cross commit e6ece70732b905742ad91a7b5489e0ca1362c0cd Merge: 23c79d31a3dd aa0467d8d2a0 Author: Linus Torvalds Date: Sun Jun 5 06:17:23 2011 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (25 commits) btrfs: fix uninitialized variable warning btrfs: add helper for fs_info->closing Btrfs: add mount -o inode_cache btrfs: scrub: add explicit plugging btrfs: use btrfs_ino to access inode number Btrfs: don't save the inode cache if we are deleting this root btrfs: false BUG_ON when degraded Btrfs: don't save the inode cache in non-FS roots Btrfs: make sure we don't overflow the free space cache crc page Btrfs: fix uninit variable in the delayed inode code btrfs: scrub: don't reuse bios and pages Btrfs: leave spinning on lookup and map the leaf Btrfs: check for duplicate entries in the free space cache Btrfs: don't try to allocate from a block group that doesn't have enough space Btrfs: don't always do readahead Btrfs: try not to sleep as much when doing slow caching Btrfs: kill BTRFS_I(inode)->block_group Btrfs: don't look at the extent buffer level 3 times in a row Btrfs: map the node block when looking for readahead targets Btrfs: set range_start to the right start in count_range_bits ... commit 942c1a927bf296fd64fd49f04c5a8f66bb14446b Author: Per Dalén Date: Thu May 26 09:08:53 2011 -0400 hwmon: (max6642): Better chip detection schema Improve detection of MAX6642 by reading non existing registers (0x04, 0x06 and 0xff). Reading those registers returns the previously read value. Signed-off-by: Per Dalen [guenter.roeck@ericsson.com: added second set of register reads] Signed-off-by: Guenter Roeck commit 23c79d31a3dd2602ee1a5ff31303b2d7a2d3c159 Merge: 0e833d8cfcb5 e73e079bf128 Author: Linus Torvalds Date: Sat Jun 4 23:19:51 2011 +0900 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: [SCSI] Fix oops caused by queue refcounting failure commit 0e833d8cfcb52b5ee3ead22cabbab81dea32c3f0 Merge: 4f1ba49efafc 7b29dc21ea08 Author: Linus Torvalds Date: Sat Jun 4 23:16:00 2011 +0900 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: (40 commits) tg3: Fix tg3_skb_error_unmap() net: tracepoint of net_dev_xmit sees freed skb and causes panic drivers/net/can/flexcan.c: add missing clk_put net: dm9000: Get the chip in a known good state before enabling interrupts drivers/net/davinci_emac.c: add missing clk_put af-packet: Add flag to distinguish VID 0 from no-vlan. caif: Fix race when conditionally taking rtnl lock usbnet/cdc_ncm: add missing .reset_resume hook vlan: fix typo in vlan_dev_hard_start_xmit() net/ipv4: Check for mistakenly passed in non-IPv4 address iwl4965: correctly validate temperature value bluetooth l2cap: fix locking in l2cap_global_chan_by_psm ath9k: fix two more bugs in tx power cfg80211: don't drop p2p probe responses Revert "net: fix section mismatches" drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run() sctp: stop pending timers and purge queues when peer restart asoc drivers/net: ks8842 Fix crash on received packet when in PIO mode. ip_options_compile: properly handle unaligned pointer iwlagn: fix incorrect PCI subsystem id for 6150 devices ... commit aa0467d8d2a00e75b2bb6a56a4ee6d70c5d1928f Author: David Sterba Date: Fri Jun 3 16:29:08 2011 +0200 btrfs: fix uninitialized variable warning With Linus' tree, today's linux-next build (powercp ppc64_defconfig) produced this warning: fs/btrfs/delayed-inode.c: In function 'btrfs_delayed_update_inode': fs/btrfs/delayed-inode.c:1598:6: warning: 'ret' may be used uninitialized in this function Introduced by commit 16cdcec736cd ("btrfs: implement delayed inode items operation"). This fixes a bug in btrfs_update_inode(): if the returned value from btrfs_delayed_update_inode is a nonzero garbage, inode stat data are not updated and several call paths may hit a BUG_ON or fail with strange code. Reported-by: Stephen Rothwell Signed-off-by: David Sterba commit 7841cb2898f66a73062c64d0ef5733dde7279e46 Author: David Sterba Date: Tue May 31 18:07:27 2011 +0200 btrfs: add helper for fs_info->closing wrap checking of filesystem 'closing' flag and fix a few missing memory barriers. Signed-off-by: David Sterba commit 4b9465cb9e3859186eefa1ca3b990a5849386320 Author: Chris Mason Date: Fri Jun 3 09:36:29 2011 -0400 Btrfs: add mount -o inode_cache This makes the inode map cache default to off until we fix the overflow problem when the free space crcs don't fit inside a single page. Signed-off-by: Chris Mason commit e7786c3ae517b2c433edc91714e86be770e9f1ce Author: Arne Jansen Date: Sat May 28 20:58:38 2011 +0000 btrfs: scrub: add explicit plugging With the removal of the implicit plugging scrub ends up doing more and smaller I/O than necessary. This patch adds explicit plugging per chunk. Signed-off-by: Arne Jansen Signed-off-by: Chris Mason commit a4689d2bd3b00dcf5c4320f06e0ab88810fbff9c Author: David Sterba Date: Tue May 31 17:08:14 2011 +0000 btrfs: use btrfs_ino to access inode number commit 4cb5300bc ("Btrfs: add mount -o auto_defrag") accesses inode number directly while it should use the helper with the new inode number allocator. Signed-off-by: David Sterba Signed-off-by: Chris Mason commit d132a538d258f8f52fd0cd8b5017755f4e915386 Author: Josef Bacik Date: Tue May 31 19:33:33 2011 +0000 Btrfs: don't save the inode cache if we are deleting this root With xfstest 254 I can panic the box every time with the inode number caching stuff on. This is because we clean the inodes out when we delete the subvolume, but then we write out the inode cache which adds an inode to the subvolume inode tree, and then when it gets evicted again the root gets added back on the dead roots list and is deleted again, so we have a double free. To stop this from happening just return 0 if refs is 0 (and we're not the tree root since tree root always has refs of 0). With this fix 254 no longer panics. Thanks, Signed-off-by: Josef Bacik Tested-by: David Sterba Signed-off-by: Chris Mason commit 5f3f302a6f4cb74906c05fad1d03fc5e95c7e5af Author: Arne Jansen Date: Mon May 30 08:36:16 2011 +0000 btrfs: false BUG_ON when degraded In degraded mode the struct btrfs_device of missing devs don't have device->name set. A kstrdup of NULL correctly returns NULL. Don't BUG in this case. Signed-off-by: Arne Jansen Signed-off-by: Chris Mason commit ca456ae280c0646e1e571c3b9a3834c55e90adfe Author: liubo Date: Wed Jun 1 09:42:49 2011 +0000 Btrfs: don't save the inode cache in non-FS roots This adds extra checks to make sure the inode map we are caching really belongs to a FS root instead of a special relocation tree. It prevents crashes during balancing operations. Signed-off-by: Liu Bo Signed-off-by: Chris Mason commit 211f96c24f117fcc6e9e2431e40d92f4de22625e Author: Chris Mason Date: Fri Jun 3 01:26:53 2011 -0400 Btrfs: make sure we don't overflow the free space cache crc page The free space cache uses only one page for crcs right now, which means we can't have a cache file bigger than the crcs we can fit in the first page. This adds a check to enforce that restriction. Signed-off-by: Chris Mason commit 17aca1c987cff89dc4279371857035da902c8854 Author: Chris Mason Date: Fri Jun 3 01:13:45 2011 -0400 Btrfs: fix uninit variable in the delayed inode code The nitems counter needs to start at zero Signed-off-by: Chris Mason commit 1bc8779349d6278e2713a1ff94418c2a6746a791 Author: Arne Jansen Date: Sat May 28 21:57:55 2011 +0200 btrfs: scrub: don't reuse bios and pages The current scrub implementation reuses bios and pages as often as possible, allocating them only on start and releasing them when finished. This leads to more problems with the block layer than it's worth. The elevator gets confused when there are more pages added to the bio than bi_size suggests. This patch completely rips out the reuse of bios and pages and allocates them freshly for each submit. Signed-off-by: Arne Jansen Signed-off-by: Chris Maosn commit 4f1ba49efafccbc73017f824efa2505c81b247cd Merge: 39b4a46f1929 e3a57b3ccf5c Author: Linus Torvalds Date: Sat Jun 4 08:11:26 2011 +0900 Merge branch 'for-linus' of git://git.kernel.dk/linux-block * 'for-linus' of git://git.kernel.dk/linux-block: block: Use hlist_entry() for io_context.cic_list.first cfq-iosched: Remove bogus check in queue_fail path xen/blkback: potential null dereference in error handling xen/blkback: don't call vbd_size() if bd_disk is NULL block: blkdev_get() should access ->bd_disk only after success CFQ: Fix typo and remove unnecessary semicolon block: remove unwanted semicolons Revert "block: Remove extra discard_alignment from hd_struct." nbd: adjust 'max_part' according to part_shift nbd: limit module parameters to a sane value nbd: pass MSG_* flags to kernel_recvmsg() block: improve the bio_add_page() and bio_add_pc_page() descriptions commit 39b4a46f19295b4876fba6655f27d67232dc6a1f Merge: cb37bbd90a11 5ff6197f828d Author: Linus Torvalds Date: Sat Jun 4 08:04:10 2011 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: Blackfin: strncpy: fix handling of zero lengths commit cb37bbd90a11003993d47c395837e0f87abf1b31 Merge: 3af91a1256b6 b36a968927b7 Author: Linus Torvalds Date: Sat Jun 4 08:03:16 2011 +0900 Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: asm-generic/unistd.h: support sendmmsg syscall tile: enable CONFIG_BUGVERBOSE commit 3af91a1256b628d55913324d27fe747c69566749 Merge: 9a44fde3435e 098011940a25 Author: Linus Torvalds Date: Sat Jun 4 07:59:32 2011 +0900 Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6 * 'linux-next' of git://git.infradead.org/ubifs-2.6: UBIFS: fix-up free space earlier UBIFS: intialize LPT earlier UBIFS: assert no fixup when writing a node UBIFS: fix clean znode counter corruption in error cases UBIFS: fix memory leak on error path UBIFS: fix shrinker object count reports UBIFS: fix recovery broken by the previous recovery fix UBIFS: amend ubifs_recover_leb interface UBIFS: introduce a "grouped" journal head flag UBIFS: supress false error messages commit 9a44fde3435e0c6012cbc9122497bbbd3338434a Merge: cd4ecf877a4d 9bf7174949ae Author: Linus Torvalds Date: Sat Jun 4 07:58:48 2011 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-ktest * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-ktest: ktest: Ignore unset values of the minconfig in config_bisect ktest: Fix result of rebooting the kernel ktest: Fix off-by-one in config bisect result commit cd4ecf877a4d629c38571405fd649077c12dec50 Merge: 1f3bd0f2ac87 816af7422f5b Author: Linus Torvalds Date: Sat Jun 4 07:53:23 2011 +0900 Merge branch 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 * 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: ARM: mach-shmobile: add DMAC clock definitions on SH7372 ARM: arch-shmobile: support SDHI card detection on mackerel, using a GPIO sh_mobile_meram: MERAM platform data for LCDC commit 1f3bd0f2ac870c9eb29590f193ee3d94e2d35514 Merge: bb3d6bf1919a a1b2cc50679c Author: Linus Torvalds Date: Sat Jun 4 07:04:25 2011 +0900 Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 * 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: dmaengine: shdma: fix a regression: initialise DMA channels for memcpy dmaengine: shdma: Fix up fallout from runtime PM changes. Revert "clocksource: sh_cmt: Runtime PM support" Revert "clocksource: sh_tmu: Runtime PM support" sh: Fix up asm-generic/ptrace.h fallout. sh64: Move from P1SEG to CAC_ADDR for consistent sync. sh64: asm/pgtable.h needs asm/mmu.h sh: asm/tlb.h needs linux/swap.h sh: mark DMA slave ID 0 as invalid sh: Update shmin to reflect PIO dependency. sh: arch/sh/kernel/process_32.c needs linux/prefetch.h. sh: add MMCIF runtime PM support on ecovec sh: switch ap325rxa to dynamically manage the platform camera commit bb3d6bf1919a20c56b3257b4ec09e67a9226cfb2 Author: Linus Torvalds Date: Sat Jun 4 07:00:50 2011 +0900 Revert "ASoC: Update cx20442 for TTY API change" This reverts commit ed0bd2333cffc3d856db9beb829543c1dfc00982. Since we reverted the TTY API change, we should revert the ASoC update to it too. Cc: Mark Brown Cc: Liam Girdwood Cc: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit 55db4c64eddf37e31279ec15fe90314713bc9cfa Author: Linus Torvalds Date: Sat Jun 4 06:33:24 2011 +0900 Revert "tty: make receive_buf() return the amout of bytes received" This reverts commit b1c43f82c5aa265442f82dba31ce985ebb7aa71c. It was broken in so many ways, and results in random odd pty issues. It re-introduced the buggy schedule_work() in flush_to_ldisc() that can cause endless work-loops (see commit a5660b41af6a: "tty: fix endless work loop when the buffer fills up"). It also used an "unsigned int" return value fo the ->receive_buf() function, but then made multiple functions return a negative error code, and didn't actually check for the error in the caller. And it didn't actually work at all. BenH bisected down odd tty behavior to it: "It looks like the patch is causing some major malfunctions of the X server for me, possibly related to PTYs. For example, cat'ing a large file in a gnome terminal hangs the kernel for -minutes- in a loop of what looks like flush_to_ldisc/workqueue code, (some ftrace data in the quoted bits further down). ... Some more data: It -looks- like what happens is that the flush_to_ldisc work queue entry constantly re-queues itself (because the PTY is full ?) and the workqueue thread will basically loop forver calling it without ever scheduling, thus starving the consumer process that could have emptied the PTY." which is pretty much exactly the problem we fixed in a5660b41af6a. Milton Miller pointed out the 'unsigned int' issue. Reported-by: Benjamin Herrenschmidt Reported-by: Milton Miller Cc: Stefan Bigler Cc: Toby Gray Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Alan Cox Signed-off-by: Linus Torvalds commit 7b29dc21ea084be7ddfb536994a9cfae95337690 Merge: 9a2e0fb0893d dfe21582ac5e Author: John W. Linville Date: Fri Jun 3 14:31:50 2011 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into for-davem commit 157186bc185cdf588fecba0fc5d7466e3e5d49d7 Author: Eric Lammerts Date: Fri May 27 18:16:52 2011 -0400 ALSA: usb - turn off de-emphasis in s/pdif for cm6206 CM6206: Turn off de-emphasis channel status bit in S/PDIF output. Signed-off-by: Eric Lammerts Signed-off-by: Takashi Iwai commit 098011940a2549ae7182db4bf101c3e3d2b4e6df Author: Ben Gardiner Date: Mon May 30 14:56:16 2011 -0400 UBIFS: fix-up free space earlier The free space fixup is currently initiated during mount after the call to ubifs_write_master() which results in a write to PEBs; this has been observed with the patch 'assert no fixup when writing a node' applied: Move the free space fixup on mount to before the calls to ubifs_recover_inl_heads() and ubifs_write_master(). This results in no assertions with the previously mentioned patch applied. Artem: tweaked the patch a bit Signed-off-by: Ben Gardiner Reviewed-by: Matthew L. Creech Signed-off-by: Artem Bityutskiy commit 781c5717a95a74b294beb38b8276943b0f8b5bb4 Author: Ben Gardiner Date: Mon May 30 14:56:15 2011 -0400 UBIFS: intialize LPT earlier The current 'mount_ubifs()' implementation does not initialize the LPT until the the master node is marked dirty. Move the LPT initialization to before marking the master node dirty. This is a preparation for the next patch which will move the free-space-fixup check to before marking the master node dirty, because we have to fix-up the free space before doing any writes. Artem: massaged the patch and commit message. Signed-off-by: Ben Gardiner Reviewed-by: Matthew L. Creech Signed-off-by: Artem Bityutskiy commit 4f1ab9b01d34eac9fc958f7150d3bf266dcc1685 Author: Ben Gardiner Date: Mon May 30 14:56:14 2011 -0400 UBIFS: assert no fixup when writing a node The current free space fixup can result in some writing to the UBI volume when the space_fixup flag is set. To catch instances where UBIFS is writing to the NAND while the space_fixup flag is set, add an assert to ubifs_write_node(). Artem: tweaked the patch, added similar assertion to the write buffer write path. Signed-off-by: Ben Gardiner Reviewed-by: Matthew L. Creech Signed-off-by: Artem Bityutskiy commit 837072377034d0a0b18b851d1ab95676b245cc0a Author: Artem Bityutskiy Date: Tue May 31 14:26:07 2011 +0300 UBIFS: fix clean znode counter corruption in error cases UBIFS maintains per-filesystem and global clean znode counters ('c->clean_zn_cnt' and 'ubifs_clean_zn_cnt'). It is important to maintain correct values there since the shrinker relies on 'ubifs_clean_zn_cnt'. However, in case of failures during commit the counters were corrupted. E.g., if a failure happens in the middle of 'write_index()', then some nodes in the commit list ('c->cnext') are marked as clean, and some are marked as dirty. And the 'ubifs_destroy_tnc_subtree()' frees does not retrun correct count, and we end up with non-zero 'c->clean_zn_cnt' when unmounting. This means that if we have 2 file-sytem and one of them fails, and we unmount it, 'ubifs_clean_zn_cnt' stays incorrect and confuses the shrinker. Signed-off-by: Artem Bityutskiy commit 812eb258311f89bcd664a34a620f249d54a2cd83 Author: Artem Bityutskiy Date: Tue May 31 08:40:40 2011 +0300 UBIFS: fix memory leak on error path UBIFS leaks memory on error path in 'ubifs_jnl_update()' in case of write failure because it forgets to free the 'struct ubifs_dent_node *dent' object. Although the object is small, the alignment can make it large - e.g., 2KiB if the min. I/O unit is 2KiB. Signed-off-by: Artem Bityutskiy Cc: stable@kernel.org commit cf610bf4199770420629d3bc273494bd27ad6c1d Author: Artem Bityutskiy Date: Tue May 31 07:03:21 2011 +0300 UBIFS: fix shrinker object count reports Sometimes VM asks the shrinker to return amount of objects it can shrink, and we return the ubifs_clean_zn_cnt in that case. However, it is possible that this counter is negative for a short period of time, due to the way UBIFS TNC code updates it. And I can observe the following warnings sometimes: shrink_slab: ubifs_shrinker+0x0/0x2b7 [ubifs] negative objects to delete nr=-8541616642706119788 This patch makes sure UBIFS never returns negative count of objects. Signed-off-by: Artem Bityutskiy Cc: stable@kernel.org commit 5ff6197f828d5ea051b3abf77cb61f8a34480e8d Author: Steven Miao Date: Wed Jun 1 15:52:41 2011 +0800 Blackfin: strncpy: fix handling of zero lengths The jump to 4f will cause the NUL padding loop to run at least one time, so if string length is zero just jump to the end. Otherwise we wrongly write one NUL byte when size==0. Signed-off-by: Steven Miao Signed-off-by: Mike Frysinger commit d50a2fb63643dce8506520dab5ffb8f49cc45cb2 Author: Joe Perches Date: Fri Jun 3 02:28:49 2011 -0700 ALSA: asihpi: Use angle brackets for system includes Use the normal include style. Signed-off-by: Joe Perches Signed-off-by: Takashi Iwai commit 9676001559fce06e37c7dc230ab275f605556176 Author: Dan Carpenter Date: Thu May 26 11:47:35 2011 +0300 ALSA: fm801: add error handling if auto-detect fails In the original code if auto detect failed and tea575x_tuner == 4 then we copy bogus information to chip->tea.card. I've changed the autodetect code to cleanup and return -ENODEV on error instead. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai commit a01ef051d584c12ede5cd5275b008b2ded57f3d9 Author: Raymond Yau Date: Wed Jun 1 15:09:48 2011 +0800 ALSA: hda - Check pin support EAPD in ad198x_power_eapd_write Check whether the pin supports EAPD in ad198x_power_eapd_write. Signed-off-by: Raymond Yau Signed-off-by: Takashi Iwai commit 4dffbe03d1e940aba878f9420e67feb8423cdd08 Author: Takashi Iwai Date: Fri Jun 3 10:05:02 2011 +0200 ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd() In ad198x_power_eapd(), wrong pin NIDs are used for controlling EAPD for HP and Front outputs of AD1988/AD1989. These are actually same with the ones for AD1984 & co, port-A is 0x11 and port-D 0x12. Reported-by: Raymond Yau Signed-off-by: Takashi Iwai commit 9a2e0fb0893ddf595d0a372e681f5b98017c6d90 Author: Matt Carlson Date: Thu Jun 2 13:01:39 2011 +0000 tg3: Fix tg3_skb_error_unmap() This function attempts to free one fragment beyond the number of fragments that were actually mapped. This patch brings back the limit to the correct spot. Signed-off-by: Matt Carlson Tested-by: Alex Williamson Signed-off-by: David S. Miller commit ec764bf083a6ff396234351b51fd236f53c903bf Author: Koki Sanagi Date: Mon May 30 21:48:34 2011 +0000 net: tracepoint of net_dev_xmit sees freed skb and causes panic Because there is a possibility that skb is kfree_skb()ed and zero cleared after ndo_start_xmit, we should not see the contents of skb like skb->len and skb->dev->name after ndo_start_xmit. But trace_net_dev_xmit does that and causes panic by NULL pointer dereference. This patch fixes trace_net_dev_xmit not to see the contents of skb directly. If you want to reproduce this panic, 1. Get tracepoint of net_dev_xmit on 2. Create 2 guests on KVM 2. Make 2 guests use virtio_net 4. Execute netperf from one to another for a long time as a network burden 5. host will panic(It takes about 30 minutes) Signed-off-by: Koki Sanagi Signed-off-by: David S. Miller commit b36a968927b789b2dd8de0aaf7a72ef7c1f0d012 Author: Chris Metcalf Date: Thu Jun 2 14:21:45 2011 -0400 asm-generic/unistd.h: support sendmmsg syscall Signed-off-by: Chris Metcalf Acked-by: Arnd Bergmann commit bf0be0e951cf1c4c9ce38032195cd8095a16d828 Author: Jesper Juhl Date: Mon May 30 12:49:01 2011 +0200 ALSA: 6fire: Don't leak firmware in error path One of the error paths in sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload() neglects to free the memory allocated for the firmware before returning, thus leaking the memory. Signed-off-by: Jesper Juhl Signed-off-by: Takashi Iwai commit 9bf7174949aef2f43253956e1f3ab01698abbd79 Author: Steven Rostedt Date: Wed Jun 1 23:27:19 2011 -0400 ktest: Ignore unset values of the minconfig in config_bisect By ignoring the unset values of the minconfig in deciding what to test in the config_bisect can cause the problem config from being tested too. Just do not test the configs that are set in the minconfig. Signed-off-by: Steven Rostedt commit 4da46da2d295c0d9f4aaf28dd2b70a1ecb42d972 Author: Steven Rostedt Date: Wed Jun 1 23:25:13 2011 -0400 ktest: Fix result of rebooting the kernel The command that is called that reboots the kernel may fail but the return code is not passed back to the ktest.pl script. This is because a ';' is used between the two commands and if the second command fails, only the first command's return code is returned. Using a '&&' between the two commands fixes this. Signed-off-by: Steven Rostedt commit 4c8cc55b3c0ebe989e727017933945b68b4327cd Author: Steven Rostedt Date: Wed Jun 1 23:22:30 2011 -0400 ktest: Fix off-by-one in config bisect result Because in perl the array size returned by $#arr, is the last index and not the actually size of the array, we end the config bisect early, thinking there is only one config left when there are in fact two. Thus the result has a 50% chance of picking the correct config that caused the problem. Signed-off-by: Steven Rostedt commit e3a57b3ccf5c04934ac43b5b80e32ba51b817288 Merge: e2bd9678fc00 9b83c771214c Author: Jens Axboe Date: Thu Jun 2 13:14:15 2011 +0200 Merge branch 'for-jens/xen-blkback.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus commit e2bd9678fc0085acf540dc4cb48ff961cd4d88c0 Author: Paul Bolle Date: Thu Jun 2 13:05:02 2011 +0200 block: Use hlist_entry() for io_context.cic_list.first list_entry() and hlist_entry() are both simply aliases for container_of(), but since io_context.cic_list.first is an hlist_node one should at least use the correct alias. Signed-off-by: Paul Bolle Signed-off-by: Jens Axboe commit 28304f485c3627cc5e1665b92e26eb7fcfe98088 Author: Paul Bolle Date: Thu Jun 2 13:05:02 2011 +0200 cfq-iosched: Remove bogus check in queue_fail path queue_fail can only be reached if cic is NULL, so its check for cic must be bogus. Signed-off-by: Paul Bolle Signed-off-by: Jens Axboe commit e73e079bf128d68284efedeba1fbbc18d78610f9 Author: James Bottomley Date: Wed May 25 15:52:14 2011 -0500 [SCSI] Fix oops caused by queue refcounting failure In certain circumstances, we can get an oops from a torn down device. Most notably this is from CD roms trying to call scsi_ioctl. The root cause of the problem is the fact that after scsi_remove_device() has been called, the queue is fully torn down. This is actually wrong since the queue can be used until the sdev release function is called. Therefore, we add an extra reference to the queue which is released in sdev->release, so the queue always exists. Reported-by: Parag Warudkar Cc: stable@kernel.org Signed-off-by: James Bottomley commit 2e4ceec4edaef6e903422792de4f7f37de98cec6 Author: Julia Lawall Date: Wed Jun 1 19:48:50 2011 +0000 drivers/net/can/flexcan.c: add missing clk_put The failed_get label is used after the call to clk_get has succeeded, so it should be moved up above the call to clk_put. The failed_req labels doesn't do anything different than failed_get, so delete it. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression e1,e2; statement S; @@ e1 = clk_get@p1(...); ... when != e1 = e2 when != clk_put(e1) when any if (...) { ... when != clk_put(e1) when != if (...) { ... clk_put(e1) ... } * return@p3 ...; } else S // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit 816af7422f5bdbb74a0c9bb09735a9aeb9522c30 Author: Guennadi Liakhovetski Date: Wed Jun 1 07:32:07 2011 +0000 ARM: mach-shmobile: add DMAC clock definitions on SH7372 These definitions are needed to let the runtime PM subsystem turn off DMAC clocks, when it is suspended by the driver. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt commit a1b2cc50679c1d2eed44e2885f6178ce907498b7 Author: Guennadi Liakhovetski Date: Tue May 31 09:25:16 2011 +0000 dmaengine: shdma: fix a regression: initialise DMA channels for memcpy A recent patch has introduced a regression, where repeating a memcpy DMA test with shdma module unloading between them skips the DMA channel configuration. Fix this regression by always configuring the channel during its allocation. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt commit 6979d5dd96a4a4975ce240982436e92a3da23315 Author: Mark Brown Date: Wed Jun 1 10:18:09 2011 +0000 net: dm9000: Get the chip in a known good state before enabling interrupts Currently the DM9000 driver requests the primary interrupt before it resets the chip and puts it into a known good state. This means that if the chip is asserting interrupt for some reason we can end up with a screaming IRQ that the interrupt handler is unable to deal with. Avoid this by only requesting the interrupt after we've reset the chip so we know what state it's in. This started manifesting itself on one of my boards in the past month or so, I suspect as a result of some core infrastructure changes removing some form of mitigation against bad behaviour here, even when things boot it seems that the new code brings the interface up more quickly. Signed-off-by: Mark Brown Signed-off-by: David S. Miller commit b722dbf176b67c75fe0f5a6b1b31f5ea8aa6117d Author: Julia Lawall Date: Wed Jun 1 07:10:10 2011 +0000 drivers/net/davinci_emac.c: add missing clk_put Go to existing error handling code at the end of the function that calls clk_put. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression e1,e2; statement S; @@ e1 = clk_get@p1(...); ... when != e1 = e2 when != clk_put(e1) when any if (...) { ... when != clk_put(e1) when != if (...) { ... clk_put(e1) ... } * return@p3 ...; } else S // Signed-off-by: Julia Lawall Acked-by: Kevin Hilman Signed-off-by: David S. Miller commit a3bcc23e890a6d49d6763d9eb073d711de2e0469 Author: Ben Greear Date: Wed Jun 1 06:49:10 2011 +0000 af-packet: Add flag to distinguish VID 0 from no-vlan. Currently, user-space cannot determine if a 0 tcp_vlan_tci means there is no VLAN tag or the VLAN ID was zero. Add flag to make this explicit. User-space can check for TP_STATUS_VLAN_VALID || tp_vlan_tci > 0, which will be backwards compatible. Older could would have just checked for tp_vlan_tci, so it will work no worse than before. Signed-off-by: Ben Greear Acked-by: Eric Dumazet Signed-off-by: David S. Miller commit 41be5a4a3668810bf3687a76c2b017bd437039e0 Author: sjur.brandeland@stericsson.com Date: Wed Jun 1 00:55:37 2011 +0000 caif: Fix race when conditionally taking rtnl lock Take the RTNL lock unconditionally when calling dev_close. Taking the lock conditionally may cause race conditions. Signed-off-by: Sjur Brændeland Signed-off-by: David S. Miller commit 85e3c65fa3a1d0542c181510a950a2be7733ff29 Author: Stefan Metzmacher Date: Wed Jun 1 02:01:41 2011 +0000 usbnet/cdc_ncm: add missing .reset_resume hook This avoids messages like this after suspend: cdc_ncm 2-1.4:1.6: no reset_resume for driver cdc_ncm? cdc_ncm 2-1.4:1.7: no reset_resume for driver cdc_ncm? cdc_ncm 2-1.4:1.6: usb0: unregister 'cdc_ncm' usb-0000:00:1d.0-1.4, CDC NCM This is important for the Ericsson F5521gw GSM/UMTS modem. Otherwise modemmanager looses the fact that the cdc_ncm and cdc_acm devices belong together. The cdc_ether module does the same. Signed-off-by: Stefan Metzmacher Signed-off-by: David S. Miller commit 307f73df2b9829ee5a261d1ed432ff683c426cdf Author: Wei Yongjun Date: Tue May 31 22:53:19 2011 +0000 vlan: fix typo in vlan_dev_hard_start_xmit() commit 4af429d29b341bb1735f04c2fb960178ed5d52e7 (vlan: lockless transmit path) have a typo in vlan_dev_hard_start_xmit(), using u64_stats_update_begin() to end the stat update, it should be u64_stats_update_end(). Signed-off-by: Wei Yongjun Reviewed-by: WANG Cong Acked-by: Eric Dumazet Signed-off-by: David S. Miller commit d0733d2e29b652b2e7b1438ececa732e4eed98eb Author: Marcus Meissner Date: Wed Jun 1 21:05:22 2011 -0700 net/ipv4: Check for mistakenly passed in non-IPv4 address Check against mistakenly passing in IPv6 addresses (which would result in an INADDR_ANY bind) or similar incompatible sockaddrs. Signed-off-by: Marcus Meissner Cc: Reinhard Max Signed-off-by: David S. Miller commit bb9973e4e73f43bd86698483d0c3f7a362ff94ce Author: Guenter Roeck Date: Wed Jun 1 11:03:41 2011 -0700 hwmon: (coretemp) Further relax temperature range checks Further relax temperature range checks after reading the IA32_TEMPERATURE_TARGET register. If the register returns a value other than 0 in bits 16..32, assume that the returned value is correct. This change applies to both packet and core temperature limits. Cc: Carsten Emde Cc: Fenghua Yu Cc: Jean Delvare Signed-off-by: Guenter Roeck Acked-by: Fenghua Yu commit 4f5f71a7abe329bdad81ee6a8e4545054a7cc30a Author: Guenter Roeck Date: Tue May 31 06:54:21 2011 -0700 hwmon: (coretemp) Fix TjMax detection for older CPUs Commit a321cedb12904114e2ba5041a3673ca24deb09c9 excludes CPU models 0xe, 0xf, 0x16, and 0x1a from TjMax temperature adjustment, even though several of those CPUs are known to have TiMax other than 100 degrees C, and even though the code in adjust_tjmax() explicitly handles those CPUs and points to a Web document listing several of the affected CPU IDs. Reinstate original TjMax adjustment if TjMax can not be determined using the IA32_TEMPERATURE_TARGET register. https://bugzilla.kernel.org/show_bug.cgi?id=32582 Signed-off-by: Guenter Roeck Cc: Huaxu Wan Cc: Carsten Emde Cc: Valdis Kletnieks Cc: Henrique de Moraes Holschuh Cc: Yong Wang Cc: Rudolf Marek Cc: Fenghua Yu Tested-by: Jean Delvare Acked-by: Jean Delvare Acked-by: Fenghua Yu Cc: # .35.x .36.x .37.x .38.x .39.x commit 1fa7b6a29c61358cc2ca6f64cef4aa0e1a7ca74c Author: Linus Torvalds Date: Thu Jun 2 06:11:24 2011 +0900 Revert "mm: fail GFP_DMA allocations when ZONE_DMA is not configured" This reverts commit a197b59ae6e8bee56fcef37ea2482dc08414e2ac. As rmk says: "Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not configured) is causing regressions on ARM with various drivers which use GFP_DMA. The behaviour up until now has been to silently ignore that flag when CONFIG_ZONE_DMA is not enabled, and to allocate from the normal zone. However, as a result of the above commit, such allocations now fail which causes drivers to fail. These are regressions compared to the previous kernel version." so just revert it. Requested-by: Russell King Acked-by: Andrew Morton Cc: David Rientjes Signed-off-by: Linus Torvalds commit f0f52a9463839c52a63c05d6e7d4a330d94a9794 Merge: 0f48f2600911 70e535d1e5d1 Author: Linus Torvalds Date: Thu Jun 2 05:48:50 2011 +0900 Merge git://git.infradead.org/iommu-2.6 * git://git.infradead.org/iommu-2.6: intel-iommu: Fix off-by-one in RMRR setup intel-iommu: Add domain check in domain_remove_one_dev_info intel-iommu: Remove Host Bridge devices from identity mapping intel-iommu: Use coherent DMA mask when requested intel-iommu: Dont cache iova above 32bit intel-iommu: Speed up processing of the identity_mapping function intel-iommu: Check for identity mapping candidate using system dma mask intel-iommu: Only unlink device domains from iommu intel-iommu: Enable super page (2MiB, 1GiB, etc.) support intel-iommu: Flush unmaps at domain_exit intel-iommu: Remove obsolete comment from detect_intel_iommu intel-iommu: fix VT-d PMR disable for TXT on S3 resume commit 0f48f2600911d5de6393829e4a9986d4075558b3 Author: Linus Torvalds Date: Thu Jun 2 05:29:19 2011 +0900 block: fix mismerge of the DISK_EVENT_MEDIA_CHANGE removal Jens' back-merge commit 698567f3fa79 ("Merge commit 'v2.6.39' into for-2.6.40/core") was incorrectly done, and re-introduced the DISK_EVENT_MEDIA_CHANGE lines that had been removed earlier in commits - 9fd097b14918 ("block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers") - 7eec77a1816a ("ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd") because of conflicts with the "g->flags" updates near-by by commit d4dc210f69bc ("block: don't block events on excl write for non-optical devices") As a result, we re-introduced the hanging behavior due to infinite disk media change reports. Tssk, tssk, people! Don't do back-merges at all, and *definitely* don't do them to hide merge conflicts from me - especially as I'm likely better at merging them than you are, since I do so many merges. Reported-by: Steven Rostedt Cc: Jens Axboe Signed-off-by: Linus Torvalds commit 3cc39b3f061e90f69cb1f65d72c005c56cddd6a6 Author: Chris Metcalf Date: Wed Jun 1 16:06:04 2011 -0400 tile: enable CONFIG_BUGVERBOSE Trivial config change to enable backtraces on panic. Signed-off-by: Chris Metcalf commit dfe21582ac5ebc460dda98c67e8589dd506d02cd Author: Stanislaw Gruszka Date: Wed Jun 1 17:17:57 2011 +0200 iwl4965: correctly validate temperature value In some cases we can read wrong temperature value. If after that temperature value will not be updated to good one, we badly configure tx power parameters and device is unable to send a data. Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=35932 Cc: stable@kernel.org # 2.6.39+ Signed-off-by: Stanislaw Gruszka Signed-off-by: John W. Linville commit a7567b2059020bf3fa96c389ec25eed8e28ad4ba Author: Johannes Berg Date: Wed Jun 1 08:29:54 2011 +0200 bluetooth l2cap: fix locking in l2cap_global_chan_by_psm read_lock() ... read_unlock_bh() is clearly bogus. This was broken by commit 23691d75cdc69c3b285211b4d77746aa20a17d18 Author: Gustavo F. Padovan Date: Wed Apr 27 18:26:32 2011 -0300 Bluetooth: Remove l2cap_sk_list Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit 21fdc87248d1d28492c775e05fa92b3c8c7bc8db Author: Daniel Halperin Date: Tue May 31 11:59:30 2011 -0700 ath9k: fix two more bugs in tx power This is the same fix as commit 841051602e3fa18ea468fe5a177aa92b6eb44b56 Author: Matteo Croce Date: Fri Dec 3 02:25:08 2010 +0100 The ath9k driver subtracts 3 dBm to the txpower as with two radios the signal power is doubled. The resulting value is assigned in an u16 which overflows and makes the card work at full power. in two more places. I grepped the ath tree and didn't find any others. Cc: stable@kernel.org Signed-off-by: Daniel Halperin Signed-off-by: John W. Linville commit 333ba7325213f0a09dfa5ceeddb056d6ad74b3b5 Author: Eliad Peller Date: Sun May 29 15:53:20 2011 +0300 cfg80211: don't drop p2p probe responses Commit 0a35d36 ("cfg80211: Use capability info to detect mesh beacons") assumed that probe response with both ESS and IBSS bits cleared means that the frame was sent by a mesh sta. However, these capabilities are also being used in the p2p_find phase, and the mesh-validation broke it. Rename the WLAN_CAPABILITY_IS_MBSS macro, and verify that mesh ies exist before assuming this frame was sent by a mesh sta. Signed-off-by: Eliad Peller Signed-off-by: John W. Linville commit 4c6e0f8101e62d8b2d01dc94b835a98b191a1454 Author: Jean Delvare Date: Tue May 31 15:50:51 2011 -0400 hwmon: (coretemp) Relax target temperature range check The current temperature range check of MSR_IA32_TEMPERATURE_TARGET seems too strict to me, some TjMax values documented in Documentation/hwmon/coretemp wouldn't pass. Relax the check so that all the documented values pass. Signed-off-by: Jean Delvare Cc: Carsten Emde Cc: Fenghua Yu Signed-off-by: Guenter Roeck commit 614198bbf8d74617381aea82521b261c7f9baaf6 Author: Per Dalen Date: Tue May 31 06:54:21 2011 -0700 hwmon: (max6642) Rename temp_fault sysfs attribute to temp2_fault The temp_fault sysfs attribute is wrong, it should be temp2_fault instead. Reported-by: Guenter Roeck Signed-off-by: Per Dalen Acked-by: Jean Delvare Signed-off-by: Guenter Roeck commit 9b83c771214cf6a256ee875050e6eaf320cf7983 Author: Dan Carpenter Date: Fri May 27 09:27:16 2011 +0300 xen/blkback: potential null dereference in error handling blkbk->pending_pages can be NULL here so I added a check for it. Signed-off-by: Dan Carpenter [v1: Redid the loop a bit] Signed-off-by: Konrad Rzeszutek Wilk commit 6464920a6e30604cb71d0ecbaa20e35009bd76fb Author: Laszlo Ersek Date: Wed May 25 12:24:25 2011 +0200 xen/blkback: don't call vbd_size() if bd_disk is NULL ...because vbd_size() dereferences bd_disk if bd_part is NULL. Signed-off-by: Laszlo Ersek Signed-off-by: Konrad Rzeszutek Wilk commit 3f303103b884ca577908d3e5c0650ad12e40c586 Merge: 5c6cce92bc8a 63da029015b5 Author: Linus Torvalds Date: Wed Jun 1 21:47:39 2011 +0900 Merge git://git.infradead.org/mtd-2.6 * git://git.infradead.org/mtd-2.6: mtd: fix physmap.h warnings commit 70e535d1e5d1e4317e894d6228b762cf9c3fbc6a Author: David Woodhouse Date: Tue May 31 00:22:52 2011 +0100 intel-iommu: Fix off-by-one in RMRR setup We were mapping an extra byte (and hence usually an extra page): iommu_prepare_identity_map() expects to be given an 'end' argument which is the last byte to be mapped; not the first byte *not* to be mapped. Signed-off-by: David Woodhouse commit 8519dc4401ddf8a5399f979870bbeeadbc111186 Author: Mike Habeck Date: Sat May 28 13:15:07 2011 -0500 intel-iommu: Add domain check in domain_remove_one_dev_info The comment in domain_remove_one_dev_info() states "No need to compare PCI domain; it has to be the same". But for the si_domain that isn't going to be true, as it consists of all the PCI devices that are identity mapped thus multiple PCI domains can be in si_domain. The code needs to validate the PCI domain too. Signed-off-by: Mike Habeck Signed-off-by: Mike Travis Cc: stable@kernel.org Signed-off-by: David Woodhouse commit 825507d6d059f1cbe2503e0e5a3926225b983aec Author: Mike Travis Date: Sat May 28 13:15:06 2011 -0500 intel-iommu: Remove Host Bridge devices from identity mapping When using the 1:1 (identity) PCI DMA remapping, PCI Host Bridge devices that do not use the IOMMU causes a kernel panic. Fix that by not inserting those devices into the si_domain. Signed-off-by: Mike Travis Reviewed-by: Mike Habeck Cc: stable@kernel.org Signed-off-by: David Woodhouse commit c681d0ba1252954208220ad32248a3e8e2fc98e4 Author: Mike Travis Date: Sat May 28 13:15:05 2011 -0500 intel-iommu: Use coherent DMA mask when requested The __intel_map_single function is not honoring the passed in DMA mask. This results in not using the coherent DMA mask when called from intel_alloc_coherent(). Signed-off-by: Mike Travis Acked-by: Chris Wright Reviewed-by: Mike Habeck Cc: stable@kernel.org Signed-off-by: David Woodhouse commit 1c9fc3d11b84fbd0c4f4aa7855702c2a1f098ebb Author: Chris Wright Date: Sat May 28 13:15:04 2011 -0500 intel-iommu: Dont cache iova above 32bit Mike Travis and Mike Habeck reported an issue where iova allocation would return a range that was larger than a device's dma mask. https://lkml.org/lkml/2011/3/29/423 The dmar initialization code will reserve all PCI MMIO regions and copy those reservations into a domain specific iova tree. It is possible for one of those regions to be above the dma mask of a device. It is typical to allocate iovas with a 32bit mask (despite device's dma mask possibly being larger) and cache the result until it exhausts the lower 32bit address space. Freeing the iova range that is >= the last iova in the lower 32bit range when there is still an iova above the 32bit range will corrupt the cached iova by pointing it to a region that is above 32bit. If that region is also larger than the device's dma mask, a subsequent allocation will return an unusable iova and cause dma failure. Simply don't cache an iova that is above the 32bit caching boundary. Reported-by: Mike Travis Reported-by: Mike Habeck Cc: stable@kernel.org Acked-by: Mike Travis Tested-by: Mike Habeck Signed-off-by: Chris Wright Signed-off-by: David Woodhouse commit cb452a4040bb051d92e85d6e7eb60c11734c1781 Author: Mike Travis Date: Sat May 28 13:15:03 2011 -0500 intel-iommu: Speed up processing of the identity_mapping function When there are a large count of PCI devices, and the pass through option for iommu is set, much time is spent in the identity_mapping function hunting though the iommu domains to check if a specific device is "identity mapped". Speed up the function by checking the cached info to see if it's mapped to the static identity domain. Signed-off-by: Mike Travis Reviewed-by: Mike Habeck Cc: stable@kernel.org Signed-off-by: David Woodhouse commit 8fcc5372fbac085199d84a880503ed67aba3fe49 Author: Chris Wright Date: Sat May 28 13:15:02 2011 -0500 intel-iommu: Check for identity mapping candidate using system dma mask The identity mapping code appears to make the assumption that if the devices dma_mask is greater than 32bits the device can use identity mapping. But that is not true: take the case where we have a 40bit device in a 44bit architecture. The device can potentially receive a physical address that it will truncate and cause incorrect addresses to be used. Instead check to see if the device's dma_mask is large enough to address the system's dma_mask. Signed-off-by: Mike Travis Reviewed-by: Mike Habeck Cc: stable@kernel.org Signed-off-by: David Woodhouse commit 9b4554b21ed07e8556405510638171f0c787742a Author: Alex Williamson Date: Tue May 24 12:19:04 2011 -0400 intel-iommu: Only unlink device domains from iommu Commit a97590e5 added unlinking domains from iommus to reciprocate the iommu from domains unlinking that was already done. We actually want to only do this for device domains and never for the static identity map domain or VM domains. The SI domain is special and never freed, while VM domain->id lives in their own special address space, separate from iommu->domain_ids. In the current code, a VM can get domain->id zero, then mark that domain unused when unbound from pci-stub. This leads to DMAR write faults when the device is re-bound to the host driver. Signed-off-by: Alex Williamson Cc: stable@kernel.org Signed-off-by: David Woodhouse commit 6dd9a7c73761a8a5f5475d5cfdc15368a0f4c06d Author: Youquan Song Date: Wed May 25 19:13:49 2011 +0100 intel-iommu: Enable super page (2MiB, 1GiB, etc.) support There are no externally-visible changes with this. In the loop in the internal __domain_mapping() function, we simply detect if we are mapping: - size >= 2MiB, and - virtual address aligned to 2MiB, and - physical address aligned to 2MiB, and - on hardware that supports superpages. (and likewise for larger superpages). We automatically use a superpage for such mappings. We never have to worry about *breaking* superpages, since we trust that we will always *unmap* the same range that was mapped. So all we need to do is ensure that dma_pte_clear_range() will also cope with superpages. Adjust pfn_to_dma_pte() to take a superpage 'level' as an argument, so it can return a PTE at the appropriate level rather than always extending the page tables all the way down to level 1. Again, this is simplified by the fact that we should never encounter existing small pages when we're creating a mapping; any old mapping that used the same virtual range will have been entirely removed and its obsolete page tables freed. Provide an 'intel_iommu=sp_off' argument on the command line as a chicken bit. Not that it should ever be required. == The original commit seen in the iommu-2.6.git was Youquan's implementation (and completion) of my own half-baked code which I'd typed into an email. Followed by half a dozen subsequent 'fixes'. I've taken the unusual step of rewriting history and collapsing the original commits in order to keep the main history simpler, and make life easier for the people who are going to have to backport this to older kernels. And also so I can give it a more coherent commit comment which (hopefully) gives a better explanation of what's going on. The original sequence of commits leading to identical code was: Youquan Song (3): intel-iommu: super page support intel-iommu: Fix superpage alignment calculation error intel-iommu: Fix superpage level calculation error in dma_pfn_level_pte() David Woodhouse (4): intel-iommu: Precalculate superpage support for dmar_domain intel-iommu: Fix hardware_largepage_caps() intel-iommu: Fix inappropriate use of superpages in __domain_mapping() intel-iommu: Fix phys_pfn in __domain_mapping for sglist pages Signed-off-by: Youquan Song Signed-off-by: David Woodhouse commit 63da029015b5255915cd6d61f19ffc276ad4635d Author: Randy Dunlap Date: Mon May 23 11:37:09 2011 -0700 mtd: fix physmap.h warnings Fix build warnings in physmap.h: include/linux/mtd/physmap.h:25: warning: 'struct platform_device' declared inside parameter list include/linux/mtd/physmap.h:25: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/mtd/physmap.h:26: warning: 'struct platform_device' declared inside parameter list include/linux/mtd/physmap.h:27: warning: 'struct platform_device' declared inside parameter list Signed-off-by: Randy Dunlap Signed-off-by: David Woodhouse commit da8b94ea61c5d80aae0cc7b7541f1e0fa7459391 Author: Artem Bityutskiy Date: Thu May 26 08:58:19 2011 +0300 UBIFS: fix recovery broken by the previous recovery fix Unfortunately, the recovery fix d1606a59b6be4ea392eabd40d1250aa1eeb19efb (UBIFS: fix extremely rare mount failure) broke recovery. This commit make UBIFS drop the last min. I/O unit in all journal heads, but this is needed only for the GC head. And this does not work for non-GC heads. For example, if suppose we have min. I/O units A and B, and A contains a valid node X, which was fsynced, and then a group of nodes Y which spans the rest of A and B. In this case we'll drop not only Y, but also X, which is obviously incorrect. This patch fixes the issue and additionally makes recovery to drop last min. I/O unit only for the GC head, and leave things as they have been for ages for the other heads - this is safer. Signed-off-by: Artem Bityutskiy commit efcfde54ca68091b164f9aec544c7233a9760aff Author: Artem Bityutskiy Date: Thu May 26 08:36:52 2011 +0300 UBIFS: amend ubifs_recover_leb interface Instead of passing "grouped" parameter to 'ubifs_recover_leb()' which tells whether the nodes are grouped in the LEB to recover, pass the journal head number and let 'ubifs_recover_leb()' look at the journal head's 'grouped' flag. This patch is a preparation to a further fix where we'll need to know the journal head number for other purposes. Signed-off-by: Artem Bityutskiy commit 1a0b06997ceca96db9259e537eb935f9fe59a3de Author: Artem Bityutskiy Date: Thu May 26 08:26:05 2011 +0300 UBIFS: introduce a "grouped" journal head flag Journal heads are different in a way how UBIFS writes nodes there. All normal journal heads receive grouped nodes, while the GC journal heads receives ungrouped nodes. This patch adds a 'grouped' flag to 'struct ubifs_jhead' which describes this property. This patch is a preparation to a further recovery fix. Signed-off-by: Artem Bityutskiy commit ab75950b11e74145ffe61376ac073d56645aab8a Author: Artem Bityutskiy Date: Thu May 26 06:51:48 2011 +0300 UBIFS: supress false error messages Commit ab51afe05273741f72383529ef488aa1ea598ec6 was a good clean-up, but it introduced a regression - now UBIFS prints scary error messages during recovery on all corrupted nodes, even though the corruptions are expected (due to a power cut). This patch fixes the issue. Additionally fix a typo in a commentary introduced by the same commit. Signed-off-by: Artem Bityutskiy commit 5c6cce92bc8aee751aafe82c5d9caf7553226a3d Merge: 603d04b20109 a5b2c5b2ad58 Author: Linus Torvalds Date: Wed Jun 1 16:35:37 2011 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: AppArmor: fix oops in apparmor_setprocattr commit 603d04b2010976a52f62b7633f9999d104046900 Author: Mike Frysinger Date: Sat May 28 10:04:25 2011 -0400 kgdbts: only use new asm-generic/ptrace.h api when needed The new instruction_pointer_set helper is defined for people who have converted to asm-generic/ptrace.h, so don't use it generally unless the arch needs it (in which case it has been converted). This should fix building of kgdb tests for arches not yet converted. Signed-off-by: Mike Frysinger Acked-by: Stephen Rothwell Cc: Jason Wessel Cc: Andrew Morton Signed-off-by: Linus Torvalds commit 4c49ff3fe128ca68dabd07537415c419ad7f82f9 Author: Tejun Heo Date: Wed Jun 1 08:27:41 2011 +0200 block: blkdev_get() should access ->bd_disk only after success d4dc210f69 (block: don't block events on excl write for non-optical devices) added dereferencing of bdev->bd_disk to test GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE; however, bdev->bd_disk can be %NULL if open failed which can lead to an oops. Test the flag after testing open was successful, not before. Signed-off-by: Tejun Heo Reported-by: David Miller Tested-by: David Miller Cc: stable@kernel.org Signed-off-by: Jens Axboe commit a5b2c5b2ad5853591a6cac6134cd0f599a720865 Author: Kees Cook Date: Tue May 31 11:31:41 2011 -0700 AppArmor: fix oops in apparmor_setprocattr When invalid parameters are passed to apparmor_setprocattr a NULL deref oops occurs when it tries to record an audit message. This is because it is passing NULL for the profile parameter for aa_audit. But aa_audit now requires that the profile passed is not NULL. Fix this by passing the current profile on the task that is trying to setprocattr. Signed-off-by: Kees Cook Signed-off-by: John Johansen Cc: stable@kernel.org Signed-off-by: James Morris commit 948252cb9e01d65a89ecadf67be5018351eee15e Author: David S. Miller Date: Tue May 31 19:27:48 2011 -0700 Revert "net: fix section mismatches" This reverts commit e5cb966c0838e4da43a3b0751bdcac7fe719f7b4. It causes new build regressions with gcc-4.2 which is pretty common on non-x86 platforms. Reported-by: James Bottomley Signed-off-by: David S. Miller commit 930a6eac9f40e692bd9670d89bcd9ac0f4019356 Author: Alexey Khoroshilov Date: Mon May 30 07:06:24 2011 +0000 drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run() catc_ctrl_run() calls usb_submit_urb() with GFP_KERNEL, while it is called from catc_ctrl_async() and catc_ctrl_done() with catc->ctrl_lock spinlock held. The patch replaces GFP_KERNEL with GFP_ATOMIC. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller commit a000c01e60e40e15304ffe48fff051d17a7bea91 Author: Wei Yongjun Date: Sun May 29 23:23:36 2011 +0000 sctp: stop pending timers and purge queues when peer restart asoc If the peer restart the asoc, we should not only fail any unsent/unacked data, but also stop the T3-rtx, SACK, T4-rto timers, and teardown ASCONF queues. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit b10cec8a4e8167075b9e1ff3f05419769e7f381a Author: Dennis Aberilla Date: Sun May 29 11:46:54 2011 +0000 drivers/net: ks8842 Fix crash on received packet when in PIO mode. This patch fixes a driver crash during packet reception due to not enough bytes allocated in the skb. Since the loop reads out 4 bytes at a time, we need to allow for up to 3 bytes of slack space. Signed-off-by: Dennis Aberilla Signed-off-by: David S. Miller commit 48bdf072c3f1f8f739f76d19c74f4c79605cac46 Author: Chris Metcalf Date: Sun May 29 10:55:44 2011 +0000 ip_options_compile: properly handle unaligned pointer The current code takes an unaligned pointer and does htonl() on it to make it big-endian, then does a memcpy(). The problem is that the compiler decides that since the pointer is to a __be32, it is legal to optimize the copy into a processor word store. However, on an architecture that does not handled unaligned writes in kernel space, this produces an unaligned exception fault. The solution is to track the pointer as a "char *" (which removes a bunch of unpleasant casts in any case), and then just use put_unaligned_be32() to write the value to memory. Signed-off-by: Chris Metcalf Signed-off-by: David S. Miller commit e12ca23d41bd157354a5d1aadff30211a410c53a Merge: 850761b2b13a 7a66f784375c Author: Linus Torvalds Date: Wed Jun 1 06:45:08 2011 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio_net: delay TX callbacks virtio: add api for delayed callbacks virtio_test: support event index vhost: support event index virtio_ring: support event idx feature virtio ring: inline function to check for events virtio: event index interface virtio: add full three-clause BSD text to headers. virtio balloon: kill tell-host-first logic virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT. drivers, block: virtio_blk: Replace cryptic number with the macro virtio_blk: allow re-reading config space at runtime lguest: remove support for VIRTIO_F_NOTIFY_ON_EMPTY. lguest: fix up compilation after move lguest: fix timer interrupt setup commit 850761b2b13aec5d4f9935199e917f9a4ae00cce Merge: af0d6a0a3a30 83caba8436b2 Author: Linus Torvalds Date: Wed Jun 1 06:44:10 2011 +0900 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] wire up sendmmsg() syscall for Itanium commit 1144181c1bc054dc5e001a6f10b4820167e6c883 Author: Wey-Yi Guy Date: Mon May 30 09:32:52 2011 -0700 iwlagn: fix incorrect PCI subsystem id for 6150 devices For 6150 devices, modify the supported PCI subsystem ID. Cc: stable@kernel.org Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville commit 59342f6a6bc35df623fb44784daa5e1077063b8f Author: Jussi Kivilinna Date: Mon May 30 10:15:47 2011 +0300 zd1211rw: fix to work on OHCI zd1211 devices register 'EP 4 OUT' endpoint as Interrupt type on USB 2.0: Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 However on USB 1.1 endpoint becomes Bulk: Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Commit 37939810b937aba830dd751291fcdc51cae1a6cb assumed that endpoint is always interrupt type and changed usb_bulk_msg() calls to usb_interrupt_msg(). Problem here is that usb_bulk_msg() on interrupt endpoint selfcorrects the call and changes requested pipe to interrupt type (see usb_bulk_msg). However with usb_interrupt_msg() on bulk endpoint does not correct the pipe type to bulk, but instead URB is submitted with interrupt type pipe. So pre-2.6.39 used usb_bulk_msg() and therefore worked with both endpoint types, however in 2.6.39 usb_interrupt_msg() with bulk endpoint causes ohci_hcd to fail submitted URB instantly with -ENOSPC and preventing zd1211rw from working with OHCI. Fix this by detecting endpoint type and using correct endpoint/pipe types for URB. Also fix asynchronous zd_usb_iowrite16v_async() to use right URB type on 'EP 4 OUT'. Cc: stable@kernel.org Signed-off-by: Jussi Kivilinna Signed-off-by: John W. Linville commit 66870b1ccd5c1460e437c18b0026e2dcaab1ece9 Author: Luciano Coelho Date: Fri May 27 15:34:48 2011 +0300 wl12xx: fix oops in sched_scan when forcing a passive scan Fix kernel oops when trying to use passive scheduled scans. The reason was that in passive scans there are no SSIDs, so there was a NULL pointer dereference. To solve the problem, we now check the number of SSIDs provided in the sched_scan request and only access the list if there's one or more (ie. passive scan is not forced). We also force all the channels to be passive by adding the IEEE80211_CHAN_PASSIVE_SCAN flag locally before the checks in the wl1271_scan_get_sched_scan_channels() function. Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville commit 50a66d7f04adbfab9db55144c58dc693358cb635 Author: Luciano Coelho Date: Fri May 27 15:34:47 2011 +0300 wl12xx: add separate config value for DFS dwell time on sched scan Use a different value for DFS dwell time when performing a scheduled scan. Previously we were using the same value as for normal passive scans. This adds some flexibility between these two different types of passive scan. For now we use 150 TUs for DFS channel dwell time. This may need to be fine-tuned in the future. Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville commit 2497a246e880d1fb537f754f551177c01fa39242 Author: Luciano Coelho Date: Fri May 27 15:34:46 2011 +0300 wl12xx: fix DFS channels handling in scheduled scan DFS channels were never getting included in the scheduled scans, because they always contain the passive flag as well and the call was asking for DFS and active channels. Fix this by ignoring the passive flag when collecting DFS channels. Also, move the DFS channels in the channel list before the 5GHz active channels (this was implemented in the FW differently than specified). Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville commit dd08682150e1815fe5cdd0673a2f2e9cd2d55a7a Author: Luciano Coelho Date: Fri May 27 15:34:45 2011 +0300 wl12xx: fix passive and radar channel generation for scheduled scan We were comparing bitwise AND results with a boolean, so when the boolean was set to true, it was not matching as it should. Fix this by booleanizing the bitwise AND results with !!. Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville commit 71005be40a7fc95edda3cc462361ce0243e4f5fa Author: Daniel Drake Date: Thu May 26 21:31:08 2011 +0100 libertas: Set command sequence number later to ensure consistency Before this patch, the command sequence number is being set before lbs_queue_cmd() adds the command to the queue. However, lbs_queue_cmd() sometimes forces commands to queue-jump (e.g. CMD_802_11_WAKEUP_CONFIRM). It currently does this without considering that sequence numbers might need adjusting to keep things running in order. Fix this by setting the sequence number at a later stage, just before we're actually submitting the command to the hardware. Also fixes a possible race where seqnum was being modified outside of the driver lock. Signed-off-by: Daniel Drake Acked-by: Dan Williams Signed-off-by: John W. Linville commit 4495a7d41dbda03841c2a1c2a5ce7135a45131ba Author: Kyungmin Park Date: Tue May 31 10:04:09 2011 +0200 CFQ: Fix typo and remove unnecessary semicolon Fix comment typo and remove unnecessary semicolon at macro Signed-off-by: Kyungmin Park Signed-off-by: Jens Axboe commit 83caba8436b28bd9081013fd840424983127d4ca Author: Tony Luck Date: Tue May 31 10:09:24 2011 -0700 [IA64] wire up sendmmsg() syscall for Itanium Add entries in unistd.h and entry.S to make this new syscall visible. Signed-off-by: Tony Luck commit af0d6a0a3a30946f7df69c764791f1b0643f7cd6 Merge: 07ef3c3b4489 4f3c125c7420 Author: Linus Torvalds Date: Wed Jun 1 02:07:22 2011 +0900 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Fix mwait_play_dead() faulting on mwait-incapable cpus x86 idle: Fix mwait deprecation warning message Evil merge to remove extra quote noticed by Joe Perches commit 07ef3c3b44896bc0432a901fe6ae0d0deaca47ce Merge: 643d2d7992f4 d72bce0e67e8 Author: Linus Torvalds Date: Wed Jun 1 02:03:22 2011 +0900 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rcu: Cure load woes commit ea9d6553b3b3044e7374774cc33bb1b2eee19dd3 Author: Namhyung Kim Date: Tue May 31 13:45:53 2011 +0200 block: remove unwanted semicolons Since those defined functions require additional semicolon from the caller, they could cause potential syntax errors when used in if-else statements. Signed-off-by: Namhyung Kim Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 643d2d7992f4ce4f983d455b579f77b1e9c0af0c Merge: 89c122236e60 89e1be50c68e Author: Linus Torvalds Date: Tue May 31 20:32:54 2011 +0900 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Put back -pg to tsc.o and add no GCOV to vread_tsc_64.o commit 89c122236e60747f920008c9cf4e9cbde3333e50 Merge: 339dedf709e2 c7427d23f7ed Author: Linus Torvalds Date: Tue May 31 20:30:59 2011 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: autofs4: bogus dentry_unhash() added in ->unlink() vfs: shrink_dcache_parent before rmdir, dir rename commit 339dedf709e21d5718d6596750166f70e8bed40a Author: Benjamin Herrenschmidt Date: Tue May 31 18:01:23 2011 +1000 powerpc/pmac: Don't register pmac PIC syscore ops when HW not present The Apple custom PIC only exist in some earlier machine models, anything with an MPIC will crash on suspend if we register those syscore ops unconditionally. This is a regression caused by commit f5a592f7d74e ("PM / PowerPC: Use struct syscore_ops instead of sysdevs for PM") Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds commit d72bce0e67e8afc6eb959f656013cbb577426f1e Author: Peter Zijlstra Date: Mon May 30 13:34:51 2011 +0200 rcu: Cure load woes Commit cc3ce5176d83 (rcu: Start RCU kthreads in TASK_INTERRUPTIBLE state) fudges a sleeping task' state, resulting in the scheduler seeing a TASK_UNINTERRUPTIBLE task going to sleep, but a TASK_INTERRUPTIBLE task waking up. The result is unbalanced load calculation. The problem that patch tried to address is that the RCU threads could stay in UNINTERRUPTIBLE state for quite a while and triggering the hung task detector due to on-demand wake-ups. Cure the problem differently by always giving the tasks at least one wake-up once the CPU is fully up and running, this will kick them out of the initial UNINTERRUPTIBLE state and into the regular INTERRUPTIBLE wait state. [ The alternative would be teaching kthread_create() to start threads as INTERRUPTIBLE but that needs a tad more thought. ] Reported-by: Damien Wyart Signed-off-by: Peter Zijlstra Acked-by: Paul E. McKenney Link: http://lkml.kernel.org/r/1306755291.1200.2872.camel@twins Signed-off-by: Ingo Molnar commit 1222de7c415cfa70f441f836588fd79a3334d4fe Merge: db7eba292e91 5c2de4441752 Author: Paul Mundt Date: Tue May 31 16:00:58 2011 +0900 Merge branch 'sh/runtime-pm-misery' into sh-fixes-for-linus commit 5c2de44417523385010b529599a2b30f290831a3 Author: Paul Mundt Date: Tue May 31 15:53:03 2011 +0900 dmaengine: shdma: Fix up fallout from runtime PM changes. The runtime PM changes introduce sh_dmae_rst() wrapping via the runtime_resume helper, depending on dev_get_drvdata() to fetch the platform data needed for the DMAOR initialization default at a time where drvdata hasn't yet been established by the probe path, resulting in general probe misery: Unable to handle kernel NULL pointer dereference at virtual address 000000c4 pc = 8025adee *pde = 00000000 Oops: 0000 [#1] Modules linked in: Pid : 1, Comm: swapper CPU : 0 Not tainted (3.0.0-rc1-00012-g9436b4a-dirty #1456) PC is at sh_dmae_rst+0x28/0x86 PR is at sh_dmae_rst+0x22/0x86 PC : 8025adee SP : 9e803d10 SR : 400080f1 TEA : 000000c4 R0 : 000000c4 R1 : 0000fff8 R2 : 00000000 R3 : 00000040 R4 : 000000f0 R5 : 00000000 R6 : 00000000 R7 : 804f184c R8 : 00000000 R9 : 804dd0e8 R10 : 80283204 R11 : ffffffda R12 : 000000a0 R13 : 804dd18c R14 : 9e803d10 MACH: 00000000 MACL: 00008f20 GBR : 00000000 PR : 8025ade8 Call trace: [<8025ae70>] sh_dmae_runtime_resume+0x24/0x34 [<80283238>] pm_generic_runtime_resume+0x34/0x3c [<80283370>] rpm_callback+0x4a/0x7e [<80283efc>] rpm_resume+0x240/0x384 [<80283f54>] rpm_resume+0x298/0x384 [<8028428c>] __pm_runtime_resume+0x44/0x7c [<8038a358>] __ioremap_caller+0x0/0xec [<80284296>] __pm_runtime_resume+0x4e/0x7c [<8038a358>] __ioremap_caller+0x0/0xec [<80666254>] sh_dmae_probe+0x180/0x6a0 [<802803ae>] platform_drv_probe+0x26/0x2e Fix up the ordering accordingly. Signed-off-by: Paul Mundt commit 9436b4abec28a22edd961ae375535d940625f1f2 Author: Paul Mundt Date: Tue May 31 15:26:42 2011 +0900 Revert "clocksource: sh_cmt: Runtime PM support" This reverts commit 01fa68b58492a5d6708a91c1f474b6a099a9509e. The same note as per the sh_tmu change applies here, too. Signed-off-by: Paul Mundt commit d4905ce38c73964b868037e49a5945e1cf47a7f2 Author: Paul Mundt Date: Tue May 31 15:23:20 2011 +0900 Revert "clocksource: sh_tmu: Runtime PM support" This reverts commit 1b842e91fea9447eff5eb687e28ad61c02f5033e. There is a fundamental ordering race between the early and late probe paths and the runtime PM tie-in that results in __pm_runtime_resume() attempting to take a lock that hasn't been initialized yet (which by proxy also suggests that pm_runtime_init() hasn't yet been run on the device either, making the entire thing unsafe) -- resulting in instant death on SMP or on UP with spinlock debugging enabled: sh_tmu.0: used for clock events sh_tmu.0: used for periodic clock events BUG: spinlock trylock failure on UP on CPU#0, swapper/0 lock: 804db198, .magic: 00000000, .owner: /-1, .owner_cpu: 0 ... Revert it for now until the ordering issues can be resolved, or we can get some more help from the runtime PM framework to make this possible. Signed-off-by: Paul Mundt commit db7eba292e913390fa881272bfbc3da0a5380513 Author: Paul Mundt Date: Tue May 31 14:39:49 2011 +0900 sh: Fix up asm-generic/ptrace.h fallout. There was an ordering issue with regards to instruction_pointer() being used in profile_pc() prior to the asm-generic/ptrace.h include, which subsequently provided the instruction_pointer() definition. In the interest of simplicity we simply open-code the regs->pc deref for the profile_pc() definition instead. The FP functions were also broken due to a lack of a common regs->fp, so provide a common GET_FP() that is safe for both architectures in order to fix up the frame pointer helpers too. Signed-off-by: Paul Mundt commit 3f9b8520b06013939ad247ba08b69529b5f14be1 Author: Paul Mundt Date: Tue May 31 14:38:29 2011 +0900 sh64: Move from P1SEG to CAC_ADDR for consistent sync. sh64 doesn't define a P1SEGADDR, resulting in a build failure. The proper mapping can be attained for both sh32 and 64 via the CAC_ADDR macro, so switch to that instead. Signed-off-by: Paul Mundt commit 65d517eb7224d24ee4206416161390f30d69e622 Author: Paul Mundt Date: Tue May 31 14:37:44 2011 +0900 sh64: asm/pgtable.h needs asm/mmu.h Needed to satisfy the __in_29bit_mode() check. Signed-off-by: Paul Mundt commit 194cd8dfc9e4f29249b3bd45c5cb5c0a33a6438c Author: Nobuhiro Iwamatsu Date: Tue May 31 13:27:41 2011 +0900 sh: asm/tlb.h needs linux/swap.h Commit 1e56a56410bb64bce62d44563e35a143fc2d515f introduced the mmu_gather rework for sh, but missed a linux/swap.h include: CC arch/sh/mm/tlb-urb.o In file included from arch/sh/mm/tlb-urb.c:14:0: arch/sh/include/asm/tlb.h: In function '__tlb_remove_page': arch/sh/include/asm/tlb.h:92:2: error: implicit declaration of function 'free_page_and_swap_cache' Signed-off-by: Nobuhiro Iwamatsu CC: Peter Zijlstra Signed-off-by: Paul Mundt commit 8181d3ef26ed1d9eb21e2cdcac374e1f457fdc06 Merge: 54525552c6cc 55922c9d1b84 Author: Paul Mundt Date: Tue May 31 13:10:26 2011 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-fixes-for-linus commit 4f3c125c7420c85eaff627145557e392a871922d Author: Avi Kivity Date: Mon May 30 08:23:57 2011 -0400 x86: Fix mwait_play_dead() faulting on mwait-incapable cpus A logic error in mwait_play_dead() causes the kernel to use mwait even on cpus which don't support it, such as KVM virtual cpus. Introduced by: 349c004e3d31: x86: A fast way to check capabilities of the current cpu Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=36222 Reported-by: Török Edwin Signed-off-by: Avi Kivity Cc: Christoph Lameter Cc: Tejun Heo Link: http://lkml.kernel.org/r/1306758237-9327-1-git-send-email-avi@redhat.com Signed-off-by: Ingo Molnar commit 598e887d8b01655780c81cc86a9e7820ed091580 Author: Borislav Petkov Date: Mon May 30 11:38:06 2011 +0200 x86 idle: Fix mwait deprecation warning message Fix: arch/x86/kernel/process.c:645:1: warning: unknown escape sequence '\i' due to missing escape backslash, introduced by this commit: 5d4c47e0195b: x86 idle: deprecate mwait_idle() and "idle=mwait" cmdline param Signed-off-by: Borislav Petkov Cc: Len Brown Cc: Linus Torvalds Link: http://lkml.kernel.org/r/1306748286-24701-1-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar commit c7427d23f7ed695ac226dbe3a84d7f19091d34ce Author: Al Viro Date: Mon May 30 01:50:53 2011 -0400 autofs4: bogus dentry_unhash() added in ->unlink() Signed-off-by: Al Viro commit 3cebde2413ba42504cf2c10ec1d47582912435cd Author: Sage Weil Date: Sun May 29 21:20:59 2011 -0700 vfs: shrink_dcache_parent before rmdir, dir rename The dentry_unhash push-down series missed that shink_dcache_parent needs to be called prior to rmdir or dir rename to clear DCACHE_REFERENCED and allow efficient dentry reclaim. Reported-by: Dave Chinner Signed-off-by: Sage Weil Signed-off-by: Al Viro commit a1706ac4c0201ea0143dc0db0659001b26ceeabb Author: Jens Axboe Date: Mon May 30 07:42:51 2011 +0200 Revert "block: Remove extra discard_alignment from hd_struct." It was not a good idea to start dereferencing disk->queue from the fs sysfs strategy for displaying discard alignment. We ran into first a NULL pointer deref, and after fixing that we sometimes see unvalid disk->queue pointer values. Since discard is the only one of the bunch actually looking into the queue, just revert the change. This reverts commit 23ceb5b7719e9276d4fa72a3ecf94dd396755276. Conflicts: fs/partitions/check.c commit 7a66f784375c5922315bbe879b789ee50b924d26 Author: Michael S. Tsirkin Date: Fri May 20 02:11:23 2011 +0300 virtio_net: delay TX callbacks Ask for delayed callbacks on TX ring full, to give the other side more of a chance to make progress. Signed-off-by: Michael S. Tsirkin Acked-by: David S. Miller Signed-off-by: Rusty Russell commit 7ab358c23cbf15cea08129cd722d1ce77433a94d Author: Michael S. Tsirkin Date: Fri May 20 02:11:14 2011 +0300 virtio: add api for delayed callbacks Add an API that tells the other side that callbacks should be delayed until a lot of work has been done. Implement using the new event_idx feature. Note: it might seem advantageous to let the drivers ask for a callback after a specific capacity has been reached. However, as a single head can free many entries in the descriptor table, we don't really have a clue about capacity until get_buf is called. The API is the simplest to implement at the moment, we'll see what kind of hints drivers can pass when there's more than one user of the feature. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell commit 4423fe40b03f32b11e72ecfa03077e702e55d5a9 Author: Michael S. Tsirkin Date: Fri May 20 02:11:05 2011 +0300 virtio_test: support event index Add ability to test the new event idx feature, enable by default. Signed-off-by: Rusty Russell commit 8ea8cf89e19aeb596b818ee5f2bec8a8b0586b60 Author: Michael S. Tsirkin Date: Fri May 20 02:10:54 2011 +0300 vhost: support event index Support the new event index feature. When acked, utilize it to reduce the # of interrupts sent to the guest. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell commit a5c262c5fd83ece01bd649fb08416c501d4c59d7 Author: Michael S. Tsirkin Date: Fri May 20 02:10:44 2011 +0300 virtio_ring: support event idx feature Support for the new event idx feature: 1. When enabling interrupts, publish the current avail index value to the host to get interrupts on the next update. 2. Use the new avail_event feature to reduce the number of exits from the guest. Simple test with the simulator: [virtio]# time ./virtio_test spurious wakeus: 0x7 real 0m0.169s user 0m0.140s sys 0m0.019s [virtio]# time ./virtio_test --no-event-idx spurious wakeus: 0x11 real 0m0.649s user 0m0.295s sys 0m0.335s Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell commit bf7035bf20563a6cadcb9e870406e7b21daf5e30 Author: Michael S. Tsirkin Date: Fri May 20 02:10:27 2011 +0300 virtio ring: inline function to check for events With the new used_event and avail_event and features, both host and guest need similar logic to check whether events are enabled, so it helps to put the common code in the header. Note that Xen has similar logic for notification hold-off in include/xen/interface/io/ring.h with req_event and req_prod corresponding to event_idx + 1 and new_idx respectively. +1 comes from the fact that req_event and req_prod in Xen start at 1, while event index in virtio starts at 0. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell commit 770b31a85e000b0194974922f238a30ade4246b6 Author: Michael S. Tsirkin Date: Fri May 20 02:10:17 2011 +0300 virtio: event index interface Define a new feature bit for the guest and host to utilize an event index (like Xen) instead if a flag bit to enable/disable interrupts and kicks. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell commit a1b383870a28cfbd1657d4922c0fafc634a62ebd Author: Rusty Russell Date: Mon May 30 11:14:13 2011 -0600 virtio: add full three-clause BSD text to headers. It's unclear to me if it's important, but it's obviously causing my technical colleages some headaches and I'd hate such imprecision to slow virtio adoption. I've emailed this to all non-trivial contributors for approval, too. Signed-off-by: Rusty Russell Acked-by: Grant Likely Acked-by: Ryan Harper Acked-by: Anthony Liguori Acked-by: Eric Van Hensbergen Acked-by: john cooper Acked-by: Aneesh Kumar K.V Acked-by: Christian Borntraeger Acked-by: Fernando Luis Vazquez Cao commit bf50e69f63d21091e525185c3ae761412be0ba72 Author: Dave Hansen Date: Thu Apr 7 10:43:25 2011 -0700 virtio balloon: kill tell-host-first logic The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST feature bit. Whenever the bit is set, the guest kernel must always tell the host before we free pages back to the allocator. Without this feature, we might free a page (and have another user touch it) while the hypervisor is unprepared for it. But, if the bit is _not_ set, we are under no obligation to reverse the order; we're under no obligation to do _anything_. As of now, qemu-kvm defines the bit, but doesn't set it. This patch makes the "tell host first" logic the only case. This should make everybody happy, and reduce the amount of untested or untestable code in the kernel. This _also_ means that we don't have to preserve a pfn list after the pages are freed, which should let us get rid of some temporary storage (vb->pfns) eventually. Signed-off-by: Dave Hansen Signed-off-by: Rusty Russell commit 177dbd95637a52b9118aca757d5856ec3995d3e7 Author: Rusty Russell Date: Mon May 30 11:14:13 2011 -0600 virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT. That's already been done by the virtio infrastructure before the probe function is called. Reported-by: alexey.kardashevskiy@au1.ibm.com Acked-by: Amit Shah Tested-by: Amit Shah Signed-off-by: Rusty Russell commit 6917f83ffe5e6b6414ccc845263b792ed201c0f1 Author: Liu Yuan Date: Sun Apr 24 02:49:26 2011 +0800 drivers, block: virtio_blk: Replace cryptic number with the macro It is easier to figure out the context by reading SCSI_SENSE_BUFFERSIZE instead of plain '96'. Signed-off-by: Liu Yuan Signed-off-by: Rusty Russell commit 7a7c924cf03da2a76ea4dc0aac1a788cf95a9c29 Author: Christoph Hellwig Date: Tue Feb 1 21:43:48 2011 +0100 virtio_blk: allow re-reading config space at runtime Wire up the virtio_driver config_changed method to get notified about config changes raised by the host. For now we just re-read the device size to support online resizing of devices, but once we add more attributes that might be changeable they could be added as well. Note that the config_changed method is called from irq context, so we'll have to use the workqueue infrastructure to provide us a proper user context for our changes. Signed-off-by: Christoph Hellwig Signed-off-by: Rusty Russell commit 990c91f0af46c57f0291060d928c7ab82f9d5667 Author: Rusty Russell Date: Mon May 30 11:14:12 2011 -0600 lguest: remove support for VIRTIO_F_NOTIFY_ON_EMPTY. No virtio device does this any more, so no need to clutter lguest with it. Signed-off-by: Rusty Russell commit bc805a03c26e1e25171bc627c6264553d27f746c Author: Rusty Russell Date: Mon May 30 11:14:11 2011 -0600 lguest: fix up compilation after move ed16648eb5b86917f0b90bdcdbc857202da72f90 "Move kvm, uml, and lguest subdirectories" broke the lguest example launcher. Signed-off-by: Rusty Russell commit 15517f7c213442e4d8a098cf0732b237f764c576 Author: Rusty Russell Date: Mon May 30 11:14:08 2011 -0600 lguest: fix timer interrupt setup Without an IRQ chip set, we now get a WARN_ON and no timer interrupt. This prevents booting. Fortunately, the fix is a one-liner: set up the timer IRQ like everything else. Signed-off-by: Rusty Russell Cc: stable@kernel.org # .39.x commit 5988ce239682854d4e632fb58bff000700830394 Author: Namhyung Kim Date: Sat May 28 14:44:46 2011 +0200 nbd: adjust 'max_part' according to part_shift The 'max_part' parameter determines how many partitions are supported on each nbd device. However the actual number can be changed to the power of 2 minus 1 form during the module initialization as alloc_disk() is called with (1 << part_shift) for some reason. So adjust 'max_part' also at least for consistency with loop and brd. It is exported via sysfs already, and a user should check this value after module loading if [s]he wants to use that number correctly (i.e. fdisk or something). Signed-off-by: Namhyung Kim Cc: Laurent Vivier Cc: Paul Clements Signed-off-by: Jens Axboe commit 3b2710824e00d238554c13b5add347e6c701ab1a Author: Namhyung Kim Date: Sat May 28 14:44:46 2011 +0200 nbd: limit module parameters to a sane value The 'max_part' parameter controls the number of maximum partition a nbd device can have. However if a user specifies very large value it would exceed the limitation of device minor number and can cause a kernel oops (or, at least, produce invalid device nodes in some cases). In addition, specifying large 'nbds_max' value causes same problem for the same reason. On my desktop, following command results to the kernel bug: $ sudo modprobe nbd max_part=100000 kernel BUG at /media/Linux_Data/project/linux/fs/sysfs/group.c:65! invalid opcode: 0000 [#1] SMP last sysfs file: /sys/devices/virtual/block/nbd4/range CPU 1 Modules linked in: nbd(+) bridge stp llc kvm_intel kvm asus_atk0110 sg sr_mod cdrom Pid: 2522, comm: modprobe Tainted: G W 2.6.39-leonard+ #159 System manufacturer System Product Name/P5G41TD-M PRO RIP: 0010:[] [] internal_create_group+0x2f/0x166 RSP: 0018:ffff8801009f1de8 EFLAGS: 00010246 RAX: 00000000ffffffef RBX: ffff880103920478 RCX: 00000000000a7bd3 RDX: ffffffff81a2dbe0 RSI: 0000000000000000 RDI: ffff880103920478 RBP: ffff8801009f1e38 R08: ffff880103920468 R09: ffff880103920478 R10: ffff8801009f1de8 R11: ffff88011eccbb68 R12: ffffffff81a2dbe0 R13: ffff880103920468 R14: 0000000000000000 R15: ffff880103920400 FS: 00007f3c49de9700(0000) GS:ffff88011f800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f3b7fe7c000 CR3: 00000000cd58d000 CR4: 00000000000406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process modprobe (pid: 2522, threadinfo ffff8801009f0000, task ffff8801009a93a0) Stack: ffff8801009f1e58 ffffffff812e8f6e ffff8801009f1e58 ffffffff812e7a80 ffff880000000010 ffff880103920400 ffff8801002fd0c0 ffff880103920468 0000000000000011 ffff880103920400 ffff8801009f1e48 ffffffff8115ab6a Call Trace: [] ? device_add+0x4f1/0x5e4 [] ? dev_set_name+0x41/0x43 [] sysfs_create_group+0x13/0x15 [] blk_trace_init_sysfs+0x14/0x16 [] blk_register_queue+0x4c/0xfd [] add_disk+0xe4/0x29c [] nbd_init+0x2ab/0x30d [nbd] [] ? 0xffffffffa007dfff [] do_one_initcall+0x7f/0x13e [] sys_init_module+0xa1/0x1e3 [] system_call_fastpath+0x16/0x1b Code: 41 57 41 56 41 55 41 54 53 48 83 ec 28 0f 1f 44 00 00 48 89 fb 41 89 f6 49 89 d4 48 85 ff 74 0b 85 f6 75 0b 48 83 7f 30 00 75 14 <0f> 0b eb fe b9 ea ff ff ff 48 83 7f 30 00 0f 84 09 01 00 00 49 RIP [] internal_create_group+0x2f/0x166 RSP ---[ end trace 753285ffbf72c57c ]--- Signed-off-by: Namhyung Kim Cc: Laurent Vivier Cc: Paul Clements Cc: stable@kernel.org Signed-off-by: Jens Axboe commit 35fbf5bcf497d6ddbe7b6478141e7526d1474ff5 Author: Namhyung Kim Date: Sat May 28 14:44:46 2011 +0200 nbd: pass MSG_* flags to kernel_recvmsg() Unlike kernel_sendmsg(), kernel_recvmsg() requires passing flags explicitly via last parameter instead of struct msghdr.msg_flags. Therefore calls to sock_xmit(lo, 0, ..., MSG_WAITALL) have not been processed properly by tcp layer wrt. the flag. Fix it. Signed-off-by: Namhyung Kim Cc: Paul Clements Signed-off-by: Jens Axboe commit 6df87e65dbe4528ef07b917af89913abb8caaaba Author: Andreas Gruenbacher Date: Sat May 28 14:44:46 2011 +0200 block: improve the bio_add_page() and bio_add_pc_page() descriptions The descriptions of bio_add_page() and bio_add_pc_page() are slightly inconsistent; improve them. Signed-off-by: Andreas Gruenbacher Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit ff5714cca971848963b87d6b477c16ca8abbaa54 Merge: 174ba50915b0 d90c732122a1 Author: Chris Mason Date: Sat May 28 07:00:39 2011 -0400 Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work into for-linus Conflicts: fs/btrfs/disk-io.c fs/btrfs/extent-tree.c fs/btrfs/free-space-cache.c fs/btrfs/inode.c fs/btrfs/transaction.c Signed-off-by: Chris Mason commit 89e1be50c68eb5e58b873dce87bbac627ee18d1f Author: Steven Rostedt Date: Fri May 27 23:11:24 2011 -0400 x86: Put back -pg to tsc.o and add no GCOV to vread_tsc_64.o The commit 44259b1abfaa8bb819d25d41d71e8e33e25dd36a Author: Andy Lutomirski x86-64: Move vread_tsc into a new file with sensible options Removed the -pg from tsc.o which caused the function graph tracer to go into an infinite function call recursion as it uses the tsc internally outside its recursion protection, thus tracing the tsc breaks the function graph tracer. This commit also added the file vread_tsc_64.c that gets used by vdso but failed to prevent GCOV from monkeying with it, causing userspace to try to access kernel data when GCOV was enabled. Thanks to Thomas Gleixner for pointing out GCOV as the likely culprit that added strange kernel accesses into the vread_tsc() call. Cc: Author: Andy Lutomirski Cc: Thomas Gleixner Signed-off-by: Steven Rostedt commit 11ad2f52826ac6d58d6780d3d8a3e098c88d9142 Merge: c5c177b4aca8 1df85ecec36a Author: John W. Linville Date: Fri May 27 15:18:35 2011 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem commit 1df85ecec36ad5da3f0165760704310d6c03f65f Author: Adrian Chadd Date: Fri May 27 01:08:04 2011 +0800 ath9k: Fix AR9287 calibration The AR9287 calibration code was not being called because of an incorrect MAC revision check. This forced the AR9287 to use the AR9285 initial calibration code and bypass the AR9287 code entirely. Signed-off-by: Adrian Chadd Signed-off-by: John W. Linville commit 64c754ed3b0009e4fa248f739000dc234eb0d2c9 Author: Jesper Juhl Date: Thu May 26 10:53:17 2011 +0200 mac80211: Remove duplicate linux/slab.h include from net/mac80211/scan.c Commit 79f460ca49d8d5700756ab7071c951311c7f29cc add a duplicate linux/slab.h include to net/mac80211/scan.c - remove it. Signed-off-by: Jesper Juhl Acked-by: Luciano Coelho Signed-off-by: John W. Linville commit a331400bf01231253a0d9ab211c83212d2ac4edb Author: Eliad Peller Date: Thu May 26 11:46:37 2011 +0300 mac80211: clear local->ps_data on disassoc local->ps_data wasn't cleared on disassociation, which (in some corner cases) caused reconnections to enter psm before association completed. Signed-off-by: Eliad Peller Signed-off-by: John W. Linville commit 64bd0821a3b66c3307d7a4ee5523e3e35ec2df0e Author: Tao Ma Date: Wed May 25 09:44:05 2011 +0800 wireless: Default to 'n' for 2 new added devices in Kconfig. We make oldconfig every time when a new kernel arrives, but if we don't have such a device(I guess this is the most common case for a new device), the default value should be 'n' so that the kernel size we build doesn't grow up too much quickly. For anyone who has the device, it is OK for them to turn it on by themselves. Cc: "John W. Linville" Cc: Johannes Berg Signed-off-by: Tao Ma Signed-off-by: John W. Linville commit aac11c1b351413aa3412e258e2b2dcba31777209 Author: Stanislaw Gruszka Date: Tue May 24 16:28:55 2011 +0200 iwl4965: fix 5GHz operation rx_status.band is used uninitialized, what disallow to work on 5GHz . Cc: stable@kernel.org # 2.6.39+ Signed-off-by: Stanislaw Gruszka Signed-off-by: John W. Linville commit ea02c63d57d7ec099f66ddb2942b4022e865cd5f Author: Mark Brown Date: Fri May 27 21:56:16 2011 +0800 ASoC: Fix wm_hubs input PGA ZC bits Signed-off-by: Mark Brown Acked-by: Liam Girdwood commit 1007da0604b1d2f064bfecece0f131d57237b03f Author: Stephen Warren Date: Thu May 26 09:57:33 2011 -0600 ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared Commit af46800 ("ASoC: Implement mux control sharing") introduced function dapm_is_shared_kcontrol. When this function returns true, the naming of DAPM controls is derived from the kcontrol_new. Otherwise, the name comes from the widget (and possibly a widget's naming prefix). A bug in the implementation of dapm_is_shared_kcontrol made it return 1 in all cases. Hence, that commit caused a change in control naming for all controls instead of just shared controls. Specifically, a control is always considered shared because it is always compared against itself. Solve this by never comparing against the widget containing the control being created. Equally, controls should never be shared between DAPM contexts; when the same codec is instantiated multiple times, the same kcontrol_new will be used. However, the control should no be shared between the multiple instances. I tested that with the Tegra WM8903 driver: * Shared is now mostly 0 as expected, and sometimes 1. * The expected controls are still generated after this change. However, I don't have any systems that have a widget/control naming prefix, so I can't test that aspect. Thanks for Jarkko Nikula for pointing out how to fix this. Reported-by: Liam Girdwood Tested-by: Jarkko Nikula Signed-off-by: Stephen Warren Acked-by: Liam Girdwood Signed-off-by: Mark Brown commit 1d38c16ce4156f63b45abbd09dd28ca2ef5172b4 Author: Rajkumar Manoharan Date: Fri May 20 17:52:15 2011 +0530 mac80211: stop queues before rate control updation Stop tx queues before updating rate control to ensure proper rate selection. Otherwise packets can be transmitted in 40 Mhz whereas hw is configured in HT20. Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville commit 41e2b05b9598d6bdf91fc20280bfc538d853f769 Author: Rajkumar Manoharan Date: Fri May 20 17:52:14 2011 +0530 ath9k: set 40 Mhz rate only if hw is configured in ht40 Whenever there is a channel width change from 40 Mhz to 20 Mhz, the hardware is reconfigured to ht20. Meantime before doing the rate control updation, the packets are being transmitted are selected rate with IEEE80211_TX_RC_40_MHZ_WIDTH. While transmitting ht40 rate packets in ht20 mode is causing baseband panic with AR9003 based chips. ==== BB update: BB status=0x02001109 ==== ath: ** BB state: wd=1 det=1 rdar=0 rOFDM=1 rCCK=1 tOFDM=0 tCCK=0 agc=2 src=0 ** ath: ** BB WD cntl: cntl1=0xffff0085 cntl2=0x00000004 ** ath: ** BB mode: BB_gen_controls=0x000033c0 ** ath: ** BB busy times: rx_clear=99%, rx_frame=0%, tx_frame=0% ** ath: ==== BB update: done ==== Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville commit 51ac8cbb2176dc159ee910d7074c6796079c3068 Author: Rajkumar Manoharan Date: Fri May 20 17:52:13 2011 +0530 ath9k_hw: disable phy restart on baseband panic caused by RXSM While receiving unsupported rate frame rx state machine gets into a state 0xb and if phy_restart happens in that state, BB would go hang. If RXSM is in 0xb state after first bb panic, ensure to disable the phy_restart. Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville commit a4d86d953b8593791cb29cf2acffd48f9ee6c4f9 Author: Rajkumar Manoharan Date: Fri May 20 17:52:10 2011 +0530 ath9k: Reset chip on baseband hang Resetting hardware helps to recover from baseband hang/panic for AR9003 based chips. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville commit fb23d86382a088d50020fd05024d40af5b00f885 Author: Rafał Miłecki Date: Fri May 20 01:04:46 2011 +0200 b43: N-PHY: initialize last var in calibration function Reported-by: Larry Finger Signed-off-by: Rafał Miłecki Signed-off-by: John W. Linville commit 0019a2c9277bf6d083032a5a9857249e75407a8c Author: Larry Finger Date: Thu May 19 11:48:45 2011 -0500 rtlwifi: Use order 2 RX buffer allocation only if necessary Although a previous fix handles the kernel panics that result from failure to allocate a new RX buffer, memory fragmentation can be reduced if the amsdu_8k capability is disabled as new buffers need only be of O(0), not O(2). Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit a9e12869758430424804dd4332e0d2afdfdf00b0 Author: Larry Finger Date: Thu May 19 10:17:04 2011 -0500 rtlwifi: Fix kernel panic resulting from RX buffer allocation failure To handle amsdu_8k capability, the PCI routine of this driver must allocate receive buffers of order 2. Under heavy load, this causes fragmentation of memory. The present code releases the current buffer before checking to see if a new one is availble. Recovery from allocation failures is not possible, which results in kernel panics. The fix is to reorder the code to check that a new buffer can be allocated before the old one is released. If not possible, the received frame is dropped and the old one is reused. Without this change, it is impossible to transfer a 2 GB file without a kernel panic. Signed-off-by: Larry Finger Cc: Stable [2.6.{37,38,39}] Signed-off-by: John W. Linville commit 208c72f4fe44fe09577e7975ba0e7fa0278f3d03 Author: Luciano Coelho Date: Thu May 19 00:43:38 2011 +0300 nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was causing a buffer overflow when copying the actual SSID to the proper place. This bug has been there since 2.6.29-rc4. Cc: stable@kernel.org Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville commit 21bc7af6e5e684b44725b20f679e701e38ceef15 Author: Yogesh Ashok Powar Date: Wed May 18 12:02:03 2011 -0700 mwifiex: correct event header length While decoding received event packet from firmware, 4 bytes of interface header are already removed unconditionally. So for handling event only 4 more bytes needs to be pulled. This is achieved by changing event header length to 4. Almost all the events, except BA stream related and AMSDU aggregation control events, do not have the payload in their event skb. Such events handling depends only on the event ID. This event ID is the first four bytes of the event skb, which is copied to a separate variable before pulling the skb header. Hence event handling worked only for those events that didn't have payload in event skb. This patch fixes the broken event path of the events with payload in their event skb without harming existing working event path for the events without payload. Signed-off-by: Yogesh Ashok Powar Signed-off-by: Kiran Divekar Signed-off-by: Bing Zhao Signed-off-by: John W. Linville commit 4bff4a7ee4b9e487a1bc1d31082e77b6a381418a Author: Guennadi Liakhovetski Date: Wed May 11 16:51:20 2011 +0000 ARM: arch-shmobile: support SDHI card detection on mackerel, using a GPIO On sh7372 the card-detection pin of SDHI0 can also produce interrupts, when configured as GPIO. Use this feature to power down SDHI0, when no card is plugged in. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt commit dce65a6a92f34fbc425ffb4302f8e747d89c9792 Merge: 4db70f73e569 1c7fcbed1ade Author: Paul Mundt Date: Thu May 26 15:05:21 2011 +0900 Merge branch 'rmobile/fbdev' into rmobile-latest commit 54525552c6ccfd867e819845da14be994e303218 Author: Guennadi Liakhovetski Date: Tue May 24 10:23:59 2011 +0000 sh: mark DMA slave ID 0 as invalid This makes it possible to leave DMA slave IDs in the platform data at default 0 value without hitting DMA channel allocation error paths. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt commit 1c7fcbed1adee44708dafb65ac40b186c203d7e8 Author: Damian Date: Tue May 24 07:01:22 2011 +0000 sh_mobile_meram: MERAM platform data for LCDC Based on the patch by Takanari Hayama Add the necessary platform data to add MERAM functionality to LCDC Includes platform data for both the AP4EVB and mackerel Signed-off-by: Damian Hobson-Garcia Signed-off-by: Paul Mundt commit 7b668357810ecb5fdda4418689d50f5d95aea6a8 Author: Alex Williamson Date: Tue May 24 12:02:41 2011 +0100 intel-iommu: Flush unmaps at domain_exit We typically batch unmaps to be lazily flushed out at regular intervals. When we destroy a domain, we need to force a flush of these lazy unmaps to be sure none reference the domain we're about to free. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=35062 Signed-off-by: Alex Williamson Signed-off-by: David Woodhouse Cc: stable@kernel.org commit b3a530e4e734cab7043a3ab7d135f539042443a7 Author: Jan Kiszka Date: Sun May 15 12:34:55 2011 +0200 intel-iommu: Remove obsolete comment from detect_intel_iommu Since cacd4213d8, this comment no longer applies. Signed-off-by: Jan Kiszka Signed-off-by: David Woodhouse commit b779260b097dec295e8798277ed08ec5ecd3b2c1 Author: Joseph Cihula Date: Tue May 3 00:08:37 2011 -0700 intel-iommu: fix VT-d PMR disable for TXT on S3 resume This patch is a follow on to https://lkml.org/lkml/2011/3/21/239, which was merged as commit 51a63e67da6056c13b5b597dcc9e1b3bd7ceaa55. This patch adds support for S3, as pointed out by Chris Wright. Signed-off-by: Joseph Cihula Signed-off-by: David Woodhouse commit 4e2b1084b0fb79c963b73586815e1ef034dc2b57 Author: Paul Mundt Date: Tue May 24 17:33:51 2011 +0900 sh: Update shmin to reflect PIO dependency. shmin uses __set_io_port_base() for legacy I/O mapping that ethernet and other SuperI/O functions depend on. Ensure that PIO support is built in until the board is updated for MMIO properly. Signed-off-by: Paul Mundt commit 0f0ebd980e0e8a2fd33ab3ef0d5b0cffbcddd8a1 Author: Paul Mundt Date: Tue May 24 17:25:23 2011 +0900 sh: arch/sh/kernel/process_32.c needs linux/prefetch.h. Trivial build fix for certain configurations that don't grab linux/prefetch.h via alternate means (specifically SH-2 and SH-3 parts). Signed-off-by: Paul Mundt commit 52b96c2592e8fdb93231c9644b68112518916a57 Author: Guennadi Liakhovetski Date: Fri Apr 15 18:30:55 2011 +0000 sh: add MMCIF runtime PM support on ecovec Signed-off-by: Guennadi Liakhovetski Cc: Simon Horman Cc: Magnus Damm Signed-off-by: Paul Mundt commit a3793a0d86e2d65dda6beb86fa295be25b238159 Author: Guennadi Liakhovetski Date: Tue Feb 22 09:57:44 2011 +0000 sh: switch ap325rxa to dynamically manage the platform camera Use soc_camera_platform helper functions to dynamically manage the camera device. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt commit d90c732122a1f6d0efe388a8a204f67f144b2eb3 Author: Josef Bacik Date: Tue May 17 09:50:54 2011 -0400 Btrfs: leave spinning on lookup and map the leaf On lookup we only want to read the inode item, so leave the path spinning. Also we're just wholesale reading the leaf off, so map the leaf so we don't do a bunch of kmap/kunmaps. Thanks, Signed-off-by: Josef Bacik commit 207dde8289d9b005b665cb9d8d2bb9464256101d Author: Josef Bacik Date: Fri May 13 14:49:23 2011 -0400 Btrfs: check for duplicate entries in the free space cache If there are duplicate entries in the free space cache, discard the entire cache and load it the old fashioned way. Thanks, Signed-off-by: Josef Bacik commit cca1c81f43e26ab60c0d1090fb90992358d69bdf Author: Josef Bacik Date: Fri May 13 11:07:12 2011 -0400 Btrfs: don't try to allocate from a block group that doesn't have enough space If we have a very large filesystem, we can spend a lot of time in find_free_extent just trying to allocate from empty block groups. So instead check to see if the block group even has enough space for the allocation, and if not go on to the next block group. Signed-off-by: Josef Bacik commit 026fd317828500524cdc7e5ff9e8e7923abb2868 Author: Josef Bacik Date: Fri May 13 10:32:11 2011 -0400 Btrfs: don't always do readahead Our readahead is sort of sloppy, and really isn't always needed. For example if ls is doing a stating ls (which is the default) it's going to stat in non-disk order, so if say you have a directory with a stupid amount of files, readahead is going to do nothing but waste time in the case of doing the stat. Taking the unconditional readahead out made my test go from 57 minutes to 36 minutes. This means that everywhere we do loop through the tree we want to make sure we do set path->reada properly, so I went through and found all of the places where we loop through the path and set reada to 1. Thanks, Signed-off-by: Josef Bacik commit 589d8ade83f07c0f11c8191c0ca309f34d7a2c14 Author: Josef Bacik Date: Wed May 11 17:30:53 2011 -0400 Btrfs: try not to sleep as much when doing slow caching When the fs is super full and we unmount the fs, we could get stuck in this thing where unmount is waiting for the caching kthread to make progress and the caching kthread keeps scheduling because we're in the middle of a commit. So instead just let the caching kthread keep going and only yeild if need_resched(). This makes my horrible umount case go from taking up to 10 minutes to taking less than 20 seconds. Thanks, Signed-off-by: Josef Bacik commit d82a6f1d7e8b61ed5996334d0db66651bb43641d Author: Josef Bacik Date: Wed May 11 15:26:06 2011 -0400 Btrfs: kill BTRFS_I(inode)->block_group Originally this was going to be used as a way to give hints to the allocator, but frankly we can get much better hints elsewhere and it's not even used at all for anything usefull. In addition to be completely useless, when we initialize an inode we try and find a freeish block group to set as the inodes block group, and with a completely full 40gb fs this takes _forever_, so I imagine with say 1tb fs this is just unbearable. So just axe the thing altoghether, we don't need it and it saves us 8 bytes in the inode and saves us 500 microseconds per inode lookup in my testcase. Thanks, Signed-off-by: Josef Bacik commit 7e2355ba1a11649f0b212a29fdb9f47476f1248e Author: Josef Bacik Date: Wed May 11 12:25:37 2011 -0400 Btrfs: don't look at the extent buffer level 3 times in a row We have a bit of debugging in btrfs_search_slot to make sure the level of the cow block is the same as the original block we were cow'ing. I don't think I've ever seen this tripped, so kill it. This saves us 2 kmap's per level in our search. Thanks, Signed-off-by: Josef Bacik commit cb25c2ea6a79702ab7895b873c6c43e0d3bc3c72 Author: Josef Bacik Date: Wed May 11 12:17:34 2011 -0400 Btrfs: map the node block when looking for readahead targets If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent buffer while we look for readahead targets. Thanks, Signed-off-by: Josef Bacik commit af60bed24eb0e3b6d93eaa6bb395a5721e6c09a8 Author: Josef Bacik Date: Wed May 4 11:11:17 2011 -0400 Btrfs: set range_start to the right start in count_range_bits In count_range_bits we are adjusting total_bytes based on the range we are searching for, but we don't adjust the range start according to the range we are searching for, which makes for weird results. For example, if the range [0-8192] is set DELALLOC, but I search for 4096-8192, I will get back 4096 for the number of bytes found, but the range_start will be 0, which makes it look like the range is [0-4096]. So instead set range_start = max(cur_start, state->start). This makes everything come out right. Thanks, Signed-off-by: Josef Bacik commit fcb80c2affd63237cff5b34cba5756be7c976a5a Author: Josef Bacik Date: Tue May 3 10:40:22 2011 -0400 Btrfs: fix how we do space reservation for truncate The ceph guys keep running into problems where we have space reserved in our orphan block rsv when freeing it up. This is because they tend to do snapshots alot, so their truncates tend to use a bunch of space, so when we go to do things like update the inode we have to steal reservation space in order to make the reservation happen. This happens because truncate can use as much space as it freaking feels like, but we still have to hold space for removing the orphan item and updating the inode, which will definitely always happen. So in order to fix this we need to split all of the reservation stuf up. So with this patch we have 1) The orphan block reserve which only holds the space for deleting our orphan item when everything is over. 2) The truncate block reserve which gets allocated and used specifically for the space that the truncate will use on a per truncate basis. 3) The transaction will always have 1 item's worth of data reserved so we can update the inode normally. Hopefully this will make the ceph problem go away. Thanks, Signed-off-by: Josef Bacik commit a4abeea41adfa3c143c289045f4625dfaeba2212 Author: Josef Bacik Date: Mon Apr 11 17:25:13 2011 -0400 Btrfs: kill trans_mutex We use trans_mutex for lots of things, here's a basic list 1) To serialize trans_handles joining the currently running transaction 2) To make sure that no new trans handles are started while we are committing 3) To protect the dead_roots list and the transaction lists Really the serializing trans_handles joining is not too hard, and can really get bogged down in acquiring a reference to the transaction. So replace the trans_mutex with a trans_lock spinlock and use it to do the following 1) Protect fs_info->running_transaction. All trans handles have to do is check this, and then take a reference of the transaction and keep on going. 2) Protect the fs_info->trans_list. This doesn't get used too much, basically it just holds the current transactions, which will usually just be the currently committing transaction and the currently running transaction at most. 3) Protect the dead roots list. This is only ever processed by splicing the list so this is relatively simple. 4) Protect the fs_info->reloc_ctl stuff. This is very lightweight and was using the trans_mutex before, so this is a pretty straightforward change. 5) Protect fs_info->no_trans_join. Because we don't hold the trans_lock over the entirety of the commit we need to have a way to block new people from creating a new transaction while we're doing our work. So we set no_trans_join and in join_transaction we test to see if that is set, and if it is we do a wait_on_commit. 6) Make the transaction use count atomic so we don't need to take locks to modify it when we're dropping references. 7) Add a commit_lock to the transaction to make sure multiple people trying to commit the same transaction don't race and commit at the same time. 8) Make open_ioctl_trans an atomic so we don't have to take any locks for ioctl trans. I have tested this with xfstests, but obviously it is a pretty hairy change so lots of testing is greatly appreciated. Thanks, Signed-off-by: Josef Bacik commit 2a1eb4614d984d5cd4c928784e9afcf5c07f93be Author: Josef Bacik Date: Wed Apr 13 15:15:59 2011 -0400 Btrfs: if we've already started a trans handle, use that one We currently track trans handles in current->journal_info, but we don't actually use it. This patch fixes it. This will cover the case where we have multiple people starting transactions down the call chain. This keeps us from having to allocate a new handle and all of that, we just increase the use count of the current handle, save the old block_rsv, and return. I tested this with xfstests and it worked out fine. Thanks, Signed-off-by: Josef Bacik commit 7a7eaa40a39bde4eefc91aadeb1ce3dc4e6a1252 Author: Josef Bacik Date: Wed Apr 13 12:54:33 2011 -0400 Btrfs: take away the num_items argument from btrfs_join_transaction I keep forgetting that btrfs_join_transaction() just ignores the num_items argument, which leads me to sending pointless patches and looking stupid :). So just kill the num_items argument from btrfs_join_transaction and btrfs_start_ioctl_transaction, since neither of them use it. Thanks, Signed-off-by: Josef Bacik commit 74b2107543da4ed9607ec484f63c42362dc9fca6 Author: Josef Bacik Date: Wed Apr 13 12:02:53 2011 -0400 Btrfs: make sure to use the delalloc reserve when filling delalloc In the prealloc filling code and compressed code we don't set trans->block_rsv to the delalloc block reserve properly, which is going to make us use metadata from the wrong pool, this patch fixes that. Thanks, Signed-off-by: Josef Bacik