commit 96534f0011bcf6838b445031096a25f63b28c1d5 Author: Greg Kroah-Hartman Date: Sat Jan 24 16:36:45 2009 -0800 Linux 2.6.27.13 commit e2a60f48bfd758fc85afbd278950e989a9814a50 Author: Nick Piggin Date: Tue Jan 6 14:40:26 2009 -0800 fs: sys_sync fix commit 856bf4d717feb8c55d4e2f817b71ebb70cfbc67b upstream. s_syncing livelock avoidance was breaking data integrity guarantee of sys_sync, by allowing sys_sync to skip writing or waiting for superblocks if there is a concurrent sys_sync happening. This livelock avoidance is much less important now that we don't have the get_super_to_sync() call after every sb that we sync. This was replaced by __put_super_and_need_restart. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 229dfbd9fb66befda9abbc7fd58bb0cafcd4d0d7 Author: Nick Piggin Date: Tue Jan 6 14:40:25 2009 -0800 fs: sync_sb_inodes fix commit 38f21977663126fef53f5585e7f1653d8ebe55c4 upstream. Fix data integrity semantics required by sys_sync, by iterating over all inodes and waiting for any writeback pages after the initial writeout. Comments explain the exact problem. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit c672968cbc58367272e02bfef9647b3a215cc6c4 Author: Nick Piggin Date: Tue Jan 6 14:40:25 2009 -0800 fs: remove WB_SYNC_HOLD commit 4f5a99d64c17470a784a6c68064207d82e3e74a5 upstream. Remove WB_SYNC_HOLD. The primary motiviation is the design of my anti-starvation code for fsync. It requires taking an inode lock over the sync operation, so we could run into lock ordering problems with multiple inodes. It is possible to take a single global lock to solve the ordering problem, but then that would prevent a future nice implementation of "sync multiple inodes" based on lock order via inode address. Seems like a backward step to remove this, but actually it is busted anyway: we can't use the inode lists for data integrity wait: an inode can be taken off the dirty lists but still be under writeback. In order to satisfy data integrity semantics, we should wait for it to finish writeback, but if we only search the dirty lists, we'll miss it. It would be possible to have a "writeback" list, for sys_sync, I suppose. But why complicate things by prematurely optimise? For unmounting, we could avoid the "livelock avoidance" code, which would be easier, but again premature IMO. Fixing the existing data integrity problem will come next. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 2bfdd01129aa5dc52939a9d6ba8012c27ed9f5fa Author: Nick Piggin Date: Tue Jan 6 14:40:22 2009 -0800 mm: direct IO starvation improvement commit 48b47c561e41525061b5bc0cfd67d6367fd11dc4 upstream. Direct IO can invalidate and sync a lot of pagecache pages in the mapping. A 4K direct IO will actually try to sync and/or invalidate the pagecache of the entire file, for example (which might be many GB or TB large). Improve this by doing range syncs. Also, memory no longer has to be unmapped to catch the dirty bits for syncing, as dirty bits would remain coherent due to dirty mmap accounting. This fixes the immediate DM deadlocks when doing direct IO reads to block device with a mounted filesystem, if only by papering over the problem somewhat rather than addressing the fsync starvation cases. Signed-off-by: Nick Piggin Reviewed-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit ebf8d00d3ffadbba82ea19f9c6e273c8fb09c8a8 Author: Nick Piggin Date: Tue Jan 6 14:39:12 2009 -0800 mm: do_sync_mapping_range integrity fix commit ee53a891f47444c53318b98dac947ede963db400 upstream. Chris Mason notices do_sync_mapping_range didn't actually ask for data integrity writeout. Unfortunately, it is advertised as being usable for data integrity operations. This is a data integrity bug. Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 7cef443310ed7e6317b19b94628c968aa210ce17 Author: Andrew Morton Date: Tue Jan 6 14:39:11 2009 -0800 mm: write_cache_pages more terminate quickly commit 82fd1a9a8ced9607312b54859572bcc6211e8919 upstream. Now that we have the early-termination logic in place, it makes sense to bail out early in all other cases where done is set to 1. Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit e55e8f16723d5017aff16547e259e2c35766e4ad Author: Nick Piggin Date: Tue Jan 6 14:39:11 2009 -0800 mm: write_cache_pages terminate quickly commit d5482cdf8a0aacb1e6468a97d5544f5829c8d8c4 upstream. Terminate the write_cache_pages loop upon encountering the first page past end, without locking the page. Pages cannot have their index change when we have a reference on them (truncate, eg truncate_inode_pages_range performs the same check without the page lock). Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 65cdf4090b2a70726bed638e7c41bb3f952d0076 Author: Nick Piggin Date: Tue Jan 6 14:39:10 2009 -0800 mm: write_cache_pages optimise page cleaning commit 515f4a037fb9ab736f8bad733fcd2ffd350cf265 upstream. In write_cache_pages, if we get stuck behind another process that is cleaning pages, we will be forced to wait for them to finish, then perform our own writeout (if it was redirtied during the long wait), then wait for that. If a page under writeout is still clean, we can skip waiting for it (if we're part of a data integrity sync, we'll be waiting for all writeout pages afterwards, so we'll still be waiting for the other guy's write that's cleaned the page). Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit cb0083692dfdd1a33b538b093f5e35b3802b41ef Author: Nick Piggin Date: Tue Jan 6 14:39:09 2009 -0800 mm: write_cache_pages cleanups commit 5a3d5c9813db56a75934eb1015367fda23a8b0b4 upstream. Get rid of some complex expressions from flow control statements, add a comment, remove some duplicate code. Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 006333c0e94602d992c087a4a93ce6e53f1af0e9 Author: Nick Piggin Date: Tue Jan 6 14:39:08 2009 -0800 mm: write_cache_pages integrity fix commit 05fe478dd04e02fa230c305ab9b5616669821dd3 upstream. In write_cache_pages, nr_to_write is heeded even for data-integrity syncs, so the function will return success after writing out nr_to_write pages, even if that was not sufficient to guarantee data integrity. The callers tend to set it to values that could break data interity semantics easily in practice. For example, nr_to_write can be set to mapping->nr_pages * 2, however if a file has a single, dirty page, then fsync is called, subsequent pages might be concurrently added and dirtied, then write_cache_pages might writeout two of these newly dirty pages, while not writing out the old page that should have been written out. Fix this by ignoring nr_to_write if it is a data integrity sync. This is a data integrity bug. The reason this has been done in the past is to avoid stalling sync operations behind page dirtiers. "If a file has one dirty page at offset 1000000000000000 then someone does an fsync() and someone else gets in first and starts madly writing pages at offset 0, we want to write that page at 1000000000000000. Somehow." What we do today is return success after an arbitrary amount of pages are written, whether or not we have provided the data-integrity semantics that the caller has asked for. Even this doesn't actually fix all stall cases completely: in the above situation, if the file has a huge number of pages in pagecache (but not dirty), then mapping->nrpages is going to be huge, even if pages are being dirtied. This change does indeed make the possibility of long stalls lager, and that's not a good thing, but lying about data integrity is even worse. We have to either perform the sync, or return -ELINUXISLAME so at least the caller knows what has happened. There are subsequent competing approaches in the works to solve the stall problems properly, without compromising data integrity. Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit c53e887db7e2520d2f0f8cd7794cf90b3f553823 Author: Nick Piggin Date: Tue Jan 6 14:39:06 2009 -0800 mm: write_cache_pages writepage error fix commit 00266770b8b3a6a77f896ca501a0613739086832 upstream. In write_cache_pages, if ret signals a real error, but we still have some pages left in the pagevec, done would be set to 1, but the remaining pages would continue to be processed and ret will be overwritten in the process. It could easily be overwritten with success, and thus success will be returned even if there is an error. Thus the caller is told all writes succeeded, wheras in reality some did not. Fix this by bailing immediately if there is an error, and retaining the first error code. This is a data integrity bug. Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit b37c30215d093eb5b3a1f23b7d46cbda8e120a4b Author: Nick Piggin Date: Tue Jan 6 14:39:06 2009 -0800 mm: write_cache_pages early loop termination commit bd19e012f6fd3b7309689165ea865cbb7bb88c1e upstream. We'd like to break out of the loop early in many situations, however the existing code has been setting mapping->writeback_index past the final page in the pagevec lookup for cyclic writeback. This is a problem if we don't process all pages up to the final page. Currently the code mostly keeps writeback_index reasonable and hacked around this by not breaking out of the loop or writing pages outside the range in these cases. Keep track of a real "done index" that enables us to terminate the loop in a much more flexible manner. Needed by the subsequent patch to preserve writepage errors, and then further patches to break out of the loop early for other reasons. However there are no functional changes with this patch alone. Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit c1496489b4fd832ca61bb17a33dfaaa0123abbcb Author: Nick Piggin Date: Tue Jan 6 14:39:04 2009 -0800 mm: write_cache_pages cyclic fix commit 31a12666d8f0c22235297e1c1575f82061480029 upstream. In write_cache_pages, scanned == 1 is supposed to mean that cyclic writeback has circled through zero, thus we should not circle again. However it gets set to 1 after the first successful pagevec lookup. This leads to cases where not enough data gets written. Counterexample: file with first 10 pages dirty, writeback_index == 5, nr_to_write == 10. Then the 5 last pages will be found, and scanned will be set to 1, after writing those out, we will not cycle back to get the first 5. Rework this logic, now we'll always cycle unless we started off from index 0. When cycling, only write out as far as 1 page before the start page from the first cycle (so we don't write parts of the file twice). Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 78dfe05e77805f2eb41d0a3f6889f203195fd5c4 Author: Dave Kleikamp Date: Wed Jan 14 09:09:34 2009 +0000 powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices commit 9ba0fdbfaed2e74005d87fab948c5522b86ff733 upstream. powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices The subpage_prot syscall fails on second and subsequent calls for a given region, because is_hugepage_only_range() is mis-identifying the 4 kB slices when the process has a 64 kB page size. Signed-off-by: Dave Kleikamp Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman commit 974240e865a9ec89e62119e196518d1c185a6513 Author: Alistair John Strachan Date: Thu Jan 15 22:27:48 2009 +0100 hwmon: (abituguru3) Fix CONFIG_DMI=n fallback to probe commit 46a5f173fc88ffc22651162033696d8a9fbcdc5c upstream. When CONFIG_DMI is not enabled, dmi detection should flag that no board could be detected (err=1) rather than another error condition (err<0). This fixes the fallback to manual probing for all motherboards, even those without DMI strings, when CONFIG_DMI=n. Signed-off-by: Alistair John Strachan Cc: Hans de Goede Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit a8a427bc34762c13bb5c5fc7fe3d6cf75ebdc07a Author: Pavel Roskin Date: Sat Jan 17 13:33:03 2009 -0500 dell_rbu: use scnprintf() instead of less secure sprintf() commit 81156928f8fe31621e467490b9d441c0285998c3 upstream. Reading 0 bytes from /sys/devices/platform/dell_rbu/image_type or /sys/devices/platform/dell_rbu/packet_size by an ordinary user causes an oops. Signed-off-by: Pavel Roskin Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit e010592315ae5e33758e2e54afdd354ea77f4e62 Author: Luis R. Rodriguez Date: Tue Jan 20 11:42:43 2009 -0800 ath9k: quiet harmless ForceXPAon messages This is a port of one line of upstream patch f1dc56003b23d2d5bb5a756de6b1633a76c9e697 The "ForceXPAon" messages on ath9k were not meant to be printed regularly, lets quiet them as this can happen quite frequently (scans) and will fill the logs with tons of these messages. Signed-off-by: Sujith Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman commit 402e47373a8531ac52bc685f3cd4c97cac2117c3 Author: Jean Delvare Date: Sun Oct 26 17:04:39 2008 +0100 hwmon-vid: Add support for AMD family 10h CPUs commit 1b871826b3dfcdcd78140d17c00e452eec6c12a4 upstream. The AMD family 10h CPUs use the same VID decoding table as the family 0Fh CPUs. Signed-off-by: Jean Delvare Cc: Rudolf Marek Signed-off-by: Greg Kroah-Hartman commit 474f010c78f1d28555971937c1e61688823cb4d1 Author: Roman Zippel Date: Wed Aug 20 16:37:28 2008 -0700 clocksource: introduce clocksource_forward_now() commit 9a055117d3d9cb562f83f8d4cd88772761f4cab0 upstream. To keep the raw monotonic patch simple first introduce clocksource_forward_now(), which takes care of the offset since the last update_wall_time() call and adds it to the clock, so there is no need anymore to deal with it explicitly at various places, which need to make significant changes to the clock. This is also gets rid of the timekeeping_suspend_nsecs, instead of waiting until resume, the value is accumulated during suspend. In the end there is only a single user of __get_nsec_offset() left, so I integrated it back to getnstimeofday(). Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman commit deee735544d5b34ad4a42ac19abacbfa4d9493f1 Author: Dean Nelson Date: Thu Jan 15 13:50:57 2009 -0800 sgi-xp: eliminate false detection of no heartbeat commit 158bc69effbf96f59c01cdeb20f8d4c184e59f8e upstream. After XPC has been up and running on multiple partitions for any length of time, if XPC on one of the partitions is stopped and restarted (either by a rmmod/insmod or a system restart), it is possible for the XPCs running on the other partitions to falsely detect a lack of heartbeat from the XPC that was just restarted. This false detection will occur if the restarted XPC comes up within the five-seconds preceding one of the other XPC's heartbeat check (which occurs once every twenty seconds). The detection of no heartbeat results in the detecting XPC deactivating from the just restarted XPC. The only remedy is to restart one of the XPCs and hope that one doesn't hit this five-second window on any of the other partitions. Signed-off-by: Dean Nelson Signed-off-by: Robin Holt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 0c48c3bf5fb4dc6b0c3f5691acf11e4839bc115e Author: Vegard Nossum Date: Sat Jan 17 17:45:45 2009 +0100 security: introduce missing kfree commit 0d54ee1c7850a954026deec4cd4885f331da35cc upstream. Plug this leak. Acked-by: David Howells Cc: James Morris Signed-off-by: Vegard Nossum Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 8d8099f25038813c76441974d60b6130635b964b Author: Stefan Lippers-Hollmann Date: Sun Jan 4 01:10:49 2009 +0100 rt2x00: add USB ID for the Linksys WUSB200. commit 3be36ae223271f9c2cfbe7406846c8fdcd2f50c3 upstream. add USB ID for the Linksys WUSB200 Wireless-G Business USB Adapter to rt73usb. Signed-off-by: Stefan Lippers-Hollmann Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman commit d2da924fad2d44f5b0be87f9b7edc791e347de7c Author: Shaohua Li Date: Fri Dec 19 09:27:42 2008 +0800 PCI: keep ASPM link state consistent throughout PCIe hierarchy commit 46bbdfa44cfc0d352148a0dc33ba9f6db02ccdf0 upstream. In a PCIe hierarchy with a switch present, if the link state of an endpoint device is changed, we must check the whole hierarchy from the endpoint device to root port, and for each link in the hierarchy, the new link state should be configured. Previously, the implementation checked the state but forgot to configure the links between root port to switch. Fixes Novell bz #448987. Signed-off-by: Shaohua Li Tested-by: Andrew Patterson Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman commit d10bdc828883501523caefe55eaf0f9f183b197b Author: Michiel Date: Sun Jan 4 17:22:28 2009 -0600 p54usb: Add USB ID for Thomson Speedtouch 121g commit 878e6a432f85690a2c0d88d96f177e54ff1d4a57 upstream. Add the USB ID for Thomson Speedtouch 121g to p54usb. Signed-off-by: Michiel Signed-off-by: Larry Finger Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman commit 8576a5cb0ae831f4aca583674c36f4442646f7d9 Author: Andrew Morton Date: Thu Jan 15 13:51:21 2009 -0800 lib/idr.c: use kmem_cache_zalloc() for the idr_layer cache commit 5b019e99016f3a692ba45bf68fba73a402d7c01a upstream. David points out that the idr_remove_all() function returns unused slabs to the kmem cache, but needs to zero them first or else they will be uninitialized upon next use. This causes crashes which have been observed in the firewire subsystem. He fixed this by zeroing the object before freeing it in idr_remove_all(). But we agree that simply removing the constructor and zeroing the object at allocation time is simpler than relying upon slab constructor machinery and might even be faster. This problem was introduced by "idr: make idr_remove rcu-safe" (commit cf481c20c476ad2c0febdace9ce23f5a4db19582), which was first released in 2.6.27. There are no known codesites which trigger this bug in 2.6.27 or 2.6.28. The post-2.6.28 firewire changes are the only known triggerer. There might of course be not-yet-discovered triggerers in 2.6.27 and 2.6.28, and there might be out-of-tree triggerers which are added to those kernel versions. I'll let the -stable guys decide whether they want to backport this fix. Reported-by: David Moore Cc: Stefan Richter Cc: Nadia Derbey Cc: Paul E. McKenney Cc: Manfred Spraul Cc: Kristian Hgsberg Acked-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 0cbb746bbeca35376d6ab56196271a827fadf55e Author: Sukadev Bhattiprolu Date: Wed Oct 29 14:01:11 2008 -0700 'kill sig -1' must only apply to caller's namespace commit d25141a818383b3c3b09f065698c544a7a0ec6e7 upstream. Currently "kill -1" kills processes in all namespaces and breaks the isolation of namespaces. Earlier attempt to fix this was discussed at: http://lkml.org/lkml/2008/7/23/148 As suggested by Oleg Nesterov in that thread, use "task_pid_vnr() > 1" check since task_pid_vnr() returns 0 if process is outside the caller's namespace. Signed-off-by: Sukadev Bhattiprolu Acked-by: Eric W. Biederman Tested-by: Daniel Hokka Zakrisson Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit e377565b19b465b307c7924438b768517dab8a6a Author: Tony Luck Date: Thu Jan 15 10:29:17 2009 -0800 IA64: Turn on CONFIG_HAVE_UNSTABLE_CLOCK commit 0773a6cf673316440999752e23f8c3d4f85e48b9 upstream. sched_clock() on ia64 is based on ar.itc, so is never completely synchronized between cpus. On some platforms (e.g. certain models of SGI Altix) it may be running at radically different frequencies. Based on a patch from Dimitri Sivanich which set this just for SN2 && GENERIC kernels ... it is needed for all ia64 machines. Signed-off-by: Tony Luck Signed-off-by: Greg Kroah-Hartman commit 42e54f6093af41dbb7a9651cab819b05bb9cd808 Author: Jos-Vicente Gilabert Date: Wed Jan 14 20:55:00 2009 -0800 drivers/net/irda/irda-usb.c: fix buffer overflow commit 2950e952920811be465ec95c6b56f03dc66a05c0 upstream. Taken from http://bugzilla.kernel.org/show_bug.cgi?id=12397 We're doing an sprintf of an 11-char string into an 11-char buffer. Whoops. It breaks firmware uploading. Reported-by: Jos-Vicente Gilabert Signed-off-by: Andrew Morton Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 36f0e0ab06053c9d10601bd8387b43ef5a91fb05 Author: Takashi Iwai Date: Fri Nov 21 02:25:48 2008 +0100 ALSA: hda - make laptop-eapd model back for AD1986A commit 1725b82a6e2721612a3572d0336f51f1f1c3cf54 upstream. The changes specific for Samsung laptops seem unapplicable to other hardware models like ASUS. The mic inputs are lost on such hardware by the change 5d5d5f43f1b835c375de9bd270cce030d16e2871. This patch adds back the old laptop-eapd model, and create a new model "samsung" for the new one specific to Samsung laptops with automatic mic selection feature. Reference: kernel bugzilla #12070 http://bugzilla.kernel.org/show_bug.cgi?id=12070 Signed-off-by: Takashi Iwai Cc: Daniel Drake Signed-off-by: Greg Kroah-Hartman commit 1c9698fe73ed65ba3c3e8af91698e596fb857c69 Author: Luke Yelavich Date: Tue Dec 16 12:37:47 2008 +1100 ALSA: hda - Add automatic model setting for Samsung Q45 commit 3e420e78ece6f9d2accc1568e80dfd0501e13df1 upstream. Have the Samsung Q45 (144d:c510) select ALC262_HIPPO by default Reference: Ubuntu bug 200210 http://launchpad.net/bugs/200210 Signed-off-by: Luke Yelavich Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman commit 8b096b5abc03996b7b5078a4939ab25a2d770e27 Author: Alan Stern Date: Tue Jan 20 15:33:55 2009 -0500 usb-storage: set CAPACITY_HEURISTICS flag for bad vendors commit a81a81a25d3ecdab777abca87c5ddf484056103d upstream. This patch (as1194c) makes usb-storage set the CAPACITY_HEURISTICS flag for all devices made by Nokia, Nikon, or Motorola. These companies seem to include the READ CAPACITY bug in all of their devices. Since cell phones and digital cameras rely on flash storage, which always has an even number of sectors, setting CAPACITY_HEURISTICS shouldn't cause any problems. Not even if the companies wise up and start making devices without the bug. A large number of unusual_devs entries are now unnecessary, so the patch removes them. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 1d6abc54fc2878cb0dbca81c880b4cf07ea03ec0 Author: Alan Stern Date: Tue Jan 20 15:33:45 2009 -0500 usb-storage: add last-sector hacks commit 25ff1c316f6a763f1eefe7f8984b2d8c03888432 upstream. This patch (as1189d) adds some hacks to usb-storage for dealing with the growing problems involving bad capacity values and last-sector accesses: A new flag, US_FL_CAPACITY_OK, is created to indicate that the device is known to report its capacity correctly. An unusual_devs entry for Linux's own File-backed Storage Gadget is added with this flag set, since g_file_storage always reports the correct capacity and since the capacity need not be even (it is determined by the size of the backing file). An entry in unusual_devs.h which has only the CAPACITY_OK flag set shouldn't prejudice libusual, since the device will work perfectly well with either usb-storage or ub. So a new macro, COMPLIANT_DEV, is added to let libusual know about these entries. When a last-sector access fails three times in a row and neither the FIX_CAPACITY nor the CAPACITY_OK flag is set, we assume the last-sector bug is present. We replace the existing status and sense data with values that will cause the SCSI core to fail the access immediately rather than retry indefinitely. This should fix the difficulties people have been having with Nokia phones. This version of the patch differs from the version accepted into the mainline only in that it does not trigger a WARN() when an odd-numbered last-sector access succeeds. In a stable kernel series we don't want to go around spamming users' logs and consoles for no good reason. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit d2552605f3b34253754c05ffd84a585514eecc62 Author: Lennert Buytenhek Date: Tue Jan 20 15:25:21 2009 -0800 tcp: don't mask EOF and socket errors on nonblocking splice receive [ Upstream commit: 4f7d54f59bc470f0aaa932f747a95232d7ebf8b1 ] Currently, setting SPLICE_F_NONBLOCK on splice from a TCP socket results in masking of EOF (RDHUP) and error conditions on the socket by an -EAGAIN return. Move the NONBLOCK check in tcp_splice_read() to be after the EOF and error checks to fix this. Signed-off-by: Lennert Buytenhek Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit d83217ac36ce6ed15c852970614371336f26f837 Author: Florian Fainelli Date: Mon Dec 22 19:40:38 2008 -0800 r6040: bump release number to 0.19 [ Upstream commit: 4707470ae7441733822efcd680b0ef3971921c4d ] This patch bumps the release number of the driver. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 2d699e5364e67b9189968103e00cdb7acd98c514 Author: Joe Chou Date: Mon Dec 22 19:40:02 2008 -0800 r6040: save and restore MIER correctly in the interrupt routine [ Upstream commit: 3e7c469f07ff14cbf9a814739e1fc99a863e0943 ] This patch saves the MIER register contents before treating interrupts, then restores them correcty at the end of the interrupt routine. Signed-off-by: Joe Chou Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 0e3ee4452e429811861a5a42f6ba6c33226deff1 Author: Joe Chou Date: Mon Dec 22 19:38:17 2008 -0800 r6040: fix wrong logic in mdio code [ Upstream commit: 11e5e8f5d14a1229706576184d2cf4c4556ed94c ] This patch fixes a reverse logic in the MDIO code. Signed-off-by: Joe Chou Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit c20cba0d08f3c6c10e0181077cca7f1833ffdb6b Author: Jarek Poplawski Date: Tue Jan 20 14:08:23 2009 -0800 pkt_sched: cls_u32: Fix locking in u32_change() [ Upstream commit: 6f57321422e0d359e83c978c2b03db77b967b7d5 ] New nodes are inserted in u32_change() under rtnl_lock() with wmb(), so without tcf_tree_lock() like in other classifiers (e.g. cls_fw). This isn't enough without rmb() on the read side, but on the other hand adding such barriers doesn't give any savings, so the lock is added instead. Reported-by: m0sia Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 82e1a122a1b01eef12fccecde30b7e7fbf4ece0e Author: Wei Yongjun Date: Tue Jan 20 14:08:01 2009 -0800 sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID [ Upstream commit: 9fcb95a105758b81ef0131cd18e2db5149f13e95 ] If FWD-TSN chunk is received with bad stream ID, the sctp will not do the validity check, this may cause memory overflow when overwrite the TSN of the stream ID. The FORWARD-TSN chunk is like this: FORWARD-TSN chunk Type = 192 Flags = 0 Length = 172 NewTSN = 99 Stream = 10000 StreamSequence = 0xFFFF This patch fix this problem by discard the chunk if stream ID is not less than MIS. Signed-off-by: Wei Yongjun Signed-off-by: Vlad Yasevich Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 9c55cc941932c42eebc839feb87e2b9ff1e64a5e Author: Herbert Xu Date: Tue Jan 20 14:06:49 2009 -0800 ipv6: Fix fib6_dump_table walker leak [ Upstream commit: 7891cc818967e186be68caac32d84bfd0a3f0bd2 ] When a fib6 table dump is prematurely ended, we won't unlink its walker from the list. This causes all sorts of grief for other users of the list later. Reported-by: Chris Caputo Signed-off-by: Herbert Xu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 9befaf375925471a49159d775b38d42c04e218a1 Author: Jarek Poplawski Date: Tue Jan 20 14:06:26 2009 -0800 pkt_sched: sch_htb: Fix deadlock in hrtimers triggered by HTB [ Upstream commit: none This is a quick fix for -stable purposes. Upstream fixes these problems via a large set of invasive hrtimer changes. ] Most probably there is a (still unproven) race in hrtimers (before 2.6.29 kernels), which causes a corruption of hrtimers rbtree. This patch doesn't fix it, but should let HTB avoid triggering the bug. Reported-by: Denys Fedoryschenko Reported-by: Badalian Vyacheslav Reported-by: Chris Caputo Tested-by: Badalian Vyacheslav Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman