Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbcDSFcI (ORCPT ); Tue, 19 Apr 2016 01:32:08 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:41220 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbcDSFcH (ORCPT ); Tue, 19 Apr 2016 01:32:07 -0400 From: Vaishali Thakkar Subject: Re: [PATCH] efi: Use GFP_ATOMIC instead of GFP_KERNEL To: Julia Lawall References: <1460372009-10785-1-git-send-email-vaishali.thakkar@oracle.com> <20160414214949.GS2829@codeblueprint.co.uk> <20160417211835.GY2829@codeblueprint.co.uk> Cc: linux-kernel@vger.kernel.org, Saurabh Sengar Message-ID: <5715C2C7.8000106@oracle.com> Date: Tue, 19 Apr 2016 11:01:51 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160417211835.GY2829@codeblueprint.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1126 Lines: 27 On Monday 18 April 2016 02:48 AM, Matt Fleming wrote: > On Fri, 15 Apr, at 08:38:37AM, Julia Lawall wrote: >> I looked at it a bit with Vaishali. I wonder if it would be possible at >> least to have only one flag? Then one wouldn't have to maintain the >> subtle relationship between atomic and duplicates. I'm not sure that it >> would help Coccinelle, but at least one could see more quickly that >> Coccinelle is giving a false positive. > Yeah, that would be a good idea. > > How about we drop the @atomic parameter and simply use @duplicates to > figure out whether to perform duplicate detection, which we should > note in the comment of efivar_init() cannot be performed atomically. > Bonus points if someone can clean up the code flow too. I think using only @duplicates would be helpful to make code more clear. I can actually clean up the code flow but it may take some time for me to send the patches as I already have some other work with me. Do you want to go for it? Or for now we can just go for dropping @atomic parameter. > Otherwise, efivar_init() is done while holding a spinlock. -- Vaishali