aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-03-13Merge branch 'hwmon-for-linus' of ↵Linus Torvalds1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon/f71882fg: Set platform drvdata to NULL later hwmon/f71882fg: Fix a typo in a comment
2011-03-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstableLinus Torvalds5-62/+135
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: break out of shrink_delalloc earlier btrfs: fix not enough reserved space btrfs: fix dip leak Btrfs: make sure not to return overlapping extents to fiemap Btrfs: deal with short returns from copy_from_user Btrfs: fix regressions in copy_from_user handling
2011-03-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds3-2/+13
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] target: Fix t_transport_aborted handling in LUN_RESET + active I/O shutdown
2011-03-13kbuild: Fix computing srcversion for modulesMichal Marek2-8/+30
Recent change to fixdep: commit b7bd182176960fdd139486cadb9962b39f8a2b50 Author: Michal Marek <[email protected]> Date: Thu Feb 17 15:13:54 2011 +0100 fixdep: Do not record dependency on the source file itself changed the format of the *.cmd files without realizing that it is also used by modpost. Put the path to the source file to the file back, in a special variable, so that modpost sees all source files when calculating srcversion for modules. Reported-and-tested-by: Henrik Rydberg <[email protected]> Signed-off-by: Michal Marek <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-13Merge git://git.infradead.org/users/dwmw2/mtd-2.6.38Linus Torvalds7-42/+44
* git://git.infradead.org/users/dwmw2/mtd-2.6.38: mtd: add "platform:" prefix for platform modalias mtd: mtd_blkdevs: fix double free on error path mtd: amd76xrom: fix oops at boot when resources are not available mtd: fix race in cfi_cmdset_0001 driver mtd: jedec_probe: initialise make sector erase command variable mtd: jedec_probe: Change variable name from cfi_p to cfi
2011-03-13Merge branch 'drm-fixes' of ↵Linus Torvalds3-18/+5
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon: fix page flipping hangs on r300/r400 drm/radeon: add pageflip hooks for fusion
2011-03-13Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds1-12/+7
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: fix mis-synchronisation in blkdev_issue_zeroout()
2011-03-13Merge branch 'fix/asoc' of ↵Linus Torvalds4-9/+19
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ASoC: Ensure WM8958 gets all WM8994 late revision widgets ASoC: Fix typo in late revision WM8994 DAC2R name ASoC: Use the correct DAPM context when cleaning up final widget set ASoC: Fix broken bitfield definitions in WM8978 ASoC: AM3517: Update codec name after multi-component update
2011-03-13gpio: add MODULE_DEVICE_TABLEAxel Lin2-0/+2
The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries will be added to modules.pcimap: pch_gpio 0x00008086 0x00008803 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 ml_ioh_gpio 0x000010db 0x0000802e 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 Signed-off-by: Axel Lin <[email protected]> Cc: Tomoya MORINAGA <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-13thp: fix page_referenced to modify mapcount/vm_flags only if page is foundAndrea Arcangeli1-19/+35
When vmscan.c calls page_referenced(), if an anon page was created before a process forked, rmap will search for it in both of the processes, even though one of them might have since broken COW. If the child process mlocks the vma where the COWed page belongs to, page_referenced() running on the page mapped by the parent would lead to *vm_flags getting VM_LOCKED set erroneously (leading to the references on the parent page being ignored and evicting the parent page too early). *mapcount would also be decremented by page_referenced_one even if the page wasn't found by page_check_address. This also lets pmdp_clear_flush_young_notify() go ahead on a pmd_trans_splitting() pmd. We hold the page_table_lock so __split_huge_page_map() must wait the pmdp_clear_flush_young_notify() to complete before it can modify the pmd. The pmd is also still mapped in userland so the young bit may materialize through a tlb miss before split_huge_page_map runs. This will provide a more accurate page_referenced() behavior during split_huge_page(). Signed-off-by: Andrea Arcangeli <[email protected]> Reported-by: Michel Lespinasse <[email protected]> Reviewed-by: Michel Lespinasse <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Reviewed-by: Johannes Weiner <[email protected]> Reviewed-by: Rik van Riel<[email protected]> Reviewed-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-13hwmon/f71882fg: Set platform drvdata to NULL laterHans de Goede1-1/+1
This avoids a possible race leading to trying to dereference NULL. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Jean Delvare <[email protected]> Cc: [email protected] Signed-off-by: Guenter Roeck <[email protected]>
2011-03-13hwmon/f71882fg: Fix a typo in a commentHans de Goede1-1/+1
Signed-off-by: Hans de Goede <[email protected]> Acked-by: Jean Delvare <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-03-13drm/radeon: fix page flipping hangs on r300/r400Dave Airlie2-18/+2
We've been getting reports of complete system lockups with rv3xx hw on AGP and PCIE when running gnome-shell or kwin with compositing. It appears the hw really doesn't like setting these registers while stuff is running, this moves the setting of the registers into the modeset since they aren't required to be changed anywhere else. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=35183 Reported-and-tested-by: Álmos <[email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-03-12Btrfs: break out of shrink_delalloc earlierChris Mason2-12/+32
Josef had changed shrink_delalloc to exit after three shrink attempts, which wasn't quite enough because new writers could race in and steal free space. But it also fixed deadlocks and stalls as we tried to recover delalloc reservations. The code was tweaked to loop 1024 times, and would reset the counter any time a small amount of progress was made. This was too drastic, and with a lot of writers we can end up stuck in shrink_delalloc forever. The shrink_delalloc loop is fairly complex because the caller is looping too, and the caller will go ahead and force a transaction commit to make sure we reclaim space. This reworks things to exit shrink_delalloc when we've forced some writeback and the delalloc reservations have gone down. This means the writeback has not just started but has also finished at least some of the metadata changes required to reclaim delalloc space. If we've got this wrong, we're returning ENOSPC too early, which is a big improvement over the current behavior of hanging the machine. Test 224 in xfstests hammers on this nicely, and with 1000 writers trying to fill a 1GB drive we get our first ENOSPC at 93% full. The other writers are able to continue until we get 100%. This is a worst case test for btrfs because the 1000 writers are doing small IO, and the small FS size means we don't have a lot of room for metadata chunks. Signed-off-by: Chris Mason <[email protected]>
2011-03-11NFS: NFSROOT should default to "proto=udp"Chuck Lever1-15/+14
There have been a number of recent reports that NFSROOT is no longer working with default mount options, but fails only with certain NICs. Brian Downing <[email protected]> bisected to commit 56463e50 "NFS: Use super.c for NFSROOT mount option parsing". Among other things, this commit changes the default mount options for NFSROOT to use TCP instead of UDP as the underlying transport. TCP seems less able to deal with NICs that are slow to initialize. The system logs that have accompanied reports of problems all show that NFSROOT attempts to establish a TCP connection before the NIC is fully initialized, and thus the TCP connection attempt fails. When a TCP connection attempt fails during a mount operation, the NFS stack needs to fail the operation. Usually user space knows how and when to retry it. The network layer does not report a distinct error code for this particular failure mode. Thus, there isn't a clean way for the RPC client to see that it needs to retry in this case, but not in others. Because NFSROOT is used in some environments where it is not possible to update the kernel command line to specify "udp", the proper thing to do is change NFSROOT to use UDP by default, as it did before commit 56463e50. To make it easier to see how to change default mount options for NFSROOT and to distinguish default settings from mandatory settings, I've adjusted a couple of areas to document the specifics. root_nfs_cat() is also modified to deal with commas properly when concatenating strings containing mount option lists. This keeps root_nfs_cat() call sites simpler, now that we may be concatenating multiple mount option strings. Tested-by: Brian Downing <[email protected]> Tested-by: Mark Brown <[email protected]> Signed-off-by: Chuck Lever <[email protected]> Cc: <[email protected]> # 2.6.37 Signed-off-by: Trond Myklebust <[email protected]>
2011-03-11nfs4: remove duplicated #includeHuang Weiyi1-1/+0
Remove duplicated #include('s) in fs/nfs/nfs4proc.c Signed-off-by: Huang Weiyi <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-11NFSv4: nfs4_state_mark_reclaim_nograce() should be staticTrond Myklebust2-4/+2
There are no more external users of nfs4_state_mark_reclaim_nograce() or nfs4_state_mark_reclaim_reboot(), so mark them as static. Signed-off-by: Trond Myklebust <[email protected]>
2011-03-11NFSv4: Fix the setlk error handlerTrond Myklebust1-9/+4
Signed-off-by: Trond Myklebust <[email protected]>
2011-03-11NFSv4.1: Fix the handling of the SEQUENCE status bitsTrond Myklebust1-3/+8
We want SEQUENCE status bits to be handled by the state manager in order to avoid threading issues. Signed-off-by: Trond Myklebust <[email protected]>
2011-03-11NFSv4/4.1: Fix nfs4_schedule_state_recovery abusesTrond Myklebust4-34/+52
nfs4_schedule_state_recovery() should only be used when we need to force the state manager to check the lease. If we just want to start the state manager in order to handle a state recovery situation, we should be using nfs4_schedule_state_manager(). This patch fixes the abuses of nfs4_schedule_state_recovery() by replacing its use with a set of helper functions that do the right thing. Signed-off-by: Trond Myklebust <[email protected]>
2011-03-11block: fix mis-synchronisation in blkdev_issue_zeroout()Lukas Czerner1-12/+7
BZ29402 https://bugzilla.kernel.org/show_bug.cgi?id=29402 We can hit serious mis-synchronization in bio completion path of blkdev_issue_zeroout() leading to a panic. The problem is that when we are going to wait_for_completion() in blkdev_issue_zeroout() we check if the bb.done equals issued (number of submitted bios). If it does, we can skip the wait_for_completition() and just out of the function since there is nothing to wait for. However, there is a ordering problem because bio_batch_end_io() is calling atomic_inc(&bb->done) before complete(), hence it might seem to blkdev_issue_zeroout() that all bios has been completed and exit. At this point when bio_batch_end_io() is going to call complete(bb->wait), bb and wait does not longer exist since it was allocated on stack in blkdev_issue_zeroout() ==> panic! (thread 1) (thread 2) bio_batch_end_io() blkdev_issue_zeroout() if(bb) { ... if (bb->end_io) ... bb->end_io(bio, err); ... atomic_inc(&bb->done); ... ... while (issued != atomic_read(&bb.done)) ... (let issued == bb.done) ... (do the rest of the function) ... return ret; complete(bb->wait); ^^^^^^^^ panic We can fix this easily by simplifying bio_batch and completion counting. Also remove bio_end_io_t *end_io since it is not used. Signed-off-by: Lukas Czerner <[email protected]> Reported-by: Eric Whitney <[email protected]> Tested-by: Eric Whitney <[email protected]> Reviewed-by: Jeff Moyer <[email protected]> CC: Dmitry Monakhov <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-03-11mtd: add "platform:" prefix for platform modaliasAxel Lin3-3/+3
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Cc: [email protected]
2011-03-11mtd: mtd_blkdevs: fix double free on error pathMaxim Levitsky1-1/+0
This one liner patch fixes double free that will occur if add_mtd_blktrans_dev fails. On failure it frees the input argument, but all its users also free it on error which is natural thing to do. Thus don't free it. All credit for finding that bug belongs to reporters of the bug in the android bugzilla http://code.google.com/p/android/issues/detail?id=13761 Commit message tweaked by Artem. Signed-off-by: Maxim Levitsky <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Cc: [email protected]
2011-03-11mtd: amd76xrom: fix oops at boot when resources are not availableStanislaw Gruszka1-0/+1
For some unknown reasons resources needed by amd76xrom driver can be unavailable. And instead of returning an error, the driver keeps going and crash the kernel. This patch fixes the problem by making the driver return -EBUSY if the resources are not available. Commit messages tweaked by Artem. Reported-by: Russell Whitaker <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Cc: [email protected]
2011-03-11mtd: fix race in cfi_cmdset_0001 driverJoakim Tjernlund1-21/+22
As inval_cache_and_wait_for_operation() drop and reclaim the lock to invalidate the cache, some other thread may suspend the operation before reaching the for(;;) loop. Therefore the loop must start with checking the chip->state before reading status from the chip. Signed-off-by: Joakim Tjernlund <[email protected]> Acked-by: Michael Cashwell <[email protected]> Acked-by: Stefan Bigler <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Cc: [email protected]
2011-03-11mtd: jedec_probe: initialise make sector erase command variableAntony Pavlov1-2/+3
In the commit 08968041bef437ec363623cd3218c2b083537ada (mtd: cfi_cmdset_0002: make sector erase command variable) introdused a field sector_erase_cmd. In the same commit initialisation of cfi->sector_erase_cmd made in cfi_chip_setup() (file drivers/mtd/chips/cfi_probe.c), so the CFI chip has no problem: ... cfi->cfi_mode = CFI_MODE_CFI; cfi->sector_erase_cmd = CMD(0x30); ... But for the JEDEC chips this initialisation is not carried out, so the JEDEC chips have sector_erase_cmd == 0. This patch adds the missing initialisation. Signed-off-by: Antony Pavlov <[email protected]> Acked-by: Guillaume LECERF <[email protected]> Signed-off-by: David Woodhouse <[email protected]> CC: [email protected]
2011-03-11mtd: jedec_probe: Change variable name from cfi_p to cfiAntony Pavlov1-16/+16
In the following commit, we'll need to use the CMD() macro in order to fix the initialisation of the sector_erase_cmd field. That requires the local variable to be called 'cfi', so change it first in a simple patch. Signed-off-by: Antony Pavlov <[email protected]> Acked-by: Guillaume LECERF <[email protected]> Signed-off-by: David Woodhouse <[email protected]> CC: [email protected]
2011-03-11drm/radeon: add pageflip hooks for fusionDave Airlie1-0/+3
Looks like these got passed over with both being merged at the same time but not quite meeting in the middle. should fix: https://bugs.freedesktop.org/show_bug.cgi?id=34137 along with Michael's phoronix article. Reported-by: Chi-Thanh Christopher Nguyen Article-written-by: Michael Larabel @ phoronix Signed-off-by: Dave Airlie <[email protected]>
2011-03-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds21-110/+182
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: ariadne: remove redundant NULL check ip6ip6: autoload ip6 tunnel net: bridge builtin vs. ipv6 modular ipv6: Don't create clones of host routes. pktgen: fix errata in show results ipv4: Fix erroneous uses of ifa_address. vxge: update MAINTAINERS r6040: bump to version 0.27 and date 23Feb2011 r6040: fix multicast operations rds: prevent BUG_ON triggering on congestion map updates bonding 802.3ad: Rename rx_machine_lock to state_machine_lock bonding 802.3ad: Fix the state machine locking v2 drivers/net/macvtap: fix error check net: fix multithreaded signal handling in unix recv routines net: Enter net/ipv6/ even if CONFIG_IPV6=n net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem bnx2x: fix MaxBW configuration bnx2x: (NPAR) prevent HW access in D3 state bnx2x: fix link notification bnx2x: fix non-pmf device load flow Doing my first --no-ff merge here, to get the explicit merge commit. David did a back-merge in order to get commit 8909c9ad8ff0 ("net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules") so that we can add Stephen Hemminger's fix to handle ip6 tunnels as well, which uses the MODULE_ALIAS_NETDEV() macro created by that change.
2011-03-10ariadne: remove redundant NULL check[email protected]1-5/+0
Simply remove redundant 'dev' NULL check. Signed-off-by: Jinqiu Yang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-10ip6ip6: autoload ip6 tunnelstephen hemminger1-0/+1
Add necessary alias to autoload ip6ip6 tunnel module. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-10Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller149-472/+1159
2011-03-10net: bridge builtin vs. ipv6 modularRandy Dunlap1-0/+1
When configs BRIDGE=y and IPV6=m, this build error occurs: br_multicast.c:(.text+0xa3341): undefined reference to `ipv6_dev_get_saddr' BRIDGE_IGMP_SNOOPING is boolean; if it were tristate, then adding depends on IPV6 || IPV6=n to BRIDGE_IGMP_SNOOPING would be a good fix. As it is currently, making BRIDGE depend on the IPV6 config works. Reported-by: Patrick Schaaf <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-10Merge branch 'media_fixes' of ↵Linus Torvalds21-63/+283
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: [media] mantis_pci: remove asm/pgtable.h include [media] tda829x: fix regression in probe functions [media] mceusb: don't claim multifunction device non-IR parts [media] nuvoton-cir: fix wake from suspend [media] cx18: Add support for Hauppauge HVR-1600 models with s5h1411 [media] ivtv: Fix corrective action taken upon DMA ERR interrupt to avoid hang [media] cx25840: fix probing of cx2583x chips [media] cx23885: Remove unused 'err:' labels to quiet compiler warning [media] cx23885: Revert "Check for slave nack on all transactions" [media] DiB7000M: add pid filtering [media] Fix sysfs rc protocol lookup for rc-5-sz [media] au0828: fix VBI handling when in V4L2 streaming mode [media] ir-raw: Properly initialize the IR event (BZ#27202) [media] s2255drv: firmware re-loading changes [media] Fix double free of video_device in mem2mem_testdev [media] DM04/QQBOX memcpy to const char fix
2011-03-10ipmi: Fix IPMI errors due to timing problemsDoe, YiCheng1-0/+8
This patch fixes an issue in OpenIPMI module where sometimes an ABORT command is sent after sending an IPMI request to BMC causing the IPMI request to fail. Signed-off-by: YiCheng Doe <[email protected]> Signed-off-by: Corey Minyard <[email protected]> Acked-by: Tom Mingarelli <[email protected]> Tested-by: Andy Cress <[email protected]> Tested-by: Mika Lansirine <[email protected]> Tested-by: Brian De Wolf <[email protected]> Cc: Jean Michel Audet <[email protected]> Cc: Jozef Sudelsky <[email protected]> Acked-by: Matthew Garrett <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-10Merge branch 'for-linus' of ↵Linus Torvalds10-41/+39
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: fs/dcache: allow d_obtain_alias() to return unhashed dentries Check for immutable/append flag in fallocate path sysctl: the include of rcupdate.h is only needed in the kernel fat: fix d_revalidate oopsen on NFS exports jfs: fix d_revalidate oopsen on NFS exports ocfs2: fix d_revalidate oopsen on NFS exports gfs2: fix d_revalidate oopsen on NFS exports fuse: fix d_revalidate oopsen on NFS exports ceph: fix d_revalidate oopsen on NFS exports reiserfs xattr ->d_revalidate() shouldn't care about RCU /proc/self is never going to be invalidated...
2011-03-10Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds4-9/+10
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, UV: Initialize the broadcast assist unit base destination node id properly x86, numa: Fix numa_emulation code with memory-less node0 x86, build: Make sure mkpiggy fails on read error
2011-03-10Merge branch 'sched-fixes-for-linus' of ↵Linus Torvalds1-5/+9
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix sched rt group scheduling when hierachy is enabled
2011-03-10Merge branch 'perf/urgent' of ↵Linus Torvalds2-4/+9
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf symbols: Avoid resolving [kernel.kallsyms] to real path for buildid cache perf symbols: Fix vmlinux path when not using --symfs
2011-03-10drm/i915: Revive combination mode for backlight controlTakashi Iwai2-0/+46
This reverts commit 951f3512dba5bd44cda3e5ee22b4b522e4bb09fb drm/i915: Do not handle backlight combination mode specially since this commit introduced other regressions due to untouched LBPC register, e.g. the backlight dimmed after resume. In addition to the revert, this patch includes a fix for the original issue (weird backlight levels) by removing the wrong bit shift for computing the current backlight level. Also, including typo fixes (lpbc -> lbpc). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34524 Acked-by: Indan Zupancic <[email protected]> Reviewed-by: Keith Packard <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-10NFSv4.1 reclaim complete must wait for completionAndy Adamson1-0/+3
Signed-off-by: Andy Adamson <[email protected]> [Trond: fix whitespace errors] Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10NFSv4: remove duplicate clientid in struct nfs_clientAndy Adamson2-4/+2
Signed-off-by: Andy Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10NFSv4.1: Retry CREATE_SESSION on NFS4ERR_DELAYRicardo Labiaga1-1/+11
Fix bug where we currently retry the EXCHANGEID call again, eventhough we already have a valid clientid. Instead, delay and retry the CREATE_SESSION call. Signed-off-by: Ricardo Labiaga <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10sunrpc: Propagate errors from xs_bind() through xs_create_sock()Ben Hutchings1-1/+2
xs_create_sock() is supposed to return a pointer or an ERR_PTR-encoded error, but it currently returns 0 if xs_bind() fails. Signed-off-by: Ben Hutchings <[email protected]> Cc: [email protected] [v2.6.37] Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10(try3-resend) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit ↵Frank Filz1-1/+6
31 or 63 are set in fileid The problem was use of an int32, which when converted to a uint64 is sign extended resulting in a fileid that doesn't fit in 32 bits even though the intent of the function is to fit the fileid into 32 bits. Signed-off-by: Frank Filz <[email protected]> Reviewed-by: Jeff Layton <[email protected]> [Trond: Added an include for compat.h] Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10nfs: fix compilation warningJovi Zhang1-1/+1
this commit fix compilation warning as following: linux-2.6/fs/nfs/nfs4proc.c:3265: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Jovi Zhang <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10nfs: add kmalloc return value check in decode_and_add_dsStanislav Fomichev1-0/+4
add kmalloc return value check in decode_and_add_ds Signed-off-by: Stanislav Fomichev <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10SUNRPC: Remove resource leak in svc_rdma_send_error()Jesper Juhl1-0/+1
We leak the memory allocated to 'ctxt' when we return after 'ib_dma_mapping_error()' returns !=0. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10nfs: close NFSv4 COMMIT vs. CLOSE raceJeff Layton1-0/+2
I've been adding in more artificial delays in the NFSv4 commit and close codepaths to uncover races. The kernel I'm testing has the patch to close the race in __rpc_wait_for_completion_task that's in Trond's cthon2011 branch. The reproducer I've been using does this in a loop: mkdir("DIR"); fd = open("DIR/FILE", O_WRONLY|O_CREAT|O_EXCL, 0644); write(fd, "abcdefg", 7); close(fd); unlink("DIR/FILE"); rmdir("DIR"); The above reproducer shouldn't result in any silly-renaming. However, when I add a "msleep(100)" just after the nfs_commit_clear_lock call in nfs_commit_release, I can almost always force one to occur. If I can force it to occur with that, then it can happen without that delay given the right timing. nfs_commit_inode waits for the NFS_INO_COMMIT bit to clear when called with FLUSH_SYNC set. nfs_commit_rpcsetup on the other hand does not wait for the task to complete before putting its reference to it, so the last reference get put in rpc_release task and gets queued to a workqueue. In this situation, the last open context reference may be put by the COMMIT release instead of the close() syscall. The close() syscall returns too quickly and the unlink runs while the d_count is still high since the COMMIT release hasn't put its dentry reference yet. Fix this by having rpc_commit_rpcsetup wait for the RPC call to complete before putting the task reference when FLUSH_SYNC is set. With this, the last reference is put by the process that's initiating the FLUSH_SYNC commit and the race is closed. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10SUNRPC: Close a race in __rpc_wait_for_completion_task()Trond Myklebust5-17/+66
Although they run as rpciod background tasks, under normal operation (i.e. no SIGKILL), functions like nfs_sillyrename(), nfs4_proc_unlck() and nfs4_do_close() want to be fully synchronous. This means that when we exit, we want all references to the rpc_task to be gone, and we want any dentry references etc. held by that task to be released. For this reason these functions call __rpc_wait_for_completion_task(), followed by rpc_put_task() in the expectation that the latter will be releasing the last reference to the rpc_task, and thus ensuring that the callback_ops->rpc_release() has been called synchronously. This patch fixes a race which exists due to the fact that rpciod calls rpc_complete_task() (in order to wake up the callers of __rpc_wait_for_completion_task()) and then subsequently calls rpc_put_task() without ensuring that these two steps are done atomically. In order to avoid adding new spin locks, the patch uses the existing waitqueue spin lock to order the rpc_task reference count releases between the waiting process and rpciod. The common case where nobody is waiting for completion is optimised for by checking if the RPC_TASK_ASYNC flag is cleared and/or if the rpc_task reference count is 1: in those cases we drop trying to grab the spin lock, and immediately free up the rpc_task. Those few processes that need to put the rpc_task from inside an asynchronous context and that do not care about ordering are given a new helper: rpc_put_task_async(). Signed-off-by: Trond Myklebust <[email protected]>