aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-04-18next_pidmap: fix overflow conditionLinus Torvalds2-2/+5
next_pidmap() just quietly accepted whatever 'last' pid that was passed in, which is not all that safe when one of the users is /proc. Admittedly the proc code should do some sanity checking on the range (and that will be the next commit), but that doesn't mean that the helper functions should just do that pidmap pointer arithmetic without checking the range of its arguments. So clamp 'last' to PID_MAX_LIMIT. The fact that we then do "last+1" doesn't really matter, the for-loop does check against the end of the pidmap array properly (it's only the actual pointer arithmetic overflow case we need to worry about, and going one bit beyond isn't going to overflow). [ Use PID_MAX_LIMIT rather than pid_max as per Eric Biederman ] Reported-by: Tavis Ormandy <[email protected]> Analyzed-by: Robert Święcki <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Pavel Emelyanov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-18nfsd4: fix struct file leak on delegationJ. Bruce Fields1-0/+1
Introduced by acfdf5c383b38f7f4dddae41b97c97f1ae058f49. Cc: [email protected] Reported-by: Gerhard Heift <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2011-04-18Input: xen-kbdfront - fix mouse getting stuck after save/restoreIgor Mammedov1-1/+12
Mouse gets "stuck" after restore of PV guest but buttons are in working condition. If driver has been configured for ABS coordinates at start it will get XENKBD_TYPE_POS events and then suddenly after restore it'll start getting XENKBD_TYPE_MOTION events, that will be dropped later and they won't get into user-space. Regression was introduced by hunk 5 and 6 of 5ea5254aa0ad269cfbd2875c973ef25ab5b5e9db ("Input: xen-kbdfront - advertise either absolute or relative coordinates"). Driver on restore should ask xen for request-abs-pointer again if it is available. So restore parts that did it before 5ea5254. Acked-by: Olaf Hering <[email protected]> Signed-off-by: Igor Mammedov <[email protected]> [v1: Expanded the commit description] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-04-18Input: estimate number of events per packetJeff Brown2-0/+46
Calculate a default based on the number of ABS axes, REL axes, and MT slots for the device during input device registration. Signed-off-by: Jeff Brown <[email protected]> Reviewed-by: Henrik Rydberg <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-04-18x86, gart: Make sure GART does not map physmem above 1TBJoerg Roedel1-1/+8
The GART can only map physical memory below 1TB. Make sure the gart driver in the kernel does not try to map memory above 1TB. Cc: <[email protected]> Signed-off-by: Joerg Roedel <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
2011-04-18x86, gart: Set DISTLBWALKPRB bit alwaysJoerg Roedel2-3/+3
The DISTLBWALKPRB bit must be set for the GART because the gatt table is mapped UC. But the current code does not set the bit at boot when the BIOS setup the aperture correctly. Fix that by setting this bit when enabling the GART instead of the other places. Cc: <[email protected]> Cc: Borislav Petkov <[email protected]> Signed-off-by: Joerg Roedel <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
2011-04-18x86, gart: Convert spaces to tabs in enable_gart_translationJoerg Roedel1-11/+11
Probably by copy&paste this function was indented by spaces. Convert this to tabs. Signed-off-by: Joerg Roedel <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
2011-04-18ASoC: add a module alias to the FSI driverGuennadi Liakhovetski1-0/+1
This patch enables FSI driver autoloading on sh-mobile systems. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Simon Horman <[email protected] Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-04-18Merge commit 'v2.6.39-rc3' into for-2.6.39Mark Brown3009-9786/+10074
2011-04-18iwlwifi: fix frame injection for HT channelsDaniel Halperin1-6/+1
For some reason, sending QoS configuration causes transmission to stop after a single frame on HT channels when not associated. Removing the extra QoS configuration has no effect on station mode, and fixes injection mode. Signed-off-by: Daniel Halperin <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]>
2011-04-18GFS2: filesystem hang caused by incorrect lock orderBob Peterson6-21/+55
This patch fixes a deadlock in GFS2 where two processes are trying to reclaim an unlinked dinode: One holds the inode glock and calls gfs2_lookup_by_inum trying to look up the inode, which it can't, due to I_FREEING. The other has set I_FREEING from vfs and is at the beginning of gfs2_delete_inode waiting for the glock, which is held by the first. The solution is to add a new non_block parameter to the gfs2_iget function that causes it to return -ENOENT if the inode is being freed. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2011-04-18GFS2: Don't try to deallocate unlinked inodes when mounted roSteven Whitehouse2-2/+7
This adds a couple of missing tests to avoid read-only nodes from attempting to deallocate unlinked inodes. Signed-off-by: Steven Whitehouse <[email protected]> Reported-by: Michel Andre de la Porte <[email protected]>
2011-04-18GFS2: directly write blocks past i_sizeBenjamin Marzinski1-10/+48
GFS2 was relying on the writepage code to write out the zeroed data for fallocate. However, with FALLOC_FL_KEEP_SIZE set, this may be past i_size. If it is, it will be ignored. To work around this, gfs2 now calls write_dirty_buffer directly on the buffer_heads when FALLOC_FL_KEEP_SIZE is set, and it's writing past i_size. This version is just a cleanup of my last version Signed-off-by: Benjamin Marzinski <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2011-04-18GFS2: write_end error path fails to unlock transaction lockBob Peterson1-1/+1
I did an audit of gfs2's transaction glock for bugzilla bug 658619 and ran across this: In function gfs2_write_end, in the unlikely event that gfs2_meta_inode_buffer returns an error, the code may forget to unlock the transaction lock because the "failed" label appears after the call to function gfs2_trans_end. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2011-04-18Btrfs: fix free space cache leakChris Mason1-1/+1
The free space caching code was recently reworked to cache all the pages it needed instead of using find_get_page everywhere. One loop was missed though, so it ended up leaking pages. This fixes it to use our page array instead of find_get_page. Signed-off-by: Chris Mason <[email protected]>
2011-04-18block: add blk_run_queue_asyncChristoph Hellwig9-23/+36
Instead of overloading __blk_run_queue to force an offload to kblockd add a new blk_run_queue_async helper to do it explicitly. I've kept the blk_queue_stopped check for now, but I suspect it's not needed as the check we do when the workqueue items runs should be enough. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-04-18block: blk_delay_queue() should use kblockd workqueueJens Axboe1-1/+2
Reported-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-04-18RTC: rtc-omap: Fix a leak of the IRQ during init failureAxel Lin1-1/+1
In omap_rtc_probe error path, free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Axel Lin <[email protected]> Cc: "George G. Davis" <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/%3C1303005778.2889.2.camel%40phoenix%3E Signed-off-by: Thomas Gleixner <[email protected]>
2011-04-18posix clocks: Replace mutex with reader/writer semaphoreRichard Cochran2-17/+12
A dynamic posix clock is protected from asynchronous removal by a mutex. However, using a mutex has the unwanted effect that a long running clock operation in one process will unnecessarily block other processes. For example, one process might call read() to get an external time stamp coming in at one pulse per second. A second process calling clock_gettime would have to wait for almost a whole second. This patch fixes the issue by using a reader/writer semaphore instead of a mutex. Signed-off-by: Richard Cochran <[email protected]> Cc: John Stultz <[email protected]> Link: http://lkml.kernel.org/r/%3C20110330132421.GA31771%40riccoc20.at.omicron.at%3E Signed-off-by: Thomas Gleixner <[email protected]>
2011-04-18md: fix up raid1/raid10 unplugging.NeilBrown2-28/+20
We just need to make sure that an unplug event wakes up the md thread, which is exactly what mddev_check_plugged does. Also remove some plug-related code that is no longer needed. Signed-off-by: NeilBrown <[email protected]>
2011-04-18md: incorporate new plugging into raid5.NeilBrown1-7/+16
In raid5 plugging is used for 2 things: 1/ collecting writes that require a bitmap update 2/ collecting writes in the hope that we can create full stripes - or at least more-full. We now release these different sets of stripes when plug_cnt is zero. Also in make_request, we call mddev_check_plug to hopefully increase plug_cnt, and wake up the thread at the end if plugging wasn't achieved for some reason. Signed-off-by: NeilBrown <[email protected]>
2011-04-18md: provide generic support for handling unplug callbacks.NeilBrown2-0/+60
When an md device adds a request to a queue, it can call mddev_check_plugged. If this succeeds then we know that the md thread will be woken up shortly, and ->plug_cnt will be non-zero until then, so some processing can be delayed. If it fails, then no unplug callback is expected and the make_request function needs to do whatever is required to make the request happen. Signed-off-by: NeilBrown <[email protected]>
2011-04-18md - remove old plugging code.NeilBrown4-104/+8
md has some plugging infrastructure for RAID5 to use because the normal plugging infrastructure required a 'request_queue', and when called from dm, RAID5 doesn't have one of those available. This relied on the ->unplug_fn callback which doesn't exist any more. So remove all of that code, both in md and raid5. Subsequent patches with restore the plugging functionality. Signed-off-by: NeilBrown <[email protected]>
2011-04-18md/dm - remove remains of plug_fn callback.NeilBrown2-9/+0
Now that unplugging is done differently, the unplug_fn callback is never called, so it can be completely discarded. Signed-off-by: NeilBrown <[email protected]>
2011-04-18md: use new plugging interface for RAID IO.NeilBrown3-1/+10
md/raid submits a lot of IO from the various raid threads. So adding start/finish plug calls to those so that some plugging happens. Signed-off-by: NeilBrown <[email protected]>
2011-04-18block: drop queue lock before calling __blk_run_queue() for kblockd puntJens Axboe1-8/+25
If we know we are going to punt to kblockd, we can drop the queue lock before calling into __blk_run_queue() since it only does a safe bit test and a workqueue call. Since kblockd needs to grab this very lock as one of the first things it does, it's a good optimization to drop the lock before waking kblockd. Signed-off-by: Jens Axboe <[email protected]>
2011-04-18Revert "block: add callback function for unplug notification"Jens Axboe3-22/+0
MD can't use this since it really requires us to be able to keep more than a single piece of state for the unplug. Commit 048c9374 added the required support for MD, so get rid of this now unused code. This reverts commit f75664570d8b75469cc468f23c2b27220984983b. Conflicts: block/blk-core.c Signed-off-by: Jens Axboe <[email protected]>
2011-04-18block: Enhance new plugging support to support general callbacksNeilBrown2-1/+26
md/raid requires an unplug callback, but as it does not uses requests the current code cannot provide one. So allow arbitrary callbacks to be attached to the blk_plug. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-04-17ip6_pol_route panic: Do not allow VLAN on loopbackKrishna Kumar1-1/+2
Several tests in the ipv6 routing code check IFF_LOOPBACK, and allowing stacking such as VLAN'ing on top of loopback results in a netdevice which reports IFF_LOOPBACK but really isn't the loopback device. Instead of spamming the ipv6 routing code with even more special tests, simply disallow VLAN over loopback. The result of this patch is: # modprobe 8021q # vconfig add lo 43 ERROR: trying to add VLAN #43 to IF -:lo:- error: Operation not supported Signed-off-by: Krishna Kumar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-18powerpc/powermac: Build fix with SMP and CPU hotplugBenjamin Herrenschmidt1-3/+5
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-04-18powerpc/perf_event: Skip updating kernel counters if register value shrinksEric B Munson1-7/+30
Because of speculative event roll back, it is possible for some event coutners to decrease between reads on POWER7. This causes a problem with the way that counters are updated. Delta calues are calculated in a 64 bit value and the top 32 bits are masked. If the register value has decreased, this leaves us with a very large positive value added to the kernel counters. This patch protects against this by skipping the update if the delta would be negative. This can lead to a lack of precision in the coutner values, but from my testing the value is typcially fewer than 10 samples at a time. Signed-off-by: Eric B Munson <[email protected]> Cc: [email protected] Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-04-18powerpc: Don't write protect kernel text with CONFIG_DYNAMIC_FTRACE enabledStefan Roese1-1/+1
This problem was noticed on an MPC855T platform. Ftrace did oops when trying to write to the kernel text segment. Many thanks to Joakim for finding the root cause of this problem. Signed-off-by: Stefan Roese <[email protected]> Cc: Joakim Tjernlund <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Steven Rostedt <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-04-18powerpc: Fix oops if scan_dispatch_log is called too earlyAnton Blanchard1-0/+3
We currently enable interrupts before the dispatch log for the boot cpu is setup. If a timer interrupt comes in early enough we oops in scan_dispatch_log: Unable to handle kernel paging request for data at address 0x00000010 ... .scan_dispatch_log+0xb0/0x170 .account_system_vtime+0xa0/0x220 .irq_enter+0x88/0xc0 .do_IRQ+0x48/0x230 The patch below adds a check to scan_dispatch_log to ensure the dispatch log has been allocated. Signed-off-by: Anton Blanchard <[email protected]> Cc: <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-04-18powerpc/pseries: Use a kmem cache for DTL buffersNishanth Aravamudan1-2/+10
PAPR specifies that DTL buffers can not cross AMS environments (aka CMO in the PAPR) and can not cross a memory entitlement granule boundary (4k). This is found in section 14.11.3.2 H_REGISTER_VPA of the PAPR. kmalloc does not guarantee an alignment of the allocation, though, beyond 8 bytes (at least in my understanding). Create a special kmem cache for DTL buffers with the alignment requirement. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-04-18powerpc/kexec: Fix regression causing compile failure on UPPaul Gortmaker1-6/+6
Recent commit b987812b3fcaf70fdf0037589e5d2f5f2453e6ce caused a compile failure on UP because a considerably large block of the file was included within CONFIG_SMP, hence making a stub function not exposed on UP builds when it needed to be. Relocate the stub to the #else /* ! CONFIG_SMP */ section and also annotate the relevant else/endif so that nobody else falls into the same trap I did. Reported-by: Michael Guntsche <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-04-18Merge remote branch 'kumar/merge' into mergeBenjamin Herrenschmidt5-7/+26
2011-04-17bnx2x: Fix port identification problemYaniv Rosner1-5/+4
This patch fixes port identification on optic devices when there's no link on the port. Signed-off-by: Yaniv Rosner <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-17r8169: add Realtek as maintainer.Francois Romieu1-0/+1
Per Hayes's request. Signed-off-by: Francois Romieu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-17Merge branch 'i2c-for-linus' of ↵Linus Torvalds2-5/+23
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c-algo-bit: Call pre/post_xfer for bit_test i2c: Improve deprecation warnings
2011-04-17Merge branch 's5p-fixes-for-linus' of ↵Linus Torvalds3-19/+3
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung * 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: SAMSUNG: Fix warning 's3c_pm_show_resume_irqs' defined but not used ARM: SAMSUNG: Fix build failure in PM CRC check code ARM: S5P: Remove unused s3c_pm_check_resume_pin
2011-04-17alpha: Fix uninitialized value in read_persistent_clock.Richard Henderson1-0/+1
Signed-off-by: Richard Henderson <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-17alpha: Fix RTC interrupt setup.Richard Henderson1-1/+1
Following commit 091738a266fc ("genirq: Remove real old transition functions") we removed an automatic conversion of no_irq_chip to dummy_irq_chip. This change needs to be propagated back into the alpha backend. Signed-off-by: Richard Henderson <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-17alpha: Remove set but unused variables.Richard Henderson5-17/+13
This is a new warning in gcc 4.6. Several of these variables are used within #if 0 code, which probably ought to be removed. Most of the changes are legitimate cleanups. Signed-off-by: Richard Henderson <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-17alpha: Don't force -Werror.Richard Henderson1-1/+1
There are outstanding gcc 4.6 warnings that need to be cleaned up in the subdirectory. No sense forcing the issue immediately. Signed-off-by: Richard Henderson <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-17fs: synchronize_rcu when unregister_filesystem success not failureMilton Miller1-2/+1
While checking unregister_filesystem for saftey vs extra calls for "ext4: register ext2 and ext3 alias after ext4" I realized that the synchronize_rcu() was called on the error path but not on the success path. Cc: stable (2.6.38) Signed-off-by: Milton Miller <[email protected]> [ This probably won't really make a difference since commit d863b50ab013 ("vfs: call rcu_barrier after ->kill_sb()"), but it's the right thing to do. - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
2011-04-17cx23885: Fix stv0367 Kconfig dependencyMauro Carvalho Chehab1-0/+1
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-04-17[media] omap3isp: Use isp xclk definesStanimir Varbanov2-8/+9
Use isp defines for isp xclk selection in isp_set_xclk(). Signed-off-by: Stanimir Varbanov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-04-17[media] omap3isp: isp: Reset the ISP when the pipeline can't be stoppedLaurent Pinchart2-2/+13
When a failure to stop a module in the pipeline is detected, the only way to recover is to reset the ISP. However, as other users can be using a different pipeline with other modules, the ISP can't be reset synchronously with the error detection. Mark the ISP as needing a reset when a failure to stop a pipeline is detected, and reset the ISP when the last user releases the last reference to the ISP. Modify the omap3isp_pipeline_set_stream() function to record the new ISP pipeline state only when no error occurs, except when stopping the pipeline in which case the pipeline is still marked as stopped. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-04-17[media] omap3isp: stat: update struct ispstat_generic_config's commentsDavid Cohen1-3/+3
struct ispstat_generic_config's comments refers to isph3a_aewb_config, isph3a_af_config and isphist_config. But those structs have had their names prefixed with 'omap3'. So, let's update the comments. Signed-off-by: David Cohen <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-04-17[media] media: Properly handle link flags in link setup, link notify callbackLaurent Pinchart1-2/+6
The link flags were not properly handled in __media_entity_setup_link which could lead to link_notify callback to be called when the flags are not modified. Fix this. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>