[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180827224037.GA18923@nautica>
Date: Tue, 28 Aug 2018 00:40:37 +0200
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Dmitry Vyukov <dvyukov@...gle.com>
Cc: syzbot <syzbot+d4252148d198410b864f@...kaller.appspotmail.com>,
David Miller <davem@...emloft.net>,
Eric Van Hensbergen <ericvh@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Latchesar Ionkov <lucho@...kov.net>,
netdev <netdev@...r.kernel.org>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>,
v9fs-developer@...ts.sourceforge.net
Subject: Re: KASAN: invalid-free in p9stat_free
Dmitry Vyukov wrote on Mon, Aug 27, 2018:
> kfree and then null pointer is pretty common, try to run:
>
> find -name "*.c" -exec grep -A 1 "kfree(" {} \; | grep -B 1 " = NULL;"
Hmm, right, it looks like somewhere between 5 and 10% of the kfree()
calls are followed by NULL assignment, that's "common enough" - not
generalized but not rare either.
> Leaving dangling pointers behind is not the best idea.
> And from what I remember a bunch of similar double frees were fixed by
> nulling the pointer after the first kfree.
In this case it really is an error to call p9stat_free again, so let's
just do both.
Will send the patches shortly.
Thanks,
--
Dominique
Powered by blists - more mailing lists