30 Dec, 2020

1 commit

  • commit 950cc0d2bef078e1f6459900ca4d4b2a2e0e3c37 upstream.

    The handle_inode_event() interface was added as (quoting comment):
    "a simple variant of handle_event() for groups that only have inode
    marks and don't have ignore mask".

    In other words, all backends except fanotify. The inotify backend
    also falls under this category, but because it required extra arguments
    it was left out of the initial pass of backends conversion to the
    simple interface.

    This results in code duplication between the generic helper
    fsnotify_handle_event() and the inotify_handle_event() callback
    which also happen to be buggy code.

    Generalize the handle_inode_event() arguments and add the check for
    FS_EXCL_UNLINK flag to the generic helper, so inotify backend could
    be converted to use the simple interface.

    Link: https://lore.kernel.org/r/20201202120713.702387-2-amir73il@gmail.com
    CC: stable@vger.kernel.org
    Fixes: b9a1b9772509 ("fsnotify: create method handle_inode_event() in fsnotify_operations")
    Signed-off-by: Amir Goldstein
    Signed-off-by: Jan Kara
    Signed-off-by: Greg Kroah-Hartman

    Amir Goldstein
     

07 Aug, 2020

1 commit

  • Pull fsnotify updates from Jan Kara:

    - fanotify fix for softlockups when there are many queued events

    - performance improvement to reduce fsnotify overhead when not used

    - Amir's implementation of fanotify events with names. With these you
    can now efficiently monitor whole filesystem, eg to mirror changes to
    another machine.

    * tag 'fsnotify_for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (37 commits)
    fanotify: compare fsid when merging name event
    fsnotify: create method handle_inode_event() in fsnotify_operations
    fanotify: report parent fid + child fid
    fanotify: report parent fid + name + child fid
    fanotify: add support for FAN_REPORT_NAME
    fanotify: report events with parent dir fid to sb/mount/non-dir marks
    fanotify: add basic support for FAN_REPORT_DIR_FID
    fsnotify: remove check that source dentry is positive
    fsnotify: send event with parent/name info to sb/mount/non-dir marks
    audit: do not set FS_EVENT_ON_CHILD in audit marks mask
    inotify: do not set FS_EVENT_ON_CHILD in non-dir mark mask
    fsnotify: pass dir and inode arguments to fsnotify()
    fsnotify: create helper fsnotify_inode()
    fsnotify: send event to parent and child with single callback
    inotify: report both events on parent and child with single callback
    dnotify: report both events on parent and child with single callback
    fanotify: no external fh buffer in fanotify_name_event
    fanotify: use struct fanotify_info to parcel the variable size buffer
    fsnotify: add object type "child" to object type iterator
    fanotify: use FAN_EVENT_ON_CHILD as implicit flag on sb/mount/non-dir marks
    ...

    Linus Torvalds
     

28 Jul, 2020

2 commits

  • The method handle_event() grew a lot of complexity due to the design of
    fanotify and merging of ignore masks.

    Most backends do not care about this complex functionality, so we can hide
    this complexity from them.

    Introduce a method handle_inode_event() that serves those backends and
    passes a single inode mark and less arguments.

    This change converts all backends except fanotify and inotify to use the
    simplified handle_inode_event() method. In pricipal, inotify could have
    also used the new method, but that would require passing more arguments
    on the simple helper (data, data_type, cookie), so we leave it with the
    handle_event() method.

    Link: https://lore.kernel.org/r/20200722125849.17418-9-amir73il@gmail.com
    Suggested-by: Jan Kara
    Signed-off-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Amir Goldstein
     
  • The 'inode' argument to handle_event(), sometimes referred to as
    'to_tell' is somewhat obsolete.
    It is a remnant from the times when a group could only have an inode mark
    associated with an event.

    We now pass an iter_info array to the callback, with all marks associated
    with an event.

    Most backends ignore this argument, with two exceptions:
    1. dnotify uses it for sanity check that event is on directory
    2. fanotify uses it to report fid of directory on directory entry
    modification events

    Remove the 'inode' argument and add a 'dir' argument.
    The callback function signature is deliberately changed, because
    the meaning of the argument has changed and the arguments have
    been documented.

    The 'dir' argument is set to when 'file_name' is specified and it is
    referring to the directory that the 'file_name' entry belongs to.

    Signed-off-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Amir Goldstein
     

