Commit Graph

275247 Commits (d2eb8c359309ec45d6bf5b147303ab8e13be86ea)

Author SHA1 Message Date
Jan Kara d2eb8c3593 udf: Fix deadlock when converting file from in-ICB one to normal one
During BKL removal in 2.6.38, conversion of files from in-ICB format to normal
format got broken. We call ->writepage with i_data_sem held but udf_get_block()
also acquires i_data_sem thus creating A-A deadlock.

We fix the problem by dropping i_data_sem before calling ->writepage() which is
safe since i_mutex still protects us against any changes in the file. Also fix
pagelock - i_data_sem lock inversion in udf_expand_file_adinicb() by dropping
i_data_sem before calling find_or_create_page().

CC: stable@kernel.org
Reported-by: Matthias Matiak <netzpython@mail-on.us>
Tested-by: Matthias Matiak <netzpython@mail-on.us>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2012-01-09 13:52:08 +01:00
Jan Kara 7b0b0933a3 udf: Cleanup calling convention of inode_getblk()
inode_getblk() always returned NULL and passed results in its parameters.
Make the function return something useful - found block number.

Signed-off-by: Jan Kara <jack@suse.cz>
2012-01-09 13:52:08 +01:00
Jan Kara ef6919c283 ext2: Fix error handling on inode bitmap corruption
When insert_inode_locked() fails in ext2_new_inode() it most likely means inode
bitmap got corrupted and we allocated again inode which is already in use. Also
doing unlock_new_inode() during error recovery is wrong since the inode does
not have I_NEW set. Fix the problem by informing about filesystem error and
jumping to fail: (instead of fail_drop:) which doesn't call unlock_new_inode().

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2012-01-09 13:52:07 +01:00
Jan Kara 1415dd8705 ext3: Fix error handling on inode bitmap corruption
When insert_inode_locked() fails in ext3_new_inode() it most likely
means inode bitmap got corrupted and we allocated again inode which
is already in use. Also doing unlock_new_inode() during error recovery
is wrong since inode does not have I_NEW set. Fix the problem by jumping
to fail: (instead of fail_drop:) which declares filesystem error and
does not call unlock_new_inode().

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2012-01-09 13:52:07 +01:00
Zheng Liu d03e1292c4 ext3: replace ll_rw_block with other functions
ll_rw_block() is deprecated. Thus we replace it with other functions.

CC: Jan Kara <jack@suse.cz>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2012-01-09 13:52:07 +01:00
Dan Carpenter bcdd0c1600 ext3: NULL dereference in ext3_evict_inode()
This is an fsfuzzer bug.  ->s_journal is set at the end of
ext3_load_journal() but we try to use it in the error handling from
ext3_get_journal() while it's still NULL.

