From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steffen Klassert Subject: Re: [PATCH] af_key: Add lock to key dump Date: Tue, 4 Apr 2017 08:39:31 +0200 Message-ID: <20170404063931.GV5092@secunet.com> References: <1490944220-578-1-git-send-email-syjcnss@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , To: Yuejie Shi Return-path: Received: from a.mx.secunet.com ([62.96.220.36]:46434 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752497AbdDDGkG (ORCPT ); Tue, 4 Apr 2017 02:40:06 -0400 Content-Disposition: inline In-Reply-To: <1490944220-578-1-git-send-email-syjcnss@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Mar 31, 2017 at 03:10:20PM +0800, Yuejie Shi wrote: > A dump may come in the middle of another dump, modifying its dump > structure members. This race condition will result in NULL pointer > dereference in kernel. So add a lock to prevent that race. > > Fixes: 83321d6b9872 ("[AF_KEY]: Dump SA/SP entries non-atomically") > Signed-off-by: Yuejie Shi Applied, thanks a lot!