lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1295455337-20219-1-git-send-email-LinoSanfilippo@gmx.de>
Date:	Wed, 19 Jan 2011 17:42:03 +0100
From:	Lino Sanfilippo <LinoSanfilippo@....de>
To:	eparis@...hat.com
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH 0/14] fsnotify: simplify locking

This patchset simplifies some of the locking that is needed to handle the addition and 
removal of marks from groups and vfs objects (inodes, mounts). It applies against
commit ef9bf3b7144bee6ce1da5616015cabc8771206af of branch 
'origin/for-next' from git.infradead.org/users/eparis/notify.git


The recent locking order used in fsnotify is 

mark->lock
group->mark_lock
inode->i_lock

The problem is that we cant use the group->mark_lock to synchronize addition and 
removal of marks to/from a group, so we have to use an additional mutex, namely the 
group->mutex, for this purpose. 
We also need a dedicated kernel thread for mark destruction since we cant call 
synchronize() for the mark_srcu with a spinlock held (at least i assume that this 
is the main reason this thread exists).

The main goal of these patches is to change the locking order to 

group->mark_lock
inode->i_lock
mark->lock

and by this simplify the concerning code:
- use the group->mark_lock for group list iteration and addition/removal of marks
- call synchronize() for mark_srcu as soon as a mark is removed from its 
  fsobject and thus avoid the need for the "fsnotify_mark" thread
- avoid temporary lists for mark traversal 

 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