1. 25 Jul, 2012 4 commits
  2. 12 Jul, 2012 1 commit
    • NeilBrown's avatar
      SUNRPC/cache: fix reporting of expired cache entries in 'content' file. · 200724a7
      NeilBrown authored
      Entries that are in a sunrpc cache but are not valid should be reported
      with a leading '#' so they look like a comment.
      Commit  d202cce8 (sunrpc: never return expired entries in sunrpc_cache_lookup)
      broke this for expired entries.
      
      This particularly applies to entries that have been replaced by newer entries.
      sunrpc_cache_update sets the expiry of the replaced entry to '0', but it
      remains in the cache until the next 'cache_clean'.
      The result is that if you
      
        echo 0 2000000000 1 0 > /proc/net/rpc/auth.unix.gid/channel
      
      several times, then
      
        cat /proc/net/rpc/auth.unix.gid/content
      
      It will display multiple entries for the one uid, which is at least confusing:
      
        #uid cnt: gids...
        0 1: 0
        0 1: 0
        0 1: 0
      
      With this patch, expired entries are marked as comments so you get
      
        #uid cnt: gids...
        0 1: 0
        # 0 1: 0
        # 0 1: 0
      
      These expired entries will never be seen by cache_check() as they are always
      *after* a non-expired entry with the same key - so the extra check is only
      needed in c_show()
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      
      --
      It's not a big problem, but it had me confused for a while, so it could
      well confuse others.
      Thanks,
      NeilBrown
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      200724a7
  3. 11 Jul, 2012 2 commits
  4. 10 Jul, 2012 4 commits
    • J. Bruce Fields's avatar
      nfsd: share some function prototypes · 7f2e7dc0
      J. Bruce Fields authored
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      7f2e7dc0
    • J. Bruce Fields's avatar
      nfsd: allow owner_override only for regular files · d91d0b56
      J. Bruce Fields authored
      We normally allow the owner of a file to override permissions checks on
      IO operations, since:
      	- the client will take responsibility for doing an access check
      	  on open;
      	- the permission checks offer no protection against malicious
      	  clients--if they can authenticate as the file's owner then
      	  they can always just change its permissions;
      	- checking permission on each IO operation breaks the usual
      	  posix rule that permission is checked only on open.
      
      However, we've never allowed the owner to override permissions on
      readdir operations, even though the above logic would also apply to
      directories.  I've never heard of this causing a problem, probably
      because a) simultaneously opening and creating a directory (with
      restricted mode) isn't possible, and b) opening a directory, then
      chmod'ing it, is rare.
      
      Our disallowal of owner-override on directories appears to be an
      accident, though--the readdir itself succeeds, and then we fail just
      because lookup_one_len() calls in our filldir methods fail.
      
      I'm not sure what the easiest fix for that would be.  For now, just make
      this behavior obvious by denying the override right at the start.
      
      This also fixes some odd v4 behavior: with the rdattr_error attribute
      requested, it would perform the readdir but return an ACCES error with
      each entry.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      d91d0b56
    • J. Bruce Fields's avatar
      nfsd4: release openowners on free in >=4.1 case · 74dbafaf
      J. Bruce Fields authored
      We don't need to keep openowners around in the >=4.1 case, because they
      aren't needed to handle CLOSE replays any more (that's a problem for
      sessions).  And doing so causes unexpected failures on a subsequent
      destroy_clientid to fail.
      
      We probably also need something comparable for lock owners on last
      unlock.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      74dbafaf
    • J. Bruce Fields's avatar
      nfsd4: our filesystems are normally case sensitive · 2930d381
      J. Bruce Fields authored
      Actually, xfs and jfs can optionally be case insensitive; we'll handle
      that case in later patches.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      2930d381
  5. 20 Jun, 2012 5 commits
    • J. Bruce Fields's avatar
      nfsd4: process_open2 cleanup · 4af82504
      J. Bruce Fields authored
      Note we can simplify the error handling a little by doing the truncate
      earlier.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      4af82504
    • J. Bruce Fields's avatar
      nfsd4: nfsd4_lock() cleanup · e1aaa891
      J. Bruce Fields authored
      Share a little common logic.  And note the comments here are a little
      out of date (e.g. we don't always create new state in the "new" case any
      more.)
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      e1aaa891
    • J. Bruce Fields's avatar
      nfsd4: remove unnecessary comment · 9068bed1
      J. Bruce Fields authored
      For the most part readers of cl_cb_state only need a value that is
      "eventually" right.  And the value is set only either 1) in response to
      some change of state, in which case it's set to UNKNOWN and then a
      callback rpc is sent to probe the real state, or b) in the handling of a
      response to such a callback.  UNKNOWN is therefore always a "temporary"
      state, and for the other states we're happy to accept last writer wins.
      
      So I think we're OK here.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      9068bed1
    • Chuck Lever's avatar
      NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID · 7df302f7
      Chuck Lever authored
      According to RFC 5661, the TEST_STATEID operation is not allowed to
      return NFS4ERR_STALE_STATEID.  In addition, RFC 5661 says:
      
      15.1.16.5.  NFS4ERR_STALE_STATEID (Error Code 10023)
      
         A stateid generated by an earlier server instance was used.  This
         error is moot in NFSv4.1 because all operations that take a stateid
         MUST be preceded by the SEQUENCE operation, and the earlier server
         instance is detected by the session infrastructure that supports
         SEQUENCE.
      
      I triggered NFS4ERR_STALE_STATEID while testing the Linux client's
      NOGRACE recovery.  Bruce suggested an additional test that could be
      useful to client developers.
      
      Lastly, RFC 5661, section 18.48.3 has this:
      
       o  Special stateids are always considered invalid (they result in the
          error code NFS4ERR_BAD_STATEID).
      
      An explicit check is made for those state IDs to avoid printk noise.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      7df302f7
    • Weston Andros Adamson's avatar
      nfsd: probe the back channel on new connections · 24119673
      Weston Andros Adamson authored
      Initiate a CB probe when a new connection with the correct direction is added
      to a session (IFF backchannel is marked as down).  Without this a
      BIND_CONN_TO_SESSION has no effect on the internal backchannel state, which
      causes the server to reply to every SEQUENCE op with the
      SEQ4_STATUS_CB_PATH_DOWN flag set until DESTROY_SESSION.
      Signed-off-by: default avatarWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      24119673
  6. 18 Jun, 2012 5 commits
    • Linus Torvalds's avatar
      Merge tag 'mmc-fixes-for-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 9023a409
      Linus Torvalds authored
      Pull MMC fixes from Chris Ball:
       - atmel-mci: Fixes for NULL timer and DMA burst/chunk size
       - dw_mmc: Fix DMA ordering, clkdiv calculation, NULL host->data
       - mxs_mmc: Compile fix for CONFIG_OF=y && CONFIG_PM=n
       - omap: Fix NULL deref in mmc_omap_remove_slot(), reg_shift initialization
       - sdhci-s3c: Fix boot regression by adding IRQF_ONESHOT flag
       - Small fixes to core/sd, core/sdio, sdhci
      
      * tag 'mmc-fixes-for-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
        mmc: mxs-mmc: Move of_match_table out of CONFIG_PM
        mmc: sdhci-s3c: pass IRQF ONESHOT to request threaded irq
        mmc: core: return an error on suspend if mmc_deselect_cards fails
        mmc: omap: Fix broken reg_shift initialization
        mmc: omap: Fix NULL pointer dereference if mmc_omap_new_slot() fails
        mmc: omap: Fix a section warning regression
        mmc: dw_mmc: correct the calculation for CLKDIV
        mmc: dw_mmc: fix incorrect setting of host->data of NULL
        mmc: dw_mmc: fix the IDMAC sw reset
        mmc: dw_mmc: fix the transmission handling in IDMAC
        mmc: sdio: fix setting card data bus width as 4-bit
        mmc: atmel-mci: fix burst/chunk size modification
        mmc: atmel-mci: fix data timeout issue
        mmc: sdhci: Use DBG() instead of pr_warning() on large timeout
      9023a409
    • Linus Torvalds's avatar
      Merge tag 'rproc-fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc · 1bea57f5
      Linus Torvalds authored
      Pull remoteproc fixes from Ohad Ben-Cohen:
       "A few relatively-small remoteproc fixes for 3.5: two error path fixes,
        and one -Wformat warning fix."
      
      * tag 'rproc-fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
        remoteproc/omap: fix dev_err typo
        remoteproc: fix missing fault indication in error-path
        remoteproc: fix print format warnings
      1bea57f5
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 4005af65
      Linus Torvalds authored
      Pull hwmon subsystem fixes from Jean Delvare.
      
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        hwmon: (coretemp) Drop needless initialization
        hwmon: (coretemp) Document TjMax for 3rd generation i5/i7 processors
        hwmon: (coretemp) Improve support for TjMax detection on Atom CPUs
        hwmon: (coretemp) Add support for Atom D2000 and N2000 series CPU models
        hwmon: (coretemp) Improve support of recent Atom CPU models
      4005af65
    • Paul Mundt's avatar
      bug.h: Fix up powerpc build regression. · 2603efa3
      Paul Mundt authored
      The asm-generic/bug.h __ASSEMBLY__ guarding is completely bogus, which
      tripped up the powerpc build when the kernel.h include was added:
      
      	In file included from include/asm-generic/bug.h:5:0,
      			 from arch/powerpc/include/asm/bug.h:127,
      			 from arch/powerpc/kernel/head_64.S:31:
      	include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
      	include/linux/linkage.h:57:0: note: this is the location of the previous definition
      	include/linux/sysinfo.h: Assembler messages:
      	include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
      	include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'
      
      Moving the __ASSEMBLY__ guard up and stashing the kernel.h include under
      it fixes this up, as well as covering the case the original fix was
      attempting to handle.
      Tested-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2603efa3
    • Paul Mundt's avatar
      Makefile: fix up CROSS_COMPILE and READABLE_ASM interaction. · a1f42beb
      Paul Mundt authored
      When the READABLE_ASM cc-option tests were added they were done so prior
      to the arch Makefile include, resulting in cc-option being run on the
      host cc instead of the factoring in the cross prefix set up by the
      architecture.
      
      This bumps the include back up so that cc-option actually runs on the
      compiler that we're building with.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a1f42beb
  7. 17 Jun, 2012 17 commits
  8. 16 Jun, 2012 2 commits
    • Linus Torvalds's avatar
      Merge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6 · 88c144b1
      Linus Torvalds authored
      Pull fbdev fixes from Florian Tobias Schandinat:
      
       - two fixes for s3c-fb by Jingoo Han (including a fix for a potential
         division by zero)
      
       - a couple of randconfig fixes by Arnd Bergmann
      
       - a cleanup for bfin_adv7393fb by Emil Goode
      
      * tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6:
        video: s3c-fb: fix possible division by zero in s3c_fb_calc_pixclk
        video: s3c-fb: clear SHADOWCON register when clearing hardware window registers
        drivers/tosa: driver needs I2C and SPI to compile
        drivers/savagefb: use mdelay instead of udelay
        video/console: automatically select a font
        video/ili9320: do not mark exported functions __devexit
        drivers/video: use correct __devexit_p annotation
        video: bfin_adv7393fb: Convert to kstrtouint_from_user
      88c144b1
    • Chris Metcalf's avatar
      tile: fix bug in get_user() for 4-byte values · 6699c8cd
      Chris Metcalf authored
      The definition of 32-bit values in the 64-bit tilegx architecture is that
      they should be sign-extended regardless of whether they are considered
      signed or unsigned by the compiler.  Accordingly, we need to use an
      "ld4s" rather than "ld4u" to load and sign-extend for get_user().
      
      This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
      introduced during the 3.5 merge window.
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      6699c8cd