[PATCH 00/10] LP#922906: oops in ticket_spin_lock

Luis Henriques luis.henriques at canonical.com
Mon Apr 16 19:29:13 UTC 2012


On Mon, Apr 16, 2012 at 07:02:30PM +0100, Andy Whitcroft wrote:
> We have been seeing a large number of reports of oopses in
> ticket_spin_lock, these are mostly occuring in inotify related calls.
> There seems to be several races in this code and there is a fairly
> substantial patch set upstream to reorder the locking and sort this out.
> I have pulled these patches back to precise from the notify upstream tree,
> the patches themselves are slated for the 3.5 merge window.
> 
> Patches follow, pull request below for those who prefer to look at them
> locally.
> 
> I am proposing them (somewhat reluctantly due to their size) for Precise.
> 
> Comments?

Just a comment: I do believe that this patch should also close LP#951537.
I never marked that as a duplicate of LP#922906, but it looks like the
same issue, with the racy fsnotify invocations.
 
> -apw
> 
> The following changes since commit 48853edab3b414cc73c3e1c037f477524053cf15:
> 
>   fsnotify: change locking order (2012-04-16 18:33:10 +0100)
> 
> are available in the git repository at:
> 
>   git://kernel.ubuntu.com/apw/ubuntu-precise.git lp922906
> 
> for you to fetch changes up to 48853edab3b414cc73c3e1c037f477524053cf15:
> 
>   fsnotify: change locking order (2012-04-16 18:33:10 +0100)
> 
> ----------------------------------------------------------------
> 
> Lino Sanfilippo (10):
>   inotify, fanotify: replace fsnotify_put_group() with
>     fsnotify_destroy_group()
>   fsnotify: introduce fsnotify_get_group()
>   fsnotify: use reference counting for groups
>   fsnotify: take groups mark_lock before mark lock
>   fanotify: add an extra flag to mark_remove_from_mask that indicates
>     wheather a mark should be destroyed
>   fsnotify: use a mutex instead of a spinlock to protect a groups mark
>     list
>   fsnotify: pass group to fsnotify_destroy_mark()
>   fsnotify: introduce locked versions of fsnotify_add_mark() and
>     fsnotify_remove_mark()
>   fsnotify: dont put marks on temporary list when clearing marks by
>     group
>   fsnotify: change locking order
> 
>  fs/notify/dnotify/dnotify.c          |    4 +-
>  fs/notify/fanotify/fanotify_user.c   |   33 +++++++-----
>  fs/notify/group.c                    |   40 +++++++--------
>  fs/notify/inode_mark.c               |   14 ++++--
>  fs/notify/inotify/inotify_fsnotify.c |    4 +-
>  fs/notify/inotify/inotify_user.c     |   11 ++--
>  fs/notify/mark.c                     |   91 +++++++++++++++++++---------------
>  fs/notify/vfsmount_mark.c            |   14 ++++--
>  include/linux/fsnotify_backend.h     |   26 ++++++----
>  kernel/audit_tree.c                  |   10 ++--
>  kernel/audit_watch.c                 |    4 +-
>  11 files changed, 147 insertions(+), 104 deletions(-)
> 
> -- 
> 1.7.9.5
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Cheers,
--
Luis



More information about the kernel-team mailing list