Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbbKYLZB (ORCPT ); Wed, 25 Nov 2015 06:25:01 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:34516 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbbKYLY7 (ORCPT ); Wed, 25 Nov 2015 06:24:59 -0500 Message-ID: <56559A88.6010804@lightnvm.io> Date: Wed, 25 Nov 2015 12:24:56 +0100 From: =?UTF-8?B?TWF0aWFzIEJqw7hybGluZw==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Wenwei Tao CC: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCH] lightnvm: missing nvm_lock acquire References: <1448378697-2532-1-git-send-email-ww.tao0320@gmail.com> <5654AE2D.2080802@lightnvm.io> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 588 Lines: 16 On 11/25/2015 09:57 AM, Wenwei Tao wrote: > Hi Matias > I think list_for_each_entry_safe(pos, n, head, member) cannot avoid > race condition > the item point by ā€˜nā€™ can be deleted and freed in the same time we > operate on 'pos' > so lock is still necessary. You're right. Brainfart... I'll apply it with the fixes that kbuild proposed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/