18 Jun, 2020

1 commit

  • One of the more common cases of allocation size calculations is finding
    the size of a structure that has a zero-sized array at the end, along
    with memory for some number of elements for that array. For example:

    struct audit_chunk {
    ...
    struct node {
    struct list_head list;
    struct audit_tree *owner;
    unsigned index; /* index; upper bit indicates 'will prune' */
    } owners[];
    };

    Make use of the struct_size() helper instead of an open-coded version
    in order to avoid any potential type mistakes.

    So, replace the following form:

    offsetof(struct audit_chunk, owners) + count * sizeof(struct node);

    with:

    struct_size(chunk, owners, count)

    This code was detected with the help of Coccinelle.

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Paul Moore

    Gustavo A. R. Silva
     

27 Apr, 2019

1 commit


15 Jan, 2019

1 commit

  • Since the context is derived from the task parameter handed to
    __audit_free(), hand the context to audit_kill_trees() so it can be used
    to associate with a syscall record. This requires adding the context
    parameter to kill_rules() rather than using the current audit_context.

    The callers of trim_marked() and evict_chunk() still have their context.

    The EOE record was being issued prior to the pruning of the killed_tree
    list.

    Move the kill_trees call before the audit_log_exit call in
    __audit_free() and __audit_syscall_exit() so that any pruned trees
    CONFIG_CHANGE records are included with the associated syscall event by
    the user library due to the EOE record flagging the end of the event.

    See: https://github.com/linux-audit/audit-kernel/issues/50
    See: https://github.com/linux-audit/audit-kernel/issues/59

    Signed-off-by: Richard Guy Briggs
    [PM: fixed merge fuzz in kernel/audit_tree.c]
    Signed-off-by: Paul Moore

    Richard Guy Briggs
     

27 Nov, 2018

1 commit


12 Nov, 2018

