public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Paul Moore <paul@paul-moore.com>
Cc: linux-audit@redhat.com, jack@suse.cz, amir73il@gmail.com,
	viro@zeniv.linux.org.uk
Subject: Re: [PATCH 06/14] audit: Factor out chunk replacement code
Date: Mon, 12 Nov 2018 16:25:05 +0100	[thread overview]
Message-ID: <20181112152505.GH7175@quack2.suse.cz> (raw)
In-Reply-To: <CAHC9VhSe2-Q=7sCUOMngBjMn7C4i=1F2MZHqFNrgaVnCeU3+6w@mail.gmail.com>

On Mon 12-11-18 10:15:42, Paul Moore wrote:
> On Fri, Nov 9, 2018 at 9:45 AM Paul Moore <paul@paul-moore.com> wrote:
> > On Wed, Nov 7, 2018 at 4:55 AM Jan Kara <jack@suse.cz> wrote:
> > > On Tue 06-11-18 08:58:36, Paul Moore wrote:
> > > > On Thu, Oct 18, 2018 at 3:27 PM Richard Guy Briggs <rgb@redhat.com> wrote:
> > > > > On 2018-10-17 12:14, Jan Kara wrote:
> > > > > > Chunk replacement code is very similar for the cases where we grow or
> > > > > > shrink chunk. Factor the code out into a common helper function.
> > > > >
> > > > > Noting just the switch from list_replace_init() to list_splice_init().
> > > >
> > > > Yeah, I wasn't expecting to see that, maybe it will make sense as I
> > > > work through the rest of the patchset.
> > > >
> > > > Jan, can you explain the reason behind the change?  I'm a little
> > > > nervous that this is simply hiding a problem (e.g. the list_empty()
> > > > check in splice).
> > >
> > > The reason is very simple: replace_chunk() gets called from tag_chunk()
> > > *after* we have possibly done:
> > >
> > >         if (!tree->root) {
> > >                 tree->root = chunk;
> > >                 list_add(&tree->same_root, &chunk->trees);
> > >         }
> > >
> > > So new->trees is possibly non-empty and we need to preserve its contents.
> > > That's why we need list_splice() and not plain list_replace().
> >
> > After revisiting this a couple of time this week, I found my problem -
> > I had reversed list_splice_init() in my mind and was worried that if
> > the old->trees list was not empty we would end up not adding
> > new->trees.  Sorry about the noise.
> >
> > I've updated the audit/working-fsnotify_fixes with the latest patches,
> > including the revised 12/14 sent as an attachment, and I'm going to
> > test it over the weekend.  If the kernel is still standing on Monday
> > morning I'll merge it into audit/next.
> >
> > Thanks again.
> 
> My test machine was still standing this morning so I went ahead and
> merged all of the patches into audit/next - Thanks Jan.

Cool, thanks!

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2018-11-12 15:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 10:14 [PATCH 0/14 v4] audit: Fix various races when tagging and untagging mounts Jan Kara
2018-10-17 10:14 ` [PATCH 01/14] audit_tree: Remove mark->lock locking Jan Kara
2018-10-17 10:14 ` [PATCH 02/14] audit: Fix possible spurious -ENOSPC error Jan Kara
2018-10-17 10:14 ` [PATCH 03/14] audit: Fix possible tagging failures Jan Kara
2018-10-17 10:14 ` [PATCH 04/14] audit: Embed key into chunk Jan Kara
2018-10-17 10:14 ` [PATCH 05/14] audit: Make hash table insertion safe against concurrent lookups Jan Kara
2018-10-17 10:14 ` [PATCH 06/14] audit: Factor out chunk replacement code Jan Kara
2018-10-18 19:27   ` Richard Guy Briggs
2018-11-06 13:58     ` Paul Moore
2018-11-07  9:55       ` Jan Kara
2018-11-09 14:45         ` Paul Moore
2018-11-12 15:15           ` Paul Moore
2018-11-12 15:25             ` Jan Kara [this message]
2018-10-17 10:14 ` [PATCH 07/14] audit: Remove pointless check in insert_hash() Jan Kara
2018-10-17 10:14 ` [PATCH 08/14] audit: Provide helper for dropping mark's chunk reference Jan Kara
2018-10-17 10:15 ` [PATCH 09/14] audit: Allocate fsnotify mark independently of chunk Jan Kara
2018-10-17 10:15 ` [PATCH 10/14] audit: Guarantee forward progress of chunk untagging Jan Kara
2018-10-18 19:29   ` Richard Guy Briggs
2018-10-17 10:15 ` [PATCH 11/14] audit: Drop all unused chunk nodes during deletion Jan Kara
2018-10-18 19:32   ` Richard Guy Briggs
2018-11-06 14:14   ` Paul Moore
2018-11-07 10:00     ` Jan Kara
2018-10-17 10:15 ` [PATCH 12/14] audit: Simplify locking around untag_chunk() Jan Kara
2018-10-18 12:27   ` Richard Guy Briggs
2018-10-19  8:22     ` Jan Kara
2018-10-19 11:18       ` Richard Guy Briggs
2018-10-17 10:15 ` [PATCH 13/14] audit: Replace chunk attached to mark instead of replacing mark Jan Kara
2018-10-18 19:39   ` Richard Guy Briggs
2018-10-17 10:15 ` [PATCH 14/14] audit: Use 'mark' name for fsnotify_mark variables Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181112152505.GH7175@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=amir73il@gmail.com \
    --cc=linux-audit@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox