commit 6d6a4961a8c4092d826bbabfb031cf49db7b7f94 Author: Greg Kroah-Hartman Date: Thu Sep 24 08:50:31 2009 -0700 Linux 2.6.27.35 commit 820d89b84acdc45a3ab6c37de66f6c444106d9e6 Author: Wei Yongjun Date: Fri Sep 11 18:45:47 2009 -0400 nfsd: fix hung up of nfs client while sync write data to nfs server commit a0d24b295aed7a9daf4ca36bd4784e4d40f82303 upstream. nfsd: fix hung up of nfs client while sync write data to nfs server Commit 'Short write in nfsd becomes a full write to the client' (31dec2538e45e9fff2007ea1f4c6bae9f78db724) broken the sync write. With the following commands to reproduce: $ mount -t nfs -o sync 192.168.0.21:/nfsroot /mnt $ cd /mnt $ echo aaaa > temp.txt Then nfs client is hung up. In SYNC mode the server alaways return the write count 0 to the client. This is because the value of host_err in nfsd_vfs_write() will be overwrite in SYNC mode by 'host_err=nfsd_sync(file);', and then we return host_err(which is now 0) as write count. This patch fixed the problem. Signed-off-by: Wei Yongjun Signed-off-by: J. Bruce Fields Cc: Chuck Ebbert Signed-off-by: Greg Kroah-Hartman commit 25151810b6566162d07be68a9d3d9381a7c83de1 Author: David Shaw Date: Fri Sep 11 18:44:45 2009 -0400 Short write in nfsd becomes a full write to the client commit 31dec2538e45e9fff2007ea1f4c6bae9f78db724 upstream. Short write in nfsd becomes a full write to the client If a filesystem being written to via NFS returns a short write count (as opposed to an error) to nfsd, nfsd treats that as a success for the entire write, rather than the short count that actually succeeded. For example, given a 8192 byte write, if the underlying filesystem only writes 4096 bytes, nfsd will ack back to the nfs client that all 8192 bytes were written. The nfs client does have retry logic for short writes, but this is never called as the client is told the complete write succeeded. There are probably other ways it could happen, but in my case it happened with a fuse (filesystem in userspace) filesystem which can rather easily have a partial write. Here is a patch to properly return the short write count to the client. Signed-off-by: David Shaw Signed-off-by: J. Bruce Fields Cc: Chuck Ebbert Signed-off-by: Greg Kroah-Hartman commit 4e109e60b67459bd46e796d25373fe850f75b9f3 Author: Clemens Ladisch Date: Mon Sep 7 10:18:54 2009 +0200 sound: oxygen: work around MCE when changing volume commit f1bc07af9a9edc5c1d4bdd971f7099316ed2e405 upstream. When the volume is changed continuously (e.g., when the user drags a volume slider with the mouse), the driver does lots of I2C writes. Apparently, the sound chip can get confused when we poll the I2C status register too much, and fails to complete a read from it. On the PCI-E models, the PCI-E/PCI bridge gets upset by this and generates a machine check exception. To avoid this, this patch replaces the polling with an unconditional wait that is guaranteed to be long enough. Signed-off-by: Clemens Ladisch Tested-by: Johann Messner Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman commit 4b8111914e3a91b2022610b62178c9f69ac16cc8 Author: Brian King Date: Fri Aug 28 12:06:29 2009 +0000 powerpc/pseries: Fix to handle slb resize across migration commit 46db2f86a3b2a94e0b33e0b4548fb7b7b6bdff66 upstream. The SLB can change sizes across a live migration, which was not being handled, resulting in possible machine crashes during migration if migrating to a machine which has a smaller max SLB size than the source machine. Fix this by first reducing the SLB size to the minimum possible value, which is 32, prior to migration. Then during the device tree update which occurs after migration, we make the call to ensure the SLB gets updated. Also add the slb_size to the lparcfg output so that the migration tools can check to make sure the kernel has this capability before allowing migration in scenarios where the SLB size will change. BenH: Fixed #include -> to avoid breaking ppc32 build Signed-off-by: Brian King Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman commit 8dee92cc72924326b360e06f08b05d79e9833c3c Author: Tejun Heo Date: Sun Aug 16 21:21:21 2009 +0900 libata: fix off-by-one error in ata_tf_read_block() commit ac8672ea922bde59acf50eaa1eaa1640a6395fd2 upstream. ata_tf_read_block() has off-by-one error when converting CHS address to LBA. The bug isn't very visible because ata_tf_read_block() is used only when generating sense data for a failed RW command and CHS addressing isn't used too often these days. This problem was spotted by Atsushi Nemoto. Signed-off-by: Tejun Heo Reported-by: Atsushi Nemoto Signed-off-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman commit 40871a7698c984d211ed86007df949677d6d2a51 Author: Sophie Hamilton Date: Tue Sep 8 10:58:42 2009 +0200 ALSA: cs46xx - Fix minimum period size commit 6148b130eb84edc76e4fa88da1877b27be6c2f06 upstream. Fix minimum period size for cs46xx cards. This fixes a problem in the case where neither a period size nor a buffer size is passed to ALSA; this is the case in Audacious, OpenAL, and others. Signed-off-by: Sophie Hamilton Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman commit ce6e6c3fd056731a213c9c6cce0c46e36fd2c644 Author: Jan Kara Date: Thu Jun 18 12:33:16 2009 +0200 udf: Use device size when drive reported bogus number of written blocks commit 24a5d59f3477bcff4c069ff4d0ca9a3e037d0235 upstream. Some drives report 0 as the number of written blocks when there are some blocks recorded. Use device size in such case so that we can automagically mount such media. Signed-off-by: Jan Kara Signed-off-by: Greg Kroah-Hartman commit 1c27e4044eabce1fd6aa27d7178c7a07811d6f16 Author: Jason Gunthorpe Date: Wed Sep 9 17:22:18 2009 -0600 TPM: Fixup boot probe timeout for tpm_tis driver commit ec57935837a78f9661125b08a5d08b697568e040 upstream. When probing the device in tpm_tis_init the call request_locality uses timeout_a, which wasn't being initalized until after request_locality. This results in request_locality falsely timing out if the chip is still starting. Move the initialization to before request_locality. This probably only matters for embedded cases (ie mine), a BIOS likely gets the TPM into a state where this code path isn't necessary. Signed-off-by: Jason Gunthorpe Acked-by: Rajiv Andrade Signed-off-by: James Morris Signed-off-by: Greg Kroah-Hartman commit 30a864e5edc5e3cd001cb1194eea87695ef7f29d Author: Geoff Levand Date: Wed Sep 9 13:28:05 2009 +0000 powerpc/ps3: Workaround for flash memory I/O error commit bc00351edd5c1b84d48c3fdca740fedfce4ae6ce upstream. A workaround for flash memory I/O errors when the PS3 internal hard disk has not been formatted for OtherOS use. This error condition mainly effects 'Live CD' users who have not formatted the PS3's internal hard disk for OtherOS. Fixes errors similar to these when using the ps3-flash-util or ps3-boot-game-os programs: ps3flash read failed 0x2050000 os_area_header_read: read error: os_area_header: Input/output error main:627: os_area_read_hp error. ERROR: can't change boot flag Signed-off-by: Geoff Levand Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman commit a59ccf4c9f2bb4eaead0da39812fa496431829df Author: Roland McGrath Date: Tue Sep 8 19:49:40 2009 -0700 binfmt_elf: fix PT_INTERP bss handling commit 9f0ab4a3f0fdb1ff404d150618ace2fa069bb2e1 upstream. In fs/binfmt_elf.c, load_elf_interp() calls padzero() for .bss even if the PT_LOAD has no PROT_WRITE and no .bss. This generates EFAULT. Here is a small test case. (Yes, there are other, useful PT_INTERP which have only .text and no .data/.bss.) ----- ptinterp.S _start: .globl _start nop int3 ----- $ gcc -m32 -nostartfiles -nostdlib -o ptinterp ptinterp.S $ gcc -m32 -Wl,--dynamic-linker=ptinterp -o hello hello.c $ ./hello Segmentation fault # during execve() itself After applying the patch: $ ./hello Trace trap # user-mode execution after execve() finishes If the ELF headers are actually self-inconsistent, then dying is fine. But having no PROT_WRITE segment is perfectly normal and correct if there is no segment with p_memsz > p_filesz (i.e. bss). John Reiser suggested checking for PROT_WRITE in the bss logic. I think it makes most sense to simply apply the bss logic only when there is bss. This patch looks less trivial than it is due to some reindentation. It just moves the "if (last_bss > elf_bss) {" test up to include the partial-page bss logic as well as the more-pages bss logic. Reported-by: John Reiser Signed-off-by: Roland McGrath Signed-off-by: James Morris Signed-off-by: Greg Kroah-Hartman