Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751996AbdHGSZp (ORCPT ); Mon, 7 Aug 2017 14:25:45 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:33456 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbdHGSZo (ORCPT ); Mon, 7 Aug 2017 14:25:44 -0400 Date: Mon, 07 Aug 2017 11:25:43 -0700 (PDT) Message-Id: <20170807.112543.687820539253956584.davem@davemloft.net> To: avolkov@ispras.ru Cc: isdn@linux-pingi.de, sergei.shtylyov@cogentembedded.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org, khoroshilov@ispras.ru Subject: Re: [PATCH v2] hysdn: fix to a race condition in put_log_buffer From: David Miller In-Reply-To: <1502110454-3996-1-git-send-email-avolkov@ispras.ru> References: <1502110454-3996-1-git-send-email-avolkov@ispras.ru> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 07 Aug 2017 11:25:44 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 593 Lines: 18 From: Anton Volkov Date: Mon, 7 Aug 2017 15:54:14 +0300 > The synchronization type that was used earlier to guard the loop that > deletes unused log buffers may lead to a situation that prevents any > thread from going through the loop. > > The patch deletes previously used synchronization mechanism and moves > the loop under the spin_lock so the similar cases won't be feasible in > the future. > > Found by by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Anton Volkov > --- > v2: Fixed coding style issues Applied.