14 commits

  • Variables pointing to fsnotify_mark are sometimes called 'entry' and
    sometimes 'mark'. Use 'mark' in all places.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    [PM: minor merge fuzz due to updated patches previously in the series]
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Audit tree code currently associates new fsnotify mark with each new
    chunk. As chunk attached to an inode is replaced when new tag is added /
    removed, we also need to remove old fsnotify mark and add a new one on
    such occasion. This is cumbersome and makes locking rules somewhat
    difficult to follow.

    Fix these problems by allocating fsnotify mark independently of chunk
    and keeping it all the time while there is some chunk attached to an
    inode. Also add documentation about the locking rules so that things are
    easier to follow.

    Signed-off-by: Jan Kara
    Reviewed-by: Richard Guy Briggs
    [PM: minor merge fuzz due to updated patches previously in the series]
    Signed-off-by: Paul Moore

    Jan Kara
     
  • untag_chunk() has to be called with hash_lock, it drops it and
    reacquires it when returning. The unlocking of hash_lock is thus hidden
    from the callers of untag_chunk() with is rather error prone. Reorganize
    the code so that untag_chunk() is called without hash_lock, only with
    mark reference preventing the chunk from going away.

    Since this requires some more code in the caller of untag_chunk() to
    assure forward progress, factor out loop pruning tree from all chunks
    into a common helper function.

    Signed-off-by: Jan Kara
    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Paul Moore

    Jan Kara
     
  • When deleting chunk from a tree, drop all unused nodes in a chunk
    instead of just the one used by the tree. This gets rid of possibly
    lingering unused nodes (created due to fallback path in untag_chunk())
    and also removes some special cases and will allow us to simplify
    locking in untag_chunk().

    Signed-off-by: Jan Kara
    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Paul Moore

    Jan Kara
     
  • When removing chunk from a tree, we do shrink the chunk. This can fail
    for various reasons (due to races, ENOMEM, etc.) and in some cases we
    just bail from untag_chunk() relying on someone else to cleanup.
    Although this currently works, later we will need to add new failure
    situation which would break. Also this simplifies the code and will
    allow us to make locking around untag_chunk() less awkward.

    Signed-off-by: Jan Kara
    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Allocate fsnotify mark independently instead of embedding it inside
    chunk. This will allow us to just replace chunk attached to mark when
    growing / shrinking chunk instead of replacing mark attached to inode
    which is a more complex operation.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Provide a helper function audit_mark_put_chunk() for dropping mark's
    reference (which has to happen only after RCU grace period expires).
    Currently that happens only from a single place but in later patches we
    introduce more callers.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     
  • The audit_tree_group->mark_mutex is held all the time while we create
    the fsnotify mark, add it to the inode, and insert chunk into the hash.
    Hence mark cannot get detached during this time and so the check whether
    the mark is attached in insert_hash() is pointless.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Chunk replacement code is very similar for the cases where we grow or
    shrink chunk. Factor the code out into a common helper function.

    Signed-off-by: Jan Kara
    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Currently, the audit tree code does not make sure that when a chunk is
    inserted into the hash table, it is fully initialized. So in theory a
    user of RCU lookup could see uninitialized structure in the hash table
    and crash. Add appropriate barriers between initialization of the
    structure and its insertion into hash table.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Currently chunk hash key (which is in fact pointer to the inode) is
    derived as chunk->mark.conn->obj. It is tricky to make this dereference
    reliable for hash table lookups only under RCU as mark can get detached
    from the connector and connector gets freed independently of the
    running lookup. Thus there is a possible use after free / NULL ptr
    dereference issue:

    CPU1 CPU2
    untag_chunk()
    ...
    audit_tree_lookup()
    list_for_each_entry_rcu(p, list, hash) {
    list_del_rcu(&chunk->hash);
    fsnotify_destroy_mark(entry);
    fsnotify_put_mark(entry)
    chunk_to_key(p)
    if (!chunk->mark.connector)
    ...
    hlist_del_init_rcu(&mark->obj_list);
    if (hlist_empty(&conn->list)) {
    inode = fsnotify_detach_connector_from_object(conn);
    mark->connector = NULL;
    ...
    frees connector from workqueue
    chunk->mark.connector->obj

    This race is probably impossible to hit in practice as the race window
    on CPU1 is very narrow and CPU2 has a lot of code to execute. Still it's
    better to have this fixed. Since the inode the chunk is attached to is
    constant during chunk's lifetime it is easy to cache the key in the
    chunk itself and thus avoid these issues.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Audit tree code is replacing marks attached to inodes in non-atomic way.
    Thus fsnotify_find_mark() in tag_chunk() may find a mark that belongs to
    a chunk that is no longer valid one and will soon be destroyed. Tags
    added to such chunk will be simply lost.

    Fix the problem by making sure old mark is marked as going away (through
    fsnotify_detach_mark()) before dropping mark_mutex and thus in an atomic
    way wrt tag_chunk(). Note that this does not fix the problem completely
    as if tag_chunk() finds a mark that is going away, it fails with
    -ENOENT. But at least the failure is not silent and currently there's no
    way to search for another fsnotify mark attached to the inode. We'll fix
    this problem in later patch.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     
  • When an inode is tagged with a tree, tag_chunk() checks whether there is
    audit_tree_group mark attached to the inode and adds one if not. However
    nothing protects another tag_chunk() to add the mark between we've
    checked and try to add the fsnotify mark thus resulting in an error from
    fsnotify_add_mark() and consequently an ENOSPC error from tag_chunk().

    Fix the problem by holding mark_mutex over the whole check-insert code
    sequence.

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     
  • Currently, audit_tree code uses mark->lock to protect against detaching
    of mark from an inode. In most places it however also uses
    mark->group->mark_mutex (as we need to atomically replace attached
    marks) and this provides protection against mark detaching as well. So
    just remove protection with mark->lock from audit tree code and replace
    it with mark->group->mark_mutex protection in all the places. It
    simplifies the code and gets rid of some ugly catches like calling
    fsnotify_add_mark_locked() with mark->lock held (which cannot sleep only
    because we hold a reference to another mark attached to the same inode).

    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Jan Kara
    Signed-off-by: Paul Moore

    Jan Kara
     

18 Aug, 2018

1 commit

  • Pull fsnotify updates from Jan Kara:
    "fsnotify cleanups from Amir and a small inotify improvement"

    * tag 'fsnotify_for_v4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    inotify: Add flag IN_MASK_CREATE for inotify_add_watch()
    fanotify: factor out helpers to add/remove mark
    fsnotify: add helper to get mask from connector
    fsnotify: let connector point to an abstract object
    fsnotify: pass connp and object type to fsnotify_add_mark()
    fsnotify: use typedef fsnotify_connp_t for brevity

    Linus Torvalds
     

28 Jun, 2018

1 commit


27 Jun, 2018

1 commit

  • Make the code to attach/detach a connector to object more generic
    by letting the fsnotify connector point to an abstract fsnotify_connp_t.
    Code that needs to dereference an inode or mount object now uses the
    helpers fsnotify_conn_{inode,mount}.

    Signed-off-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Amir Goldstein
     

18 May, 2018

2 commits

  • Before changing the arguments of the functions fsnotify_add_mark()
    and fsnotify_add_mark_locked(), convert most callers to use a wrapper.

    Signed-off-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Amir Goldstein
     
  • inode_mark and vfsmount_mark arguments are passed to handle_event()
    operation as function arguments as well as on iter_info struct.
    The difference is that iter_info struct may contain marks that should
    not be handled and are represented as NULL arguments to inode_mark or
    vfsmount_mark.

    Instead of passing the inode_mark and vfsmount_mark arguments, add
    a report_mask member to iter_info struct to indicate which marks should
    be handled, versus marks that should only be kept alive during user
    wait.

    This change is going to be used for passing more mark types
    with handle_event() (i.e. super block marks).

    Signed-off-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Amir Goldstein
     

24 Feb, 2018

1 commit

  • Evidently the __mutex_owner() function was never intended for use
    outside the core mutex code, so build a thing locking wrapper around
    the mutex code which allows us to track the mutex owner.

    One, arguably positive, side effect is that this allows us to hide
    the audit_cmd_mutex inside of kernel/audit.c behind the lock/unlock
    functions.

    Reported-by: Peter Zijlstra
    Reviewed-by: Richard Guy Briggs
    Signed-off-by: Paul Moore

    Paul Moore
     

15 Nov, 2017

1 commit

  • Pull fsnotify updates from Jan Kara:

    - fixes of use-after-tree issues when handling fanotify permission
    events from Miklos

    - refcount_t conversions from Elena

    - fixes of ENOMEM handling in dnotify and fsnotify from me

    * 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    fsnotify: convert fsnotify_mark.refcnt from atomic_t to refcount_t
    fanotify: clean up CONFIG_FANOTIFY_ACCESS_PERMISSIONS ifdefs
    fsnotify: clean up fsnotify()
    fanotify: fix fsnotify_prepare_user_wait() failure
    fsnotify: fix pinning group in fsnotify_prepare_user_wait()
    fsnotify: pin both inode and vfsmount mark
    fsnotify: clean up fsnotify_prepare/finish_user_wait()
    fsnotify: convert fsnotify_group.refcnt from atomic_t to refcount_t
    fsnotify: Protect bail out path of fsnotify_add_mark_locked() properly
    dnotify: Handle errors from fsnotify_add_mark_locked() in fcntl_dirnotify()

    Linus Torvalds
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Nov, 2017

1 commit

  • atomic_t variables are currently used to implement reference
    counters with the following properties:
    - counter is initialized to 1 using atomic_set()
    - a resource is freed upon counter reaching zero
    - once counter reaches zero, its further
    increments aren't allowed
    - counter schema uses basic atomic operations
    (set, inc, inc_not_zero, dec_and_test, etc.)

    Such atomic variables should be converted to a newly provided
    refcount_t type and API that prevents accidental counter overflows
    and underflows. This is important since overflows and underflows
    can lead to use-after-free situation and be exploitable.

    The variable fsnotify_mark.refcnt is used as pure reference counter.
    Convert it to refcount_t and fix up the operations.

    Suggested-by: Kees Cook
    Reviewed-by: David Windsor
    Reviewed-by: Hans Liljestrand
    Signed-off-by: Elena Reshetova
    Signed-off-by: Jan Kara

    Elena Reshetova
     

04 May, 2017

1 commit

  • Pull fsnotify updates from Jan Kara:
    "The branch contains mainly a rework of fsnotify infrastructure fixing
    a shortcoming that we have waited for response to fanotify permission
    events with SRCU read lock held and when the process consuming events
    was slow to respond the kernel has stalled.

    It also contains several cleanups of unnecessary indirections in
    fsnotify framework and a bugfix from Amir fixing leakage of kernel
    internal errno to userspace"

    * 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (37 commits)
    fanotify: don't expose EOPENSTALE to userspace
    fsnotify: remove a stray unlock
    fsnotify: Move ->free_mark callback to fsnotify_ops
    fsnotify: Add group pointer in fsnotify_init_mark()
    fsnotify: Drop inode_mark.c
    fsnotify: Remove fsnotify_find_{inode|vfsmount}_mark()
    fsnotify: Remove fsnotify_detach_group_marks()
    fsnotify: Rename fsnotify_clear_marks_by_group_flags()
    fsnotify: Inline fsnotify_clear_{inode|vfsmount}_mark_group()
    fsnotify: Remove fsnotify_recalc_{inode|vfsmount}_mask()
    fsnotify: Remove fsnotify_set_mark_{,ignored_}mask_locked()
    fanotify: Release SRCU lock when waiting for userspace response
    fsnotify: Pass fsnotify_iter_info into handle_event handler
    fsnotify: Provide framework for dropping SRCU lock in ->handle_event
    fsnotify: Remove special handling of mark destruction on group shutdown
    fsnotify: Detach mark from object list when last reference is dropped
    fsnotify: Move queueing of mark for destruction into fsnotify_put_mark()
    inotify: Do not drop mark reference under idr_lock
    fsnotify: Free fsnotify_mark_connector when there is no mark attached
    fsnotify: Lock object list with connector lock
    ...

    Linus Torvalds
     

02 May, 2017

1 commit

  • refcount_t type and corresponding API should be
    used instead of atomic_t when the variable is used as
    a reference counter. This allows to avoid accidental
    refcounter overflows that might lead to use-after-free
    situations.

    Signed-off-by: Elena Reshetova
    Signed-off-by: Hans Liljestrand
    Signed-off-by: Kees Cook
    Signed-off-by: David Windsor
    [PM: fix subject line, add #include]
    Signed-off-by: Paul Moore

    Elena Reshetova
     

10 Apr, 2017

7 commits

  • Pointer to ->free_mark callback unnecessarily occupies one long in each
    fsnotify_mark although they are the same for all marks from one
    notification group. Move the callback pointer to fsnotify_ops.

    Reviewed-by: Miklos Szeredi
    Reviewed-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Jan Kara
     
  • Currently we initialize mark->group only in fsnotify_add_mark_lock().
    However we will need to access fsnotify_ops of corresponding group from
    fsnotify_put_mark() so we need mark->group initialized earlier. Do that
    in fsnotify_init_mark() which has a consequence that once
    fsnotify_init_mark() is called on a mark, the mark has to be destroyed
    by fsnotify_put_mark().

    Reviewed-by: Miklos Szeredi
    Reviewed-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Jan Kara
     
  • These are very thin wrappers, just remove them. Drop
    fs/notify/vfsmount_mark.c as it is empty now.

    Reviewed-by: Miklos Szeredi
    Reviewed-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Jan Kara
     
  • Pass fsnotify_iter_info into ->handle_event() handler so that it can
    release and reacquire SRCU lock via fsnotify_prepare_user_wait() and
    fsnotify_finish_user_wait() functions. These functions also make sure
    current marks are appropriately pinned so that iteration protected by
    srcu in fsnotify() stays safe.

    Reviewed-by: Miklos Szeredi
    Reviewed-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Jan Kara
     
  • Instead of removing mark from object list from fsnotify_detach_mark(),
    remove the mark when last reference to the mark is dropped. This will
    allow fanotify to wait for userspace response to event without having to
    hold onto fsnotify_mark_srcu.

    To avoid pinning inodes by elevated refcount (and thus e.g. delaying
    file deletion) while someone holds mark reference, we detach connector
    from the object also from fsnotify_destroy_marks() and not only after
    removing last mark from the list as it was now.

    Reviewed-by: Miklos Szeredi
    Reviewed-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Jan Kara
     
  • Move pointer to inode / vfsmount from mark itself to the
    fsnotify_mark_connector structure. This is another step on the path
    towards decoupling inode / vfsmount lifetime from notification mark
    lifetime.

    Reviewed-by: Miklos Szeredi
    Reviewed-by: Amir Goldstein
    Signed-off-by: Jan Kara

    Jan Kara
     
  • Currently audit code uses checking of mark->inode to verify whether mark
    is still alive. Switch that to checking mark flags as that is more
    logical and current way will become unreliable in future.

    Reviewed-by: Miklos Szeredi
    Signed-off-by: Jan Kara

    Jan Kara