1. 20 10月, 2012 7 次提交
  2. 18 10月, 2012 7 次提交
  3. 17 10月, 2012 8 次提交
  4. 15 10月, 2012 2 次提交
  5. 13 10月, 2012 10 次提交
  6. 12 10月, 2012 6 次提交
    • A
      tty/console: fix warnings in drivers/tty/serial/kgdboc.c · f2f0945e
      Arnd Bergmann 提交于
      The con_debug_leave/con_debug_enter functions are stubbed out
      by defining them to (0), which causes harmless build warnings.
      Using proper inline functions is the normal way to deal with
      this.
      
      Without this patch, building the ARM bcm2835_defconfig results in:
      
      drivers/tty/serial/kgdboc.c: In function 'kgdboc_pre_exp_handler':
      drivers/tty/serial/kgdboc.c:279:3: warning: statement with no effect [-Wunused-value]
      drivers/tty/serial/kgdboc.c: In function 'kgdboc_post_exp_handler':
      drivers/tty/serial/kgdboc.c:293:3: warning: statement with no effect [-Wunused-value]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Anton Vorontsov <anton.vorontsov@linaro.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      f2f0945e
    • J
      vfs: allocate page instead of names_cache buffer in mount_block_root · a608ca21
      Jeff Layton 提交于
      First, it's incorrect to call putname() after __getname_gfp() since the
      bare __getname_gfp() call skips the auditing code, while putname()
      doesn't.
      
      mount_block_root allocates a PATH_MAX buffer via __getname_gfp, and then
      calls get_fs_names to fill the buffer. That function can call
      get_filesystem_list which assumes that that buffer is a full page in
      size. On arches where PAGE_SIZE != 4k, then this could potentially
      overrun.
      
      In practice, it's hard to imagine the list of filesystem names even
      approaching 4k, but it's best to be safe. Just allocate a page for this
      purpose instead.
      
      With this, we can also remove the __getname_gfp() definition since there
      are no more callers.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a608ca21
    • J
      audit: overhaul __audit_inode_child to accomodate retrying · 4fa6b5ec
      Jeff Layton 提交于
      In order to accomodate retrying path-based syscalls, we need to add a
      new "type" argument to audit_inode_child. This will tell us whether
      we're looking for a child entry that represents a create or a delete.
      
      If we find a parent, don't automatically assume that we need to create a
      new entry. Instead, use the information we have to try to find an
      existing entry first. Update it if one is found and create a new one if
      not.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4fa6b5ec
    • J
      audit: set the name_len in audit_inode for parent lookups · bfcec708
      Jeff Layton 提交于
      Currently, this gets set mostly by happenstance when we call into
      audit_inode_child. While that might be a little more efficient, it seems
      wrong. If the syscall ends up failing before audit_inode_child ever gets
      called, then you'll have an audit_names record that shows the full path
      but has the parent inode info attached.
      
      Fix this by passing in a parent flag when we call audit_inode that gets
      set to the value of LOOKUP_PARENT. We can then fix up the pathname for
      the audit entry correctly from the get-go.
      
      While we're at it, clean up the no-op macro for audit_inode in the
      !CONFIG_AUDITSYSCALL case.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      bfcec708
    • J
      audit: add a new "type" field to audit_names struct · 78e2e802
      Jeff Layton 提交于
      For now, we just have two possibilities:
      
      UNKNOWN: for a new audit_names record that we don't know anything about yet
      NORMAL: for everything else
      
      In later patches, we'll add other types so we can distinguish and update
      records created under different circumstances.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      78e2e802
    • J
      audit: reverse arguments to audit_inode_child · c43a25ab
      Jeff Layton 提交于
      Most of the callers get called with an inode and dentry in the reverse
      order. The compiler then has to reshuffle the arg registers and/or
      stack in order to pass them on to audit_inode_child.
      
      Reverse those arguments for a micro-optimization.
      Reported-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c43a25ab