1. 24 6月, 2009 6 次提交
  2. 23 6月, 2009 6 次提交
  3. 21 6月, 2009 1 次提交
  4. 20 6月, 2009 2 次提交
    • O
      fat: Fix the removal of opts->fs_dmask · 3e107603
      OGAWA Hirofumi 提交于
      (ce3b0f8d: New helper - current_umask())
      is removing the opts->fs_dmask, probably it's a cut-and-paste
      miss or something.
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      3e107603
    • E
      inotify: inotify_destroy_mark_entry could get called twice · 528da3e9
      Eric Paris 提交于
      inotify_destroy_mark_entry could get called twice for the same mark since it
      is called directly in inotify_rm_watch and when the mark is being destroyed for
      another reason.  As an example assume that the file being watched was just
      deleted so inotify_destroy_mark_entry would get called from the path
      fsnotify_inoderemove() -> fsnotify_destroy_marks_by_inode() ->
      fsnotify_destroy_mark_entry() -> inotify_destroy_mark_entry().  If this
      happened at the same time as userspace tried to remove a watch via
      inotify_rm_watch we could attempt to remove the mark from the idr twice and
      could thus double dec the ref cnt and potentially could be in a use after
      free/double free situation.  The fix is to have inotify_rm_watch use the
      generic recursive safe fsnotify_destroy_mark_by_entry() so we are sure the
      inotify_destroy_mark_entry() function can only be called one.
      
      This patch also renames the function to inotify_ingored_remove_idr() so it is
      clear what is actually going on in the function.
      
      Hopefully this fixes:
      [   20.342058] idr_remove called for id=20 which is not allocated.
      [   20.348000] Pid: 1860, comm: udevd Not tainted 2.6.30-tip #1077
      [   20.353933] Call Trace:
      [   20.356410]  [<ffffffff811a82b7>] idr_remove+0x115/0x18f
      [   20.361737]  [<ffffffff8134259d>] ? _spin_lock+0x6d/0x75
      [   20.367061]  [<ffffffff8111640a>] ? inotify_destroy_mark_entry+0xa3/0xcf
      [   20.373771]  [<ffffffff8111641e>] inotify_destroy_mark_entry+0xb7/0xcf
      [   20.380306]  [<ffffffff81115913>] inotify_freeing_mark+0xe/0x10
      [   20.386238]  [<ffffffff8111410d>] fsnotify_destroy_mark_by_entry+0x143/0x170
      [   20.393293]  [<ffffffff811163a3>] inotify_destroy_mark_entry+0x3c/0xcf
      [   20.399829]  [<ffffffff811164d1>] sys_inotify_rm_watch+0x9b/0xc6
      [   20.405850]  [<ffffffff8100bcdb>] system_call_fastpath+0x16/0x1b
      Reported-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Tested-by: NPeter Ziljlstra <peterz@infradead.org>
      528da3e9
  5. 19 6月, 2009 21 次提交
  6. 18 6月, 2009 4 次提交
    • P
      fs: Provide empty .set_page_dirty() aop for anon inodes · d3a9262e
      Peter Zijlstra 提交于
      .set_page_dirty() is one of those a_ops that defaults to the
      buffer implementation when not set. Therefore provide a dummy
      function to make it do nothing.
      
      (Uncovered by perfcounters fd's which can now be writable-mmap-ed.)
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d3a9262e
    • J
      nfs: remove unnecessary NFS_INO_INVALID_ACL checks · 4bf259e3
      James Morris 提交于
      Unless I'm mistaken, NFS_INO_INVALID_ACL is being checked twice during
      getacl calls (i.e. first via nfs_revalidate_inode() and then by each all
      site).
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4bf259e3
    • C
      NFS: More "sloppy" parsing problems · a5a16bae
      Chuck Lever 提交于
      Specifying "port=-5" with the kernel's current mount option parser
      generates "unrecognized mount option".  If "sloppy" is set, this
      causes the mount to succeed and use the default values; the desired
      behavior is that, since this is a valid option with an invalid value,
      the mount should fail, even with "sloppy."
      
      To properly handle "sloppy" parsing, we need to distinguish between
      correct options with invalid values, and incorrect options.  We will
      need to parse integer values by hand, therefore, and not rely on
      match_token().
      
      For instance, these must all fail with "invalid value":
      
      	port=12345678
      	port=-5
      	port=samuel
      
      and not with "unrecognized option," as they do currently.
      
      Thus, for the sake of match_token() we need to treat the values for
      these options as strings, and do the conversion to integers using
      strict_strtol().
      
      This is basically the same solution we used for the earlier "retry="
      fix (commit ecbb3845), except in this case the kernel actually has to
      parse the value, rather than ignore it.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a5a16bae
    • C
      NFS: Invalid mount option values should always fail, even with "sloppy" · d23c45fd
      Chuck Lever 提交于
      Ian Kent reports:
      
      "I've noticed a couple of other regressions with the options vers
      and proto option of mount.nfs(8).
      
      The commands:
      
      mount -t nfs -o vers=<invalid version> <server>:/<path> /<mountpoint>
      mount -t nfs -o proto=<invalid proto> <server>:/<path> /<mountpoint>
      
      both immediately fail.
      
      But if the "-s" option is also used they both succeed with the
      mount falling back to defaults (by the look of it).
      
      In the past these failed even when the sloppy option was given, as
      I think they should. I believe the sloppy option is meant to allow
      the mount command to still function for mount options (for example
      in shared autofs maps) that exist on other Unix implementations but
      aren't present in the Linux mount.nfs(8). So, an invalid value
      specified for a known mount option is different to an unknown mount
      option and should fail appropriately."
      
      See RH bugzilla 486266.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d23c45fd