Subject: Re: [PATCH] xfrm: Fix double dst_release() in xfrm_lookup() -EREMOTE case

From: Mark Brown <[email-masked]>
Date: Thu, 8 Apr 2010 14:43:31 +0100

On Thu, Apr 08, 2010 at 03:39:38PM +0300, Timo Teräs wrote:
> Mark Brown wrote:

> >I'm not sure if this is correct or not - there may a reference been
> >taken earlier in __xfrm_lookup() that's being dropped but I didn't spot
> >it.

> This is not correct.

So I was correct when I said that there might've been a reference taken
earlier :)

> This semantics is important because __xfrm_lookup() is also called
> from other places, that do other things when they get -EREMOTE.

Right, it was the fact that this was the only place doing the free that
made this unclear.  Some comments might make this rather more obvious,
the fact that the release was added to __xfrm_lookup() as part of the
recent patch made it unclear if the release that was still there in
xfrm_lookup() was still needed or an oversight.