From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] neighbor: gc_list changes should be protected by table lock Date: Mon, 10 Dec 2018 17:42:00 -0800 (PST) Message-ID: <20181210.174200.87804153842648835.davem@davemloft.net> References: <20181210215407.10641-1-dsahern@kernel.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dsahern@gmail.com To: dsahern@kernel.org Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:50140 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728363AbeLKBmC (ORCPT ); Mon, 10 Dec 2018 20:42:02 -0500 In-Reply-To: <20181210215407.10641-1-dsahern@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: From: David Ahern Date: Mon, 10 Dec 2018 13:54:07 -0800 > From: David Ahern > > Adding and removing neighbor entries to / from the gc_list need to be > done while holding the table lock; a couple of places were missed in the > original patch. > > Move the list_add_tail in neigh_alloc to ___neigh_create where the lock > is already obtained. Since neighbor entries should rarely be moved > to/from PERMANENT state, add lock/unlock around the gc_list changes in > neigh_change_state rather than extending the lock hold around all > neighbor updates. > > Fixes: 58956317c8de ("neighbor: Improve garbage collection") > Reported-by: Andrei Vagin > Reported-by: syzbot+6cc2fd1d3bdd2e007363@syzkaller.appspotmail.com > Reported-by: syzbot+35e87b87c00f386b041f@syzkaller.appspotmail.com > Reported-by: syzbot+b354d1fb59091ea73c37@syzkaller.appspotmail.com > Reported-by: syzbot+3ddead5619658537909b@syzkaller.appspotmail.com > Reported-by: syzbot+424d47d5c456ce8b2bbe@syzkaller.appspotmail.com > Reported-by: syzbot+e4d42eb35f6a27b0a628@syzkaller.appspotmail.com > Signed-off-by: David Ahern Applied, thanks for fixing this so quickly.