1. 30 4月, 2008 2 次提交
  2. 15 2月, 2008 2 次提交
  3. 26 1月, 2008 2 次提交
    • J
      configfs: file.c fix possible recursive locking · 116ba5d5
      Joonwoo Park 提交于
      configfs_register_subsystem() with default_groups triggers recursive locking.
      it seems that mutex_lock_nested is needed.
      
      =============================================
      [ INFO: possible recursive locking detected ]
      2.6.24-rc6 #145
      ---------------------------------------------
      swapper/1 is trying to acquire lock:
       (&sb->s_type->i_mutex_key#3){--..}, at: [<c40c9a9e>] configfs_add_file+0x2e/0x70
      
      but task is already holding lock:
       (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca985>] configfs_register_subsystem+0x55/0x130
      
      other info that might help us debug this:
      1 lock held by swapper/1:
       #0:  (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca985>] configfs_register_subsystem+0x55/0x130
      
      stack backtrace:
      Pid: 1, comm: swapper Not tainted 2.6.24-rc6 #145
       [<c40053ba>] show_trace_log_lvl+0x1a/0x30
       [<c4005e82>] show_trace+0x12/0x20
       [<c400687e>] dump_stack+0x6e/0x80
       [<c404ec72>] __lock_acquire+0xe62/0x1120
       [<c404efb2>] lock_acquire+0x82/0xa0
       [<c43fda88>] mutex_lock_nested+0x98/0x2e0
       [<c40c9a9e>] configfs_add_file+0x2e/0x70
       [<c40c9b0c>] configfs_create_file+0x2c/0x40
       [<c40ca639>] configfs_attach_item+0x139/0x220
       [<c40ca734>] configfs_attach_group+0x14/0x140
       [<c40ca7e9>] configfs_attach_group+0xc9/0x140
       [<c40ca9f6>] configfs_register_subsystem+0xc6/0x130
       [<c45c8186>] init_netconsole+0x2b6/0x300
       [<c45a75f2>] kernel_init+0x142/0x320
       [<c4004fb3>] kernel_thread_helper+0x7/0x14
       =======================
      Signed-off-by: NJoonwoo Park <joonwpark81@gmail.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      116ba5d5
    • J
      configfs: dir.c fix possible recursive locking · ba611edf
      Joonwoo Park 提交于
      configfs_register_subsystem() with default_groups triggers recursive locking.
      it seems that mutex_lock_nested is needed.
      
      =============================================
      [ INFO: possible recursive locking detected ]
      2.6.24-rc6 #141
      ---------------------------------------------
      swapper/1 is trying to acquire lock:
       (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca76f>] configfs_attach_group+0x4f/0x190
      
      but task is already holding lock:
       (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca9d5>] configfs_register_subsystem+0x55/0x130
      
      other info that might help us debug this:
      1 lock held by swapper/1:
       #0:  (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca9d5>] configfs_register_subsystem+0x55/0x130
      
      stack backtrace:
      Pid: 1, comm: swapper Not tainted 2.6.24-rc6 #141
       [<c40053ba>] show_trace_log_lvl+0x1a/0x30
       [<c4005e82>] show_trace+0x12/0x20
       [<c400687e>] dump_stack+0x6e/0x80
       [<c404ec72>] __lock_acquire+0xe62/0x1120
       [<c404efb2>] lock_acquire+0x82/0xa0
       [<c43fdad8>] mutex_lock_nested+0x98/0x2e0
       [<c40ca76f>] configfs_attach_group+0x4f/0x190
       [<c40caa46>] configfs_register_subsystem+0xc6/0x130
       [<c45c8186>] init_netconsole+0x2b6/0x300
       [<c45a75f2>] kernel_init+0x142/0x320
       [<c4004fb3>] kernel_thread_helper+0x7/0x14
       =======================
      Signed-off-by: NJoonwoo Park <joonwpark81@gmail.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      ba611edf
  4. 25 1月, 2008 5 次提交
  5. 17 10月, 2007 3 次提交
  6. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  7. 11 7月, 2007 7 次提交
    • J
      configfs: config item dependancies. · 631d1feb
      Joel Becker 提交于
      Sometimes other drivers depend on particular configfs items.  For
      example, ocfs2 mounts depend on a heartbeat region item.  If that
      region item is removed with rmdir(2), the ocfs2 mount must BUG or go
      readonly.  Not happy.
      
      This provides two additional API calls: configfs_depend_item() and
      configfs_undepend_item().  A client driver can call
      configfs_depend_item() on an existing item to tell configfs that it is
      depended on.  configfs will then return -EBUSY from rmdir(2) for that
      item.  When the item is no longer depended on, the client driver calls
      configfs_undepend_item() on it.
      
      These API cannot be called underneath any configfs callbacks, as
      they will conflict.  They can block and allocate.  A client driver
      probably shouldn't calling them of its own gumption.  Rather it should
      be providing an API that external subsystems call.
      
      How does this work?  Imagine the ocfs2 mount process.  When it mounts,
      it asks for a heart region item.  This is done via a call into the
      heartbeat code.  Inside the heartbeat code, the region item is looked
      up.  Here, the heartbeat code calls configfs_depend_item().  If it
      succeeds, then heartbeat knows the region is safe to give to ocfs2.
      If it fails, it was being torn down anyway, and heartbeat can gracefully
      pass up an error.
      
      [ Fixed some bad whitespace in configfs.txt. --Mark ]
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      631d1feb
    • J
      configfs: accessing item hierarchy during rmdir(2) · 299894cc
      Joel Becker 提交于
      Add a notification callback, ops->disconnect_notify(). It has the same
      prototype as ->drop_item(), but it will be called just before the item
      linkage is broken. This way, configfs users who want to do work while
      the object is still in the heirarchy have a chance.
      
      Client drivers will still need to config_item_put() in their
      ->drop_item(), if they implement it.  They need do nothing in
      ->disconnect_notify().  They don't have to provide it if they don't
      care.  But someone who wants to be notified before ci_parent is set to
      NULL can now be notified.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      299894cc
    • J
      [PATCH] configsfs buffer: use mutex · 6d748924
      Johannes Berg 提交于
      Seems copied from sysfs, but I don't see a reason here nor there to use
      a semaphore instead of a mutex. Convert.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      6d748924
    • J
      configfs: Convert subsystem semaphore to mutex · e6bd07ae
      Joel Becker 提交于
      Convert the su_sem member of struct configfs_subsystem to a struct
      mutex, as that's what it is. Also convert all the users and update
      Documentation/configfs.txt and Documentation/configfs_example.c
      accordingly.
      
      [ Conflict in fs/dlm/config.c with commit
        3168b078 manually resolved. --Mark ]
      Inspired-by: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      e6bd07ae
    • S
      [PATCH] configfs+dlm: Rename config_group_find_obj and state semantics clearly · 3fe6c5ce
      Satyam Sharma 提交于
      Configfs being based upon sysfs code, config_group_find_obj() is probably
      so named because of the similar kset_find_obj() in sysfs. However,
      "kobject"s in sysfs become "config_item"s in configfs, so let's call it
      config_group_find_item() instead, for sake of uniformity, and make
      corresponding change in the users of this function.
      
      BTW a crucial difference between kset_find_obj and config_group_find_item
      is in locking expectations. kset_find_obj does its locking by itself, but
      config_group_find_item expects the *caller* to do the locking. The reason
      for this: kset's have their own locks, config_group's don't but instead
      rely on the subsystem mutex. And, subsystem needn't necessarily be around
      when config_group_find_item() is called.
      
      So let's state these locking semantics explicitly, and rectify the comment,
      otherwise bugs could continue to occur in future, as they did in the past
      (refer commit d82b8191e238 in gfs2-2.6-fixes.git).
      
      [ I also took the opportunity to fix some bad whitespace and
      double-empty lines. --Joel ]
      
      [ Conflict in fs/dlm/config.c with commit
        3168b078 manually resolved. --Mark ]
      Signed-off-by: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Cc: David Teigland <teigland@redhat.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      3fe6c5ce
    • S
      configfs: misc cleanups · 4c62b534
      Satyam Sharma 提交于
      1. item.c:config_item_cleanup() is a private function (only called by
      config_item_release() in same file). However, it is spuriously
      exported in include/linux/configfs.h, so remove that export and make
      it static in item.c. Also, it is no longer exported / interface
      function, so no need to give comment for this function (the comment
      was stating obvious thing, anyway).
      
      2. Kernel-doc comment format does not allow empty line between end of
      comment and start of function (declaration line). There were several
      such spurious empty lines in item.c, so fix them.
      
        fs/configfs/item.c       |   15 +++------------
        include/linux/configfs.h |    1 -
        2 files changed, 3 insertions(+), 13 deletions(-)
      Signed-off-by: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      4c62b534
    • J
      configfs: consistent attribute size · b23cdde4
      Joel Becker 提交于
      The attribute store/show code currently limits attributes at PAGE_SIZE.
      This code comes from sysfs, where it still works that way.
      
      However, PAGE_SIZE is not constant.  A 16k attribute string works on
      ia64 but not on x86.  Really a subsystem shouldn't allow different
      attribute sizes based on platform.
      
      As such, limit all simple attributes to 4k.  This works on all
      platforms, and is consistent with all current code.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      b23cdde4
  8. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  9. 10 5月, 2007 1 次提交
  10. 03 5月, 2007 1 次提交
  11. 15 3月, 2007 1 次提交
  12. 13 2月, 2007 2 次提交
  13. 12 2月, 2007 1 次提交
  14. 08 2月, 2007 1 次提交
  15. 09 12月, 2006 1 次提交
  16. 08 12月, 2006 1 次提交
  17. 02 12月, 2006 2 次提交
  18. 21 10月, 2006 1 次提交
  19. 03 10月, 2006 1 次提交
  20. 01 10月, 2006 1 次提交
  21. 27 9月, 2006 2 次提交
  22. 21 9月, 2006 1 次提交