[  337.039041] BUG: unable to handle kernel NULL pointer dereference at 0000000000000024
[  337.040380] IP: [<ffffffff816e6539>] _raw_spin_lock+0x9/0x30
[  337.041687] PGD 0
[  337.043118] Oops: 0002 [#1] SMP
[  337.044483] CPU 3
[  337.044495] Modules linked in: ecb md4 cifs fuse kvm_intel kvm brcmsmac brcmutil crc8 cordic r8169 [last unloaded: scsi_wait_scan]
[  337.047633]
[  337.049259] Pid: 8308, comm: mount Not tainted 3.2.0-rc2-next-20111121+ #24 SAMSUNG ELECTRONICS CO., LTD. RV411/RV511/E3511/S3511    /RV411/RV511/E3511/S3511
[  337.051064] RIP: 0010:[<ffffffff816e6539>]  [<ffffffff816e6539>] _raw_spin_lock+0x9/0x30
[  337.052879] RSP: 0018:ffff8800b1d11ae8  EFLAGS: 00010282
[  337.054668] RAX: 0000000000000100 RBX: 0000000000000000 RCX: ffff8800b77c2000
[  337.056400] RDX: ffff8800a97b5c00 RSI: 0000000000000000 RDI: 0000000000000024
[  337.058099] RBP: ffff8800b1d11ae8 R08: 6000000000000000 R09: e018000000000000
[  337.059841] R10: ff67366cc2607c03 R11: 00000000110688e6 R12: 0000000000000000
[  337.061607] R13: 0000000000000000 R14: 0000000000000000 R15: ffff8800a78f06e8
[  337.063385] FS:  00007f9d95652800(0000) GS:ffff8800b7180000(0000) knlGS:0000000000000000
[  337.065110] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  337.066801] CR2: 0000000000000024 CR3: 00000000aef2c000 CR4: 00000000000006e0
[  337.068581] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  337.070321] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  337.072105] Process mount (pid: 8308, threadinfo ffff8800b1d10000, task ffff8800b1d02be0)
[  337.073800] Stack:
[  337.075487]  ffff8800b1d11b08 ffffffff811f48cf ffff88007ac9b158 0000000000000000
[  337.077255]  ffff8800b1d11b38 ffffffff8119405d ffff88007ac9b158 ffff88007ac9b250
[  337.078851]  ffffffff8181bda0 ffffffff8181bda0 ffff8800b1d11b68 ffffffff81131e31
[  337.080284] Call Trace:
[  337.081706]  [<ffffffff811f48cf>] log_start_commit+0x1f/0x40
[  337.083107]  [<ffffffff8119405d>] ext3_evict_inode+0x1fd/0x2a0
[  337.084490]  [<ffffffff81131e31>] evict+0xa1/0x1a0
[  337.085857]  [<ffffffff81132031>] iput+0x101/0x210
[  337.087220]  [<ffffffff811339d1>] iget_failed+0x21/0x30
[  337.088581]  [<ffffffff811905fc>] ext3_iget+0x15c/0x450
[  337.089936]  [<ffffffff8118b0c1>] ? ext3_rsv_window_add+0x81/0x100
[  337.091284]  [<ffffffff816df9a4>] ext3_get_journal+0x15/0xde
[  337.092641]  [<ffffffff811a2e9b>] ext3_fill_super+0xf2b/0x1c30
[  337.093991]  [<ffffffff810ddf7d>] ? register_shrinker+0x4d/0x60
[  337.095332]  [<ffffffff8111c112>] mount_bdev+0x1a2/0x1e0
[  337.096680]  [<ffffffff811a1f70>] ? ext3_setup_super+0x210/0x210
[  337.098026]  [<ffffffff8119a770>] ext3_mount+0x10/0x20
[  337.099362]  [<ffffffff8111cbee>] mount_fs+0x3e/0x1b0
[  337.100759]  [<ffffffff810eda1b>] ? __alloc_percpu+0xb/0x10
[  337.102330]  [<ffffffff81135385>] vfs_kern_mount+0x65/0xc0
[  337.103889]  [<ffffffff8113611f>] do_kern_mount+0x4f/0x100
[  337.105442]  [<ffffffff811378fc>] do_mount+0x19c/0x890
[  337.106989]  [<ffffffff810e8456>] ? memdup_user+0x46/0x90
[  337.108572]  [<ffffffff810e84f3>] ? strndup_user+0x53/0x70
[  337.110114]  [<ffffffff811383fb>] sys_mount+0x8b/0xe0
[  337.111617]  [<ffffffff816ed93b>] system_call_fastpath+0x16/0x1b
[  337.113133] Code: 38 c2 74 0f 66 0f 1f 44 00 00 f3 90 0f b6 03 38 c2 75 f7 48 83 c4 08 5b 5d c3 0f 1f 84 00 00 00 00 00 55 b8 00 01 00 00 48 89 e5 <f0> 66 0f c1 07 0f b6 d4 38 c2 74 0c 0f 1f 00 f3 90 0f b6 07 38
[  337.116588] RIP  [<ffffffff816e6539>] _raw_spin_lock+0x9/0x30
[  337.118260]  RSP <ffff8800b1d11ae8>
[  337.119998] CR2: 0000000000000024
[  337.188701] ---[ end trace c36d790becac1615 ]---

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2011-11-22 13:36:15 +01:00
Yongqiang Yang 8c111b3f56 jbd: clear revoked flag on buffers before a new transaction started
Currently, we clear revoked flag only when a block is reused.  However,
this can tigger a false journal error.  Consider a situation when a block
is used as a meta block and is deleted(revoked) in ordered mode, then the
block is allocated as a data block to a file.  At this moment, user changes
the file's journal mode from ordered to journaled and truncates the file.
The block will be considered re-revoked by journal because it has revoked
flag still pending from the last transaction and an assertion triggers.

