summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tty: USB hangup is racyAlan Cox2009-10-051-4/+1
| | | | | | | | | | | | | commit d2b391822a11302add9e46476f3da4e18e6de84c upstream. The USB layer uses tty_hangup to deal with unplugs of the physical hardware (analogous to loss of carrier) and then frees the resources. However the tty_hangup is asynchronous. As the hangup can sleep we can use tty_vhangup which is the non async version to avoid freeing resources too early. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: Add a full port_close functionAlan Cox2009-10-052-3/+34
| | | | | | | | | | | | | | | commit 7ca0ff9ab3218ec443a7a9ad247e4650373ed41e upstream. Now we are extracting out methods for shutdown and the like we can add a proper tty_port_close method that knows all the innards of the tty closing process and hides the lot from the caller. At some point in the future this will be paired with a similar open() helper and the drivers can stick to hardware management. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: add new device to bus's list before probingAlan Stern2009-10-053-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | commit 2023c610dc54a4f4130b0494309a9bd668ca3df8 upstream. This patch (as1271) affects when new devices get linked into their bus's list of devices. Currently this happens after probing, and it doesn't happen at all if probing fails. Clearly this is wrong, because at that point quite a few symbolic links have already been created in sysfs. We are committed to adding the device, so it should be linked into the bus's list regardless. In addition, this needs to happen before the uevent announcing the new device gets issued. Otherwise user programs might try to access the device before it has been added to the bus. To fix both these problems, the patch moves the call to klist_add_tail() forward from bus_attach_device() to bus_add_device(). Since bus_attach_device() now does nothing but probe for drivers, it has been renamed to bus_probe_device(). And lastly, the kerneldoc is updated. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ath5k: do not release irq across suspend/resumeBob Copeland2009-10-051-11/+0
| | | | | | | | | | | | | | | commit 0d0cd72fa1e6bfd419c99478ec70b4877ed0ef86 upstream. Paraphrasing Rafael J. Wysocki: "drivers should not release PCI IRQs in suspend." Doing so causes a warning during suspend/resume on some platforms. Cc: Rafael J. Wysocki <rjw@sisk.pl> Reported-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ath5k: Wakeup fixesNick Kossifidis2009-10-054-62/+140
| | | | | | | | | | | | | | | | | commit edd7fc7003f31da48d06e215a93ea966a22c2a03 upstream. * Don't put chip to full sleep because there are problems during wakeup. Instead hold MAC/Baseband on warm reset state via a new function ath5k_hw_on_hold. * Minor cleanups Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Tested-by: Ben Greear <greearb@candelatech.com> Tested-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* netfilter: ebt_ulog: fix checkentry return valuePatrick McHardy2009-10-051-1/+1
| | | | | | | | | | | | | | netfilter: ebt_ulog: fix checkentry return value Upstream commit 8a56df0a: Commit 19eda87 (netfilter: change return types of check functions for Ebtables extensions) broke the ebtables ulog module by missing a return value conversion. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* netfilter: bridge: refcount fixPatrick McHardy2009-10-051-1/+1
| | | | | | | | | | | | | | | | | | | netfilter: bridge: refcount fix Upstream commit f3abc9b9: commit f216f082b2b37c4943f1e7c393e2786648d48f6f ([NETFILTER]: bridge netfilter: deal with martians correctly) added a refcount leak on in_dev. Instead of using in_dev_get(), we can use __in_dev_get_rcu(), as netfilter hooks are running under rcu_read_lock(), as pointed by Patrick. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* netfilter: nf_conntrack: netns fix re reliable conntrack event deliveryPatrick McHardy2009-10-051-3/+3
| | | | | | | | | | | | | | netfilter: nf_conntrack: netns fix re reliable conntrack event delivery Upstream commit ee254fa4: Conntracks in netns other than init_net dying list were never killed. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* netfilter: nf_nat: fix inverted logic for persistent NAT mappingsPatrick McHardy2009-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | netfilter: nf_nat: fix inverted logic for persistent NAT mappings Upstream commit cce5a5c3: Kernel 2.6.30 introduced a patch [1] for the persistent option in the netfilter SNAT target. This is exactly what we need here so I had a quick look at the code and noticed that the patch is wrong. The logic is simply inverted. The patch below fixes this. Also note that because of this the default behavior of the SNAT target has changed since kernel 2.6.30 as it now ignores the destination IP in choosing the source IP for nating (which should only be the case if the persistent option is set). [1] http://git.eu.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=98d500d66cb7940747b424b245fc6a51ecfbf005 Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* perf tools: do not complain if root is owning perf.dataPierre Habouzit2009-10-052-4/+4
| | | | | | | | | | | | | | | | | | | | | commit 119e7a22bb70d84849384e5113792cd45afa4f85 upstream. This improves patch fa6963b24 so that perf.data stuff that has been dumped as root can be read (annotate/report) by a user without the use of the --force. Rationale is that root has plenty of ways to screw us (usually) that do not require twisted schemes involving specially crafting a perf.data. Signed-off-by: Pierre Habouzit <pierre.habouzit@intersec.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090827075902.GF19653@laphroaig.corp> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Fix NULL ptr regression in powernow-k8Kurt Roeckx2009-10-051-8/+9
| | | | | | | | | | | commit f0adb134d8dc9993a9998dc50845ec4f6ff4fadc upstream. Fixes bugzilla #13780 From: Kurt Roeckx <kurt@roeckx.be> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Revert "KVM: x86: check for cr3 validity in ioctl_set_sregs"Marcelo Tosatti2009-10-051-7/+1
| | | | | | | | | | | | | | | | | | | | | (cherry picked from commit dc7e795e3dd2a763e5ceaa1615f307e808cf3932) This reverts commit 6c20e1442bb1c62914bb85b7f4a38973d2a423ba. To my understanding, it became obsolete with the advent of the more robust check in mmu_alloc_roots (89da4ff17f). Moreover, it prevents the conceptually safe pattern 1. set sregs 2. register mem-slots 3. run vcpu by setting a sticky triple fault during step 1. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* KVM: Protect update_cr8_intercept() when running without an apicAvi Kivity2009-10-051-0/+3
| | | | | | | | | | | | (cherry picked from commit 88c808fd42b53a7e01a2ac3253ef31fef74cb5af) update_cr8_intercept() can be triggered from userspace while there is no apic present. Signed-off-by: Avi Kivity <avi@redhat.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* KVM: MMU: fix bogus alloc_mmu_pages assignmentMarcelo Tosatti2009-10-051-8/+0
| | | | | | | | | | | | | | (cherry picked from commit b90c062c65cc8839edfac39778a37a55ca9bda36) Remove the bogus n_free_mmu_pages assignment from alloc_mmu_pages. It breaks accounting of mmu pages, since n_free_mmu_pages is modified but the real number of pages remains the same. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* KVM: MMU: fix missing locking in alloc_mmu_pagesMarcelo Tosatti2009-10-051-0/+2
| | | | | | | | | | | | | | | (cherry picked from commit 6a1ac77110ee3e8d8dfdef8442f3b30b3d83e6a2) n_requested_mmu_pages/n_free_mmu_pages are used by kvm_mmu_change_mmu_pages to calculate the number of pages to zap. alloc_mmu_pages, called from the vcpu initialization path, modifies this variables without proper locking, which can result in a negative value in kvm_mmu_change_mmu_pages (say, with cpu hotplug). Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* KVM: fix cpuid E2BIG handling for extended request typesMark McLoughlin2009-10-051-0/+4
| | | | | | | | | | | | | (cherry picked from commit cb007648de83cf226d69ec76e1c01848b4e8e49f) If we run out of cpuid entries for extended request types we should return -E2BIG, just like we do for the standard request types. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pty_write: don't do a tty_wakeup() when the buffers are fullLinus Torvalds2009-10-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 202c4675c55ddf6b443c7e057d2dff6b42ef71aa upstream. Commit ac89a9174 ("pty: don't limit the writes to 'pty_space()' inside 'pty_write()'") removed the pty_space() checking, in order to let the regular tty buffer code limit the buffering itself. That was all good, but as a subtle side effect it meant that we'd be doing a tty_wakeup() even in the case where the buffers were all filled up, and didn't actually make any progress on the write. Which sounds innocuous, but it interacts very badly with the ppp_async code, which has an infinite loop in ppp_async_push() that tries to push out data to the tty. When we call tty_wakeup(), that loop ends up thinking that progress was made (see the subtle interactions between XMIT_WAKEUP and 'tty_stuffed' for details). End result: one unhappy ppp user. Fixed by noticing when tty_insert_flip_string() didn't actually do anything, and then not doing any more processing (including, very much not calling tty_wakeup()). Bisected-and-tested-by: Peter Volkov <pva@gentoo.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* net: Make the copy length in af_packet sockopt handler unsignedArjan van de Ven2009-10-051-2/+2
| | | | | | | | | | | | | | | | fixed upstream in commit b7058842c940ad2c08dd829b21e5c92ebe3b8758 in a different way The length of the to-copy data structure is currently stored in a signed integer. However many comparisons are done with sizeof(..) which is unsigned. It's more suitable for this variable to be unsigned to make these comparisons more naturally right. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: David S. Miller <davem@davemloft.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* net ax25: Fix signed comparison in the sockopt handlerArjan van de Ven2009-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixed upstream in commit b7058842c940ad2c08dd829b21e5c92ebe3b8758 in a different way The ax25 code tried to use if (optlen < sizeof(int)) return -EINVAL; as a security check against optlen being negative (or zero) in the set socket option. Unfortunately, "sizeof(int)" is an unsigned property, with the result that the whole comparison is done in unsigned, letting negative values slip through. This patch changes this to if (optlen < (int)sizeof(int)) return -EINVAL; so that the comparison is done as signed, and negative values get properly caught. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: David S. Miller <davem@davemloft.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resumePavel Machek2009-10-051-2/+2
| | | | | | | | | | | | | | | | | commit 99f329a2ba3c2d07cc90ca9309babf27ddf98bff upstream. sharpsl_pm.c code tries to read battery state very early during resume, but those battery meters are connected on SPI and that's only resumed way later. Replace the check with simple checking of battery fatal signal, that actually works at this stage. Signed-off-by: Pavel Machek <pavel@ucw.cz> Tested-by: Stanislav Brabec <utx@penguin.cz> Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ahci: restore pci_intx() handlingTejun Heo2009-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | commit 31b239ad1ba7225435e13f5afc47e48eb674c0cc upstream. Commit a5bfc4714b3f01365aef89a92673f2ceb1ccf246 dropped explicit pci_intx() manipulation from ahci because it seemed unnecessary and ahci doesn't seem to be the right place to be tweaking it if it were. This was largely okay but there are exceptions. There was one on an embedded platform which was fixed via firmware and now bko#14124 reports it on a HP DL320. http://bugzilla.kernel.org/show_bug.cgi?id=14124 I still think this isn't something libata drivers should be caring about (the only ones which are calling pci_intx() explicitly are libata ones and one other driver) but for now reverting the change seems to be the right thing to do. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* can: fix NOHZ local_softirq_pending 08 warningOliver Hartkopp2009-10-052-2/+4
| | | | | | | | | | | | | | | | | | | | | | | commit 481a8199142c050b72bff8a1956a49fd0a75bbe0 upstream. When using nanosleep() in an userspace application we get a ratelimit warning NOHZ: local_softirq_pending 08 for 10 times. The echo of CAN frames is done from process context and softirq context only. Therefore the usage of netif_rx() was wrong (for years). This patch replaces netif_rx() with netif_rx_ni() which has to be used from process/softirq context. It also adds a missing comment that can_send() must no be used from hardirq context. Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: Urs Thuermann <urs@isnogud.escape.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* nfsd4: fix null dereference creating nfsv4 callback clientJ. Bruce Fields2009-10-051-2/+2
| | | | | | | | | | | | | | | | | | commit 886e3b7fe6054230c89ae078a09565ed183ecc73 upstream. On setting up the callback to the client, we attempt to use the same authentication flavor the client did. We find an rpc cred to use by calling rpcauth_lookup_credcache(), which assumes that the given authentication flavor has a credentials cache. However, this is not required to be true--in particular, auth_null does not use one. Instead, we should call the auth's lookup_cred() method. Without this, a client attempting to mount using nfsv4 and auth_null triggers a null dereference. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* agp/intel: Fix the pre-9xx chipset flush.Eric Anholt2009-10-053-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | commit e517a5e97080bbe52857bd0d7df9b66602d53c4d upstream. Ever since we enabled GEM, the pre-9xx chipsets (particularly 865) have had serious stability issues. Back in May a wbinvd was added to the DRM to work around much of the problem. Some failure remained -- easily visible by dragging a window around on an X -retro desktop, or by looking at bugzilla. The chipset flush was on the right track -- hitting the right amount of memory, and it appears to be the only way to flush on these chipsets, but the flush page was mapped uncached. As a result, the writes trying to clear the writeback cache ended up bypassing the cache, and not flushing anything! The wbinvd would flush out other writeback data and often cause the data we wanted to get flushed, but not always. By removing the setting of the page to UC and instead just clflushing the data we write to try to flush it, we get the desired behavior with no wbinvd. This exports clflush_cache_range(), which was laying around and happened to basically match the code I was otherwise going to copy from the DRM. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: fix tiling on IGDNGZhenyu Wang2009-10-053-8/+21
| | | | | | | | | | | | | | | | | commit 553bd149bb2de7848b2b84642876f27202421368 upstream. It seems that on IGDNG the same swizzling setup always applys. And front buffer tiling needs to set address swizzle in display arb control too. Fix plane tricle feed setting in v1 which should be disable bit, and always setup address swizzle to let hardware care for buffer tiling in all cases. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/I915: Use the CRT DDC to get the EDID for DVI-connector on MacKeith Packard2009-10-051-22/+74
| | | | | | | | | | | | | | | commit 57cdaf90f5f607eb029356074fefb66c9b1c0659 upstream. mac Mini's have a single DDC line on the DVI connector, shared between the analog link and the digital link. So, if DDC isn't detected on GPIOE (the usual SDVO DDC link), try GPIOA (the usual VGA DDC link) when there isn't a VGA monitor connected. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: Fix LVDS panel fitting on ArrandaleZhenyu Wang2009-10-053-3/+24
| | | | | | | | | | | | | commit 8dd81a381e8886129c0923f1fe22ff5ca36ae8da upstream. Arrandale has new window based method for panel fitting. This one enables full screen aspect scaling on LVDS. It fixes standard mode display failure on LVDS for Arrandale. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: Remove DAC disable in CRT force detect on IGDNGZhenyu Wang2009-10-051-7/+2
| | | | | | | | | | | | | commit 730915d65f9e763de9dc26c5f1b8abaae775b243 upstream. This is not required on newer stepping hardware to get reliable force detect status. Removing this fixes screen blank flicker in CRT detect on IGDNG. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: Fix SSC frequence for IGDNGZhenyu Wang2009-10-051-0/+3
| | | | | | | | | | | | commit 339e5a4c78041cd7b473ddf0a81eb06a131127bb upstream. IGDNG LVDS SSC uses 120Mhz freq. This fixes one 1600x900 LVDS panel black issue on IGDNG with SSC enabled. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: Fix typo for wrong LVDS clock setting on IGDNGZhenyu Wang2009-10-051-1/+1
| | | | | | | | | | | | | commit b09aea7fb38f328c02e9f9b79617cabed02455e4 upstream. New register for PCH LVDS on IGDNG should be used. This is a copy-n-paste typo. This fixes possible dual channel LVDS panel failure on IGDNG. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: Check that the relocation points to within the targetChris Wilson2009-10-051-0/+10
| | | | | | | | | | | | | | | commit cd0b9fb400ba775737bdc3874c4cbee4047e66d8 upstream. Eric noted a potential concern with the low bits not being strictly used as part of the absolute offset (instead part of the command stream to the GPU), but in practice that should not be an issue. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Andy Whitcroft <apw@canonical.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: Add buffer to inactive list immediately during faultChris Wilson2009-10-051-2/+1
| | | | | | | | | | | | commit 4960aaca14010b9ff92e5726dd178cbd6805d412 upstream. If we failed to set the domain, the buffer was no longer being tracked on any list. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocksJesse Barnes2009-10-051-1/+8
| | | | | | | | | | | | | | | commit d660467c3ff2a0b7413e1b7a51452b34ffb49e5f upstream. A very high dotclock (e.g. 229500kHz as reported by Anton) can cause the entries_required variable to overflow, potentially leading to a FIFO watermark value that's too low to support the given mode. Split the division across the calculation to avoid this. Reported-by: Anton Khirnov <wyskas@gmail.com> Tested-by: Anton Khirnov <wyskas@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm/i915: Only destroy a constructed mmap offsetChris Wilson2009-10-051-1/+2
| | | | | | | | | | | | | | | | | | | | commit 7e61615857c6fb3afbcb43f5c4e97511a923f5a8 upstream. drm_ht_remove_item() does not handle removing an absent item and the hlist in particular is incorrectly initialised. The easy remedy is simply skip calling i915_gem_free_mmap_offset() unless we have actually created the offset and associated ht entry. This also fixes the mishandling of a partially constructed offset which leaves pointers initialized after freeing them along the i915_gem_create_mmap_offset() error paths. In particular this should fix the oops found here: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/415357/comments/8 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: remove restore in resumeZhenyu Wang2009-10-051-2/+0
| | | | | | | | | | | | | | commit b7e53aba2f0e6abf23e3f07b38b241145c33a005 upstream. Don't need extra config restore like for intel_agp, which might cause resume hang issue found by Alan on 845G. Cc: Stable Team <stable@kernel.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: sl811-hcd: Fix device disconnect:Hennerich, Michael2009-10-051-2/+6
| | | | | | | | | | | | | | | | | commit eb661bc88252e5c6dc69df732e77e42981dd4d8b upstream. SL811 Device detected after removal used to be working in linux-2.6.22 but then broke somewhere between 2.6.22 and 2.6.28. Current hub_port_connect_change() in drivers/usb/core/hub.c won't call usb_disconnect() in case the SL811 driver sets portstatus USB_PORT_FEAT_CONNECTION upon removal. AFAIK the SL811 has only a combined Device Insert/Remove detection bit, therefore use a count to distinguish insert or remove. Signed-Off-By: Michael Hennerich <hennerich@blackfin.uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usbtmc: sanity checks for DEV_DEP_MSG_IN urbsGuus Sliepen2009-10-051-4/+18
| | | | | | | | | | | | | | | | | | commit 665d7662d15441b4b3e54131a9418a1a198d0d31 upstream. According to the specifications, an instrument should not return more data in a DEV_DEP_MSG_IN urb than requested. However, some instruments can send more than requested. This could cause the kernel to write the extra data past the end of the buffer provided by read(). Fix this by checking that the value of the TranserSize field is not larger than the urb itself and not larger than the size of the userspace buffer. Also correctly decrement the remaining size of the buffer when userspace read()s more than USBTMC_SIZE_IOBUFFER. Signed-off-by: Guus Sliepen <guus@sliepen.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb-storage fails to attach to Huawei Datacard cdrom devicefangxiaozhi2009-10-051-1/+1
| | | | | | | | | | | | commit d0defb855c8504c49b92bdc0203689ce9b4cf7ba upstream. In this patch, we always make the return value of function usb_stor_huawei_e220_init to be zero. Then it will not prevent usb-storage driver from attaching to the CDROM device of Huawei Datacard. Signed-off-by: fangxiaozhi <huananhu@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: storage: fix a resume path GFP_NOIO must be usedOliver Neukum2009-10-051-1/+1
| | | | | | | | | | | | commit e5dc8ae121592239c2a2521d383bcb789849b2a3 upstream. In the resume path of a block driver GFP_NOIO must be used to avoid a possible deadlock. The onetouch subdriver of storage violates the requirement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: pl2303: new hardware support - sanwa multimeterPawel Ludwikow2009-10-052-0/+5
| | | | | | | | | | | commit 35904e6b5106fda51b04c8b8080c04466865415f upstream. I'd like to present my small patch enabling to use Sanwa PC5000 mulitimeter with linux. Signed-off-by: Pawel Ludwikow <pludwiko@rab.ict.pwr.wroc.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* x86: SGI UV: Fix IPI macrosJack Steiner2009-10-051-1/+1
| | | | | | | | | | | | | | commit d2374aecda3f6c9b0d13287027132a37311da300 upstream. The UV BIOS has changed the way interrupt remapping is being done. This affects the id used for sending IPIs. The upper id bits no longer need to be masked off. Signed-off-by: Jack Steiner <steiner@sgi.com> LKML-Reference: <20090909154104.GA25083@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kaweth: Fix memory leak in kaweth_control()Kevin Cernekee2009-10-051-7/+11
| | | | | | | | | | | | | | | | | | | commit 051b982bcc620695de629d29c333c95b66e9b95e upstream. kaweth_control() never frees the buffer that it allocates for the USB control message. Test case: while :; do ifconfig eth2 down ; ifconfig eth2 up ; done This is a tiny buffer so it is a slow leak. If you want to speed up the process, you can change the allocation size to e.g. 16384 bytes, and it will consume several megabytes within a few minutes. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Acked-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: gigaset: really fix chars_in_bufferTilman Schmidt2009-10-051-12/+7
| | | | | | | | | | | | | | commit a4304f2d5a3823deea894026ec95e43b33912357 upstream. The tty_operation chars_in_buffer() is not allowed to return a negative value to signal an error. Corrects the problem flagged by commit 23198fda7182969b619613a555f8645fdc3dc334, "tty: fix chars_in_buffers". Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: remove dtr/rts use from the driver open methodsAlan Cox2009-10-051-6/+0
| | | | | | | | | | | commit 9a68e39d4a701fb3be03cae9b462408664ebd205 upstream. These are handled by the tty_port core code which will raise and lower the carrier correctly in tty_wait_until_ready Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* cdc_acm: Fix to use modern speed interfacesAlan Cox2009-10-051-4/+1
| | | | | | | | | | commit 9b80fee149a875a6292b2556ab2c64dc7ab7d6f5 upstream. This changed in 2006 so its about time the ACM driver caught up Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix cdc-acm regression in openOliver Neukum2009-10-051-0/+2
| | | | | | | | | | | | | commit 7af25b4b34a2439020d78da765a3bed0ff73f25c upstream. cdc-acm needs to set a flag during open to tell the tty layer that the device is initialized Signed-off-by: Oliver Neukum <oliver@neukum.org> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Paul Martin <pm@debian.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: CDC WDM driver doesn't support non-blocking readsOliver Neukum2009-10-051-6/+24
| | | | | | | | | | | | | commit 7f1dc313d01f5f0f84c06051343a3b8623932d3c upstream. support for O_NONBLOCK in read and write path by simply not waiting for data in read or availability of the write urb in write but returning -EAGAIN Signed-off-by: Oliver Neukum <oliver@neukum.org> Tested-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: ftdi: handle gnICE+ JTAG adaptorsMichael Hennerich2009-10-052-0/+3
| | | | | | | | | | | | commit 11eaf170363d264ff587f300e41c927ba5a33967 upstream. Detect the UART on interface1 and blacklist interface0 (as that is the JTAG port). Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add PIDs for FTDI based OpenDCC hardwaremail@rainerkeller.de2009-10-052-0/+6
| | | | | | | | | | | | | | commit ec3815c3e14dc68d49428e6505ae99e86e5dd067 upstream. Some devices from the OpenDCC project are missing in the list of the FTDI PIDs. These PIDs are listed at http://www.opendcc.de/elektronik/usb/opendcc_usb.html (Sorry for the german only page.) This patch adds the three missing devices. Signed-off-by: Rainer Keller <mail@rainerkeller.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: ftdi_sio: new hardware support - hameg power supplyPawel Ludwikow2009-10-052-0/+8
| | | | | | | | | | | commit e7d7fcc09ebde1ea1773521ecab5a3f0ad6bef6e upstream. I'd like to present my small patch enabling to use Hameg HM8143 programmable power supply with linux. Signed-off-by: Pawel Ludwikow <pludwiko@rab.ict.pwr.wroc.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>