1. 07 9月, 2016 2 次提交
  2. 03 8月, 2016 1 次提交
    • A
      relay: add global mode support for buffer-only channels · 59dbb2a0
      Akash Goel 提交于
      Commit 20d8b67c ("relay: add buffer-only channels; useful for early
      logging") added support to use channels with no associated files.
      
      This is useful when the exact location of relay file is not known or the
      the parent directory of relay file is not available, while creating the
      channel and the logging has to start right from the boot.
      
      But there was no provision to use global mode with buffer-only channels,
      which is added by this patch, without modifying the interface where
      initially there will be a dummy invocation of create_buf_file callback
      through which kernel client can convey the need of a global buffer.
      
      For the use case where drivers/kernel clients want a simple interface
      for the userspace, which enables them to capture data/logs from relay
      file inorder & without any post processing, support of Global buffer
      mode is warranted.
      
      Modules, like i915, using relay_open() in early init would have to later
      register their buffer-only relays, once debugfs is available, by calling
      relay_late_setup_files().  Hence relay_late_setup_files() symbol also
      needs to be exported.
      
      Link: http://lkml.kernel.org/r/1468404563-11653-1-git-send-email-akash.goel@intel.comSigned-off-by: NAkash Goel <akash.goel@intel.com>
      Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      59dbb2a0
  3. 10 6月, 2016 1 次提交
  4. 23 1月, 2016 1 次提交
    • A
      wrappers for ->i_mutex access · 5955102c
      Al Viro 提交于
      parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
      inode_foo(inode) being mutex_foo(&inode->i_mutex).
      
      Please, use those for access to ->i_mutex; over the coming cycle
      ->i_mutex will become rwsem, with ->lookup() done with it held
      only shared.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5955102c
  5. 01 7月, 2015 1 次提交
  6. 16 4月, 2015 1 次提交
  7. 12 4月, 2014 1 次提交
  8. 02 4月, 2014 1 次提交
  9. 19 2月, 2014 1 次提交
  10. 15 7月, 2013 1 次提交
    • P
      kernel: delete __cpuinit usage from all core kernel files · 0db0628d
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      This removes all the uses of the __cpuinit macros from C files in
      the core kernel directories (kernel, init, lib, mm, and include)
      that don't really have a specific maintainer.
      
      [1] https://lkml.org/lkml/2013/5/20/589Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      0db0628d
  11. 01 5月, 2013 3 次提交
  12. 30 4月, 2013 1 次提交
    • D
      relay: move remove_buf_file inside relay_close_buf · b8d4a5bf
      Dmitry Monakhov 提交于
      Currently remove_buf_file callback is called from from kobject
      release method. This result in follow issue:
      # blktrace -d /dev/sda1 -d /dev/sda -o test
      
      blktrace_setup()
       dir = create_dir()
       rchan = relay_open(dir,...)
       ->create_buf_file_callback
          buf_file  = debugfs_create_file(dir, )
      
      Userspace will open buf_file.
      Later we make a decision to stop tracing
      blktrace_down()
        relay_close(rhcan)  /* just decrement kobj reference  */
                            /* since it is not zero then callback not called */
        debugfs_remove(dir) /* FAIL due to non empty dir   */
      
      Later user space will close the file and file will be deleted,
      but directory still exist.
      user_space_close()
       ->file_release
         ->release_buf_file_callback
           ->debugfs_remove(buf_file
      ## TESTCASE:
      # blktrace -d /dev/sda1 -d /dev/sda -o test
      # After that blktrace infrastructure will remain broken in
      # an unusable state so: blktrace -d /dev/sda1 will not work.
      
      In fact this is general issue, blktrace is just one of examples.
      We can not reliably remove parent dir until all users close the
      buf_file.
      
      Solution: We don't have to wait that long. File should be deleted inside
      relay_close_buf().
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b8d4a5bf
  13. 23 2月, 2013 1 次提交
  14. 14 6月, 2012 1 次提交
    • E
      splice: fix racy pipe->buffers uses · 047fe360
      Eric Dumazet 提交于
      Dave Jones reported a kernel BUG at mm/slub.c:3474! triggered
      by splice_shrink_spd() called from vmsplice_to_pipe()
      
      commit 35f3d14d (pipe: add support for shrinking and growing pipes)
      added capability to adjust pipe->buffers.
      
      Problem is some paths don't hold pipe mutex and assume pipe->buffers
      doesn't change for their duration.
      
      Fix this by adding nr_pages_max field in struct splice_pipe_desc, and
      use it in place of pipe->buffers where appropriate.
      
      splice_shrink_spd() loses its struct pipe_inode_info argument.
      Reported-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Tom Herbert <therbert@google.com>
      Cc: stable <stable@vger.kernel.org> # 2.6.35
      Tested-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      047fe360
  15. 10 2月, 2012 1 次提交
  16. 04 1月, 2012 1 次提交
  17. 31 10月, 2011 1 次提交
  18. 05 11月, 2010 1 次提交
  19. 28 5月, 2010 1 次提交
  20. 22 5月, 2010 1 次提交
  21. 07 3月, 2010 1 次提交
  22. 16 12月, 2009 1 次提交
  23. 28 9月, 2009 1 次提交
  24. 03 4月, 2009 1 次提交
  25. 19 2月, 2009 1 次提交
    • I
      timers: add mod_timer_pending() · 74019224
      Ingo Molnar 提交于
      Impact: new timer API
      
      Based on an idea from Martin Josefsson with the help of
      Patrick McHardy and Stephen Hemminger:
      
      introduce the mod_timer_pending() API which is a mod_timer()
      offspring that is an invariant on already removed timers.
      
      (regular mod_timer() re-activates non-pending timers.)
      
      This is useful for the networking code in that it can
      allow unserialized mod_timer_pending() timer-forwarding
      calls, but a single del_timer*() will stop the timer
      from being reactivated again.
      
      Also while at it:
      
      - optimize the regular mod_timer() path some more, the
        timer-stat and a debug check was needlessly duplicated
        in __mod_timer().
      
      - make the exports come straight after the function, as
        most other exports in timer.c already did.
      
      - eliminate __mod_timer() as an external API, change the
        users to mod_timer().
      
      The regular mod_timer() code path is not impacted
      significantly, due to inlining optimizations and due to
      the simplifications.
      
      Based-on-patch-from: Stephen Hemminger <shemminger@vyatta.com>
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: netdev@vger.kernel.org
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      74019224
  26. 19 1月, 2009 1 次提交
  27. 30 12月, 2008 1 次提交
    • I
      relayfs: replace BUG() with WARN_ON() in relay_late_setup_files() · 7a51cffb
      Ingo Molnar 提交于
      Impact: turn boot crash into boot warning
      
      This BUG() can trigger:
      
      [   16.684131] initcall fail_page_alloc_debugfs+0x0/0xc1 returned 0 after 0 usecs
      [   16.692035] calling  kmemtrace_setup_late+0x0/0xd5 @ 1
      [   16.700087] relay_late_setup_files: CPU 1 has no buffer, it must have!
      [   16.704044] ------------[ cut here ]------------
      [   16.708030] kernel BUG at kernel/relay.c:680!
      [   16.708030] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
      [   16.708030] last sysfs file:
      [   16.708030]
      [   16.708030] Pid: 1, comm: swapper Not tainted (2.6.28-tip-03903-g9a39f58-dirty #13207) System Product Name
      [   16.708030] EIP: 0060:[<c01604ae>] EFLAGS: 00010246 CPU: 1
      [   16.708030] EIP is at relay_late_setup_files+0x8c/0x176
      
      Reduce it to a more reportable WARN_ONCE().
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7a51cffb
  28. 11 12月, 2008 1 次提交
  29. 18 11月, 2008 1 次提交
  30. 06 8月, 2008 1 次提交
  31. 27 7月, 2008 1 次提交
  32. 28 5月, 2008 1 次提交
  33. 08 5月, 2008 1 次提交
  34. 29 4月, 2008 2 次提交
  35. 26 3月, 2008 2 次提交