We fix the problem by keeping the revoked status more uptodate - we clear
revoked flag when switching revoke tables to reflect there is no revoked
buffers in current transaction any more.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2011-11-22 01:20:53 +01:00
Eryu Guan 63894ab9f6 ext3: call ext3_mark_recovery_complete() when recovery is really needed
Call ext3_mark_recovery_complete() in ext3_fill_super() only if
needs_recovery is non-zero.

Besides that, print out "recovery complete" message after calling
ext3_mark_recovery_complete().

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2011-11-09 12:23:17 +01:00
Linus Torvalds 19e0bafc36 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  drivers/media: video/a5k6aa is a module and so needs module.h
  mfd: fix build failures in recently added ab5500 code
  hwspinlock/u8500: include linux/module.h
  MTD: MAPS: bcm963xx-flash.c: explicitly include module.h
2011-11-08 18:34:16 -08:00
Linus Torvalds ed72a3d1b4 Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
  md/raid5: STRIPE_ACTIVE has lock semantics, add barriers
  md/raid5: abort any pending parity operations when array fails.
2011-11-08 18:33:53 -08:00
Linus Torvalds c8c27c955a Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs
* 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs: (45 commits)
  DocBook/drm: Clean up a todo-note
  DocBook/drm: `device aware' -> `device-aware'
  DocBook/drm: `(device|driver) specific' -> `(device|driver)-specific'
  DocBook/drm: Clean up the paragraph on framebuffer objects
  DocBook/drm: Use `; otherwise,'
  DocBook/drm: Better flow with `, and then'
  DocBook/drm: Refer to the domain-setting function as a device-specific ioctl
  DocBook/drm: Improve flow of GPU/CPU coherence sentence
  DocBook/drm: Use an <itemizelist> for fundamental GEM operations
  DocBook/drm: Insert a comma
  DocBook/drm: Use a <variablelist> for vblank ioctls
  DocBook/drm: Use an itemizedlist for what an encoder needs to provide
  DocBook/drm: Insert `the' for readability, and change `set' to `setting'
  DocBook/drm: Remove extraneous commas
  DocBook/drm: Use a colon
  DocBook/drm: Clarify `final initialization' via better formatting
  DocBook/drm: Remove redundancy
  DocBook/drm: Insert `it' for smooth reading
  DocBook/drm: The word `so-called'; I do not think it connotes what you think it connotes
  DocBook/drm: Use a singular subject for grammatical cleanliness
  ...
2011-11-08 18:33:11 -08:00
Linus Torvalds 98393b8ff2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: (21 commits)
  ktest: Evaluate variables entered on the command line
  ktest: Add variable ${PWD}
  ktest: Add another monitor flush before installing kernel
  ktest: Do not opencode reboot in grub setting
  ktest: Add processing of complex conditionals
  ktest: Fix parsing of config section lines
  ktest: Sort make_min_config configs by dependecies
  ktest: Add DEFINED keyword for IF statements
  ktest: Add OVERRIDE keyword to DEFAULTS section
  ktest: Consolidate TEST_TYPE and DEFAULT code
  ktest: Add INCLUDE keyword to include other config files
  ktest: Let IF keyword take comparisons
  ktest: Add IF and ELSE to config sections
  ktest: Do not reboot on config or build issues
  ktest: Add option REBOOT_SUCCESS_LINE to stop waiting after a reboot
  ktest: Add NO_INSTALL option to not install for a test
  ktest: Fail when grub menu not found
  ktest: Include monitor in reboot code
  ktest: Only need to save .config when doing mrproper
  ktest: Create outputdir if it does not exist
  ...
2011-11-08 15:41:10 -08:00
Linus Torvalds 3b7546211d Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
  PM / devfreq: fix private_data
  Documentation: Fix typo in freezer-subsystem.txt
  PM / QoS: Set cpu_dma_pm_qos->name
2011-11-08 14:24:18 -08:00
Thomas Meyer 156acb166e PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

[The semantic patch that makes this change is available
 in scripts/coccinelle/api/err_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/]

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-08 22:34:00 +01:00
Linus Torvalds c8f17084fe Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
  hwspinlock/u8500: fix build error due to undefined label
  hwspinlock: Don't return a value in __hwspin_unlock
2011-11-08 12:50:54 -08:00
Linus Torvalds 6ccce2b329 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: Hook up process_vm_{readv,writev} syscalls.
2011-11-08 12:50:02 -08:00
Linus Torvalds dccefb3729 x86 platform drivers: add POWER_SUPPLY to selected drivers for Dell
The Kconfig loop detection goes crazy without this.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-08 12:49:29 -08:00
Linus Torvalds b9c913f327 x86 platform drivers: make Dell laptop driver select needed LED support
Otherwise we get compile errors like this:

  ERROR: "led_classdev_unregister" [drivers/platform/x86/dell-laptop.ko] undefined!
  ERROR: "led_classdev_register" [drivers/platform/x86/dell-laptop.ko] undefined!
  make[1]: *** [__modpost] Error 1
  make: *** [modules] Error 2

when the dell-laptop support is enabled without the necessary LED
support being enabled.

Reported-by: Alessandro Suardi <alessandro.suardi@gmail.com>
Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-08 12:17:25 -08:00
Paul Gortmaker 6aec187a90 drivers/media: video/a5k6aa is a module and so needs module.h
This file uses core functions like module_init() and module_exit()
and so it explicitly needs to include the module.h header.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-11-08 14:56:50 -05:00
Alan Cox a8d12007c7 n_gsm: Fix timings
Alek Du reported that the code erroneously applies time to jiffies
conversions twice to the t1 and t2 values. In normal use on a modem link
this cases no visible problem but on a slower link it will break as with
HZ=1000 as is typical we are running t1/t2 ten times too fast.

Alek's original patch removed the conversion from the timer setting but we
in fact have to be more careful as the contents of t1/t2 are visible via
the device API and we thus need to correct the constants.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-08 10:10:20 -08:00
Axel Lin fdcb23634c hwspinlock/u8500: fix build error due to undefined label
Fix below build error:

  CC      drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c: In function 'u8500_hsem_probe':
drivers/hwspinlock/u8500_hsem.c:113: error: label 'free_state' used but not defined

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2011-11-08 09:28:41 +02:00
Axel Lin 816af3bb50 hwspinlock: Don't return a value in __hwspin_unlock
Fix below build warning:

  CC      arch/arm/mach-omap2/hwspinlock.o
In file included from arch/arm/mach-omap2/hwspinlock.c:22:
include/linux/hwspinlock.h: In function '__hwspin_unlock':
include/linux/hwspinlock.h:121: warning: 'return' with a value, in function returning void

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2011-11-08 09:28:27 +02:00
Dan Williams 257a4b42af md/raid5: STRIPE_ACTIVE has lock semantics, add barriers
All updates that occur under STRIPE_ACTIVE should be globally visible
when STRIPE_ACTIVE clears.  test_and_set_bit() implies a barrier, but
clear_bit() does not.

This is suitable for 3.1-stable.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
2011-11-08 16:22:06 +11:00
NeilBrown 9a3f530f39 md/raid5: abort any pending parity operations when array fails.
When the number of failed devices exceeds the allowed number
we must abort any active parity operations (checks or updates) as they
are no longer meaningful, and can lead to a BUG_ON in
handle_parity_checks6.

This bug was introduce by commit 6c0069c0ae
in 2.6.29.

Reported-by: Manish Katiyar <mkatiyar@gmail.com>
Tested-by: Manish Katiyar <mkatiyar@gmail.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
2011-11-08 16:22:01 +11:00
Paul Gortmaker 3b8ce3aed9 mfd: fix build failures in recently added ab5500 code
These files had implicit dependencies on modular support
which now show up as build failures with the module cleanup
work merged to mainline.

Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-11-07 21:45:14 -05:00
Axel Lin 8f7346bdea hwspinlock/u8500: include linux/module.h
Include module.h to fix below build error:

  CC      drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function)
 [...]
drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype
make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1
make[1]: *** [drivers/hwspinlock] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-11-07 21:45:14 -05:00
Jonas Gorski 4e549d6d4a MTD: MAPS: bcm963xx-flash.c: explicitly include module.h
module.h was previously implicitly included through mtd/mtd.h.

Fixes the following build failure after the module.h cleanup:

  CC      drivers/mtd/maps/bcm963xx-flash.o
drivers/mtd/maps/bcm963xx-flash.c: In function 'bcm963xx_probe':
drivers/mtd/maps/bcm963xx-flash.c:208:29: error: 'THIS_MODULE' undeclared (first use in this function)
 [...]
drivers/mtd/maps/bcm963xx-flash.c:276:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/mtd/maps/bcm963xx-flash.c:276:15: warning: function declaration isn't a prototype
make[7]: *** [drivers/mtd/maps/bcm963xx-flash.o] Error 1

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-11-07 21:26:55 -05:00
Linus Torvalds 1ea6b8f489 Linux 3.2-rc1
.. with new name.  Because nothing says "really solid kernel release"
like naming it after an extinct animal that just happened to be in the
news lately.
2011-11-07 16:16:02 -08:00
Linus Torvalds 075cb105cb Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (31 commits)
  ARM: OMAP: Fix export.h or module.h includes
  ARM: OMAP: omap_device: Include linux/export.h
  ARM: OMAP2: Fix H4 matrix keyboard warning
  ARM: OMAP1: Remove unused omap-alsa.h
  ARM: OMAP1: Fix warnings about enabling 32 KiHz timer
  ARM: OMAP2+: timer: Remove omap_device_pm_latency
  ARM: OMAP2+: clock data: Remove redundant timer clkdev
  ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpio
  ARM: OMAP: usb: musb: OMAP: Delete unused function
  MAINTAINERS: Update linux-omap git repository
  ARM: OMAP: change get_context_loss_count ret value to int
  ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properly
  ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFF
  ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list
  ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success
  ARM: OMAP: dmtimer: Include linux/module.h
  ARM: OMAP2+: l3-noc: Include linux/module.h
  ARM: OMAP2+: devices: Fixes for McPDM
  ARM: OMAP: Fix errors and warnings when building for one board
  ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only
  ...
2011-11-07 16:14:26 -08:00
Al Viro a3fbbde70a VFS: we need to set LOOKUP_JUMPED on mountpoint crossing
Mountpoint crossing is similar to following procfs symlinks - we do
not get ->d_revalidate() called for dentry we have arrived at, with
unpleasant consequences for NFS4.

Simple way to reproduce the problem in mainline:

    cat >/tmp/a.c <<'EOF'
    #include <unistd.h>
    #include <fcntl.h>
    #include <stdio.h>
    main()
    {
            struct flock fl = {.l_type = F_RDLCK, .l_whence = SEEK_SET, .l_len = 1};
            if (fcntl(0, F_SETLK, &fl))
                    perror("setlk");
    }
    EOF
    cc /tmp/a.c -o /tmp/test

then on nfs4:

    mount --bind file1 file2
    /tmp/test < file1		# ok
    /tmp/test < file2		# spews "setlk: No locks available"...

What happens is the missing call of ->d_revalidate() after mountpoint
crossing and that's where NFS4 would issue OPEN request to server.

The fix is simple - treat mountpoint crossing the same way we deal with
following procfs-style symlinks.  I.e.  set LOOKUP_JUMPED...

Cc: stable@kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-07 14:58:06 -08:00
Jonathan Corbet 1a51cfdc45 PM / devfreq: fix private_data
The "private_date" field in struct devfreq_dev_status almost certainly
wants to be "private_data"; since there are no in-tree users of this
functionality, now seems like an easy time to make the fix.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-07 23:54:53 +01:00
Rafael J. Wysocki 5f11161675 Documentation: Fix typo in freezer-subsystem.txt
Fix a typo in Documentation/cgroups/freezer-subsystem.txt.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
2011-11-07 23:02:25 +01:00
Dominik Brodowski a6f05b97d1 PM / QoS: Set cpu_dma_pm_qos->name
Since commit 4a31a334, the name of this misc device is not initialized,
which leads to a funny device named /dev/(null) being created and
/proc/misc containing an entry with just a number but no name. The latter
leads to complaints by cryptsetup, which caused me to investigate this
matter.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-07 23:02:24 +01:00
Linus Torvalds 54a0f91301 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf top: Fix live annotation in the --stdio interface
  perf top tui: Don't recalc column widths considering just the first page
  perf report: Add progress bar when processing time ordered events
  perf hists browser: Warn about lost events
  perf tools: Fix a typo of command name as trace-cmd
  perf hists: Fix recalculation of total_period when sorting entries
  perf header: Fix build on old systems
  perf ui browser: Handle K_RESIZE in dialog windows
  perf ui browser: No need to switch char sets that often
  perf hists browser: Use K_TIMER
  perf ui: Rename ui__warning_paranoid to ui__error_paranoid
  perf ui: Reimplement the popup windows using libslang
  perf ui: Reimplement ui__popup_menu using ui__browser
  perf ui: Reimplement ui_helpline using libslang
  perf ui: Improve handling sigwinch a bit
  perf ui progress: Reimplement using slang
  perf evlist: Fix grouping of multiple events
2011-11-07 12:38:11 -08:00
Tony Lindgren d30cc16c8e Merge branch 'fixes-modulesplit' into fixes 2011-11-07 12:27:23 -08:00
Tony Lindgren a1bcc1dcef ARM: OMAP: Fix export.h or module.h includes
Commit 32aaeffbd4 (Merge branch
'modsplit-Oct31_2011'...) caused some build errors. Fix these
and make sure we always have export.h or module.h included
for MODULE_ and EXPORT_SYMBOL users:

$ grep -rl ^MODULE_ arch/arm/*omap*/*.c | xargs \
  grep -L linux/module.h
  arch/arm/mach-omap2/dsp.c
  arch/arm/mach-omap2/mailbox.c
  arch/arm/mach-omap2/omap-iommu.c
  arch/arm/mach-omap2/smartreflex.c

Also check we either have export.h or module.h included
for the files exporting symbols:

$ grep -rl EXPORT_SYMBOL arch/arm/*omap*/*.c | xargs \
  grep -L linux/export.h | xargs grep -L linux/module.h

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-07 12:27:10 -08:00
Axel Lin 5558141556 ARM: OMAP: omap_device: Include linux/export.h
Include linux/export.h to fix below build warning:

  CC      arch/arm/plat-omap/omap_device.o
arch/arm/plat-omap/omap_device.c:1055: warning: data definition has no type or storage class
arch/arm/plat-omap/omap_device.c:1055: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/arm/plat-omap/omap_device.c:1055: warning: parameter names (without types) in function declaration

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-07 12:27:10 -08:00
Linus Torvalds 94956eed14 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
  forcedeth: fix a few sparse warnings (variable shadowing)
  forcedeth: Improve stats counters
  forcedeth: remove unneeded stats updates
  forcedeth: Acknowledge only interrupts that are being processed
  forcedeth: fix race when unloading module
  MAINTAINERS/rds: update maintainer
  wanrouter: Remove kernel_lock annotations
  usbnet: fix oops in usbnet_start_xmit
  ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined
  etherh: Add MAINTAINERS entry for etherh
  bonding: comparing a u8 with -1 is always false
  sky2: fix regression on Yukon Optima
  netlink: clarify attribute length check documentation
  netlink: validate NLA_MSECS length
  i825xx:xscale:8390:freescale: Fix Kconfig dependancies
  macvlan: receive multicast with local address
  tg3: Update version to 3.121
  tg3: Eliminate timer race with reset_task
  tg3: Schedule at most one tg3_reset_task run
  tg3: Obtain PCI function number from device
  ...
2011-11-07 10:55:33 -08:00
Al Viro 50e696308c vfs: d_invalidate() should leave mountpoints alone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-07 10:54:10 -08:00
david decotigny e45a618753 forcedeth: fix a few sparse warnings (variable shadowing)
This fixes the following sparse warnings:
drivers/net/ethernet/nvidia/forcedeth.c:2113:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2102:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2155:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2102:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2227:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2215:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2271:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2215:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2986:20: warning: symbol 'addr' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2963:6: originally declared here

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-07 13:31:25 -05:00
Mandeep Baines 0bdfea8ba8 forcedeth: Improve stats counters
Rx byte count was off; instead use the hardware's count.  Tx packet
count was counting pre-TSO packets; instead count on-the-wire packets.
Report hardware dropped frame count as rx_fifo_errors.

- The count of transmitted packets reported by the forcedeth driver
  reports pre-TSO (TCP Segmentation Offload) packet counts and not the
  count of the number of packets sent on the wire. This change fixes
  the forcedeth driver to report the correct count. Fixed the code by
  copying the count stored in the NIC H/W to the value reported by the
  driver.

- Count rx_drop_frame errors as rx_fifo_errors:
  We see a lot of rx_drop_frame errors if we disable the rx bottom-halves
  for too long.  Normally, rx_fifo_errors would be counted in this case.
  The rx_drop_frame error count is private to forcedeth and is not
  reported by ifconfig or sysfs.  The rx_fifo_errors count is currently
  unused in the forcedeth driver.  It is reported by ifconfig as overruns.
  This change reports rx_drop_frame errors as rx_fifo_errors.

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-07 13:31:24 -05:00
david decotigny 4687f3f364 forcedeth: remove unneeded stats updates
Function ndo_get_stats() updates most of the stats from hardware
registers, making the manual updates un-needed. This change removes
these manual updates. Main exception is rx_missed_errors which needs
manual update.

Another exception is rx_packets, still updated manually in this commit
to make sure this patch doesn't change behavior of driver. This will
be addressed by a future patch.

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-07 13:31:24 -05:00
Mike Ditto 2a4e7a085f forcedeth: Acknowledge only interrupts that are being processed
This is to avoid a race, accidentally acknowledging an interrupt that
we didn't notice and won't immediately process.  This is based solely
on code inspection; it is not known if there was an actual bug here.

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-07 13:31:24 -05:00
david decotigny f9c4082df5 forcedeth: fix race when unloading module
When forcedeth module is unloaded, there exists a path that can lead
to mod_timer() after del_timer_sync(), causing an oops. This patch
short-circuits this unneeded path, which originates in
nv_get_ethtool_stats().

Tested:
  x86_64 16-way + 3 ethtool -S infinite loops + 100Mbps incoming traffic
  + rmmod/modprobe/ifconfig in a loop

Initial-Author: Salman Qazi <sqazi@google.com>
Discussion: http://patchwork.ozlabs.org/patch/123548/

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-07 13:31:24 -05:00
Stephen Rothwell a84450604d device-mapper: using EXPORT_SYBOL in dm-space-map-checker.c needs export.h
Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-07 10:29:10 -08:00
Stephen Rothwell 6f66263f8e device-mapper: dm-bufio.c needs to include module.h
since it uses the module facilities.

Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-07 10:29:10 -08:00
Paul Gortmaker 1944ce60fe drivers/md: change module.h -> export.h in persistent-data/dm-*
For the files which are not themselves modular, we can change
them to include only the smaller export.h since all they are
doing is looking for EXPORT_SYMBOL.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-07 10:29:09 -08:00
Paul Gortmaker 0c073e3555 arm: Add export.h to recently added files for EXPORT_SYMBOL
These files didn't exist at the time of the module.h split, and
so were not fixed by the commits on that baseline.  Since they use
the EXPORT_SYMBOL and/or THIS_MODULE macros, they will need the
new export.h file included that provides them.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-07 10:28:58 -08:00
Or Gerlitz dd1294c4ed MAINTAINERS/rds: update maintainer
update for the actual maintainer

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-07 13:28:20 -05:00
Richard Weinberger 039c811cb0 wanrouter: Remove kernel_lock annotations
The BKL is gone, these annotations are useless.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-07 13:27:30 -05:00