Received: by 10.192.165.156 with SMTP id m28csp645238imm; Wed, 11 Apr 2018 05:14:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ycpK9h8KAa2ELvR+dAZ4/WKLJJ6zZYYvwSf0D4roMmf4pdd2RFhOD2dX2T9twN0CF2XMO X-Received: by 2002:a17:902:9046:: with SMTP id w6-v6mr4923710plz.393.1523448866155; Wed, 11 Apr 2018 05:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523448866; cv=none; d=google.com; s=arc-20160816; b=eaDgfMMhM+a9kDo3+Xz2Zkj1205nm4O9gX2tcg3RYFDv3Bs+Nv9Bv5gJbI35s/Cm6H hspUa6FaeyKzUBKW6oP/8AV2zF86ho83Ye8mmSoV21TGp3IvbskjRNUoVgdXMpIN4Rka kpsN4ogvclQ097/19FnRYDNBCSqWF1Q9gr6vOzFSfJjHVOEUrUBggmKGTBrI1uzwXQbJ I53IxgvdVUZcnhHR7sGPdPrcVytcnsJGUKRDh2JjLWnuLgfLRcXIsbrteIFNX8kIiK+u VXl8YRV5p8ATo5YMrh1P6XnT0tvTtBPWzpXSCJBU8mmi8K7cfWuI3BF1wf9HdLgx2rAF o0dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:arc-authentication-results; bh=JkgXntAHhXdMv501zjQaxTZVuB5Q16XsO6KRSGcA+bE=; b=Tztu0mpTja4N7xThg9vpXPdINHoxnnqnvQZqyi8HDNus4ljvtIx+FNe/eLOdguQS9m /vQBUQ7KAnvTvnI0pG+3v4urUCHoZ/XOs+H4xbONK0D56pZwlJxKaoxI/ZEO3w8ockJ5 C4B6jcnbYExxgkW6zCUKGRrCbQJNsaTe8HCuIVXkSY6MJ46MD59alpr8Cbe0/QxE3iUD H43tMcqLx3y3jAw3AaNctAjApL/Q9bG8GN/FU466ypyEIoXhM7LCrR3ZWiCzEAIF+9H/ H88YqNpruq5Cp64VRvIgk+x3ANz5z4MTPU1MfwF+qpMexw4n44ZUeyPM41+AOOJ5G7YX zUsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si940508pls.665.2018.04.11.05.13.49; Wed, 11 Apr 2018 05:14:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbeDKMLO (ORCPT + 99 others); Wed, 11 Apr 2018 08:11:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52774 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbeDKMLN (ORCPT ); Wed, 11 Apr 2018 08:11:13 -0400 Received: from localhost (71-105-190-109.dsl.ovh.fr [109.190.105.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8D8FBE0C; Wed, 11 Apr 2018 12:11:12 +0000 (UTC) Date: Wed, 11 Apr 2018 14:11:03 +0200 From: Greg KH To: dsterba@suse.cz, Jia-Ju Bai , davem@davemloft.net, johannes.berg@intel.com, jikos@kernel.org, stephen@networkplumber.org, Jiri Slaby , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tty: ipwireless: Replace GFP_ATOMIC with GFP_KERNEL in ipwireless_network_create Message-ID: <20180411121103.GA2394@kroah.com> References: <1523349106-29584-1-git-send-email-baijiaju1990@gmail.com> <20180411110945.GA21272@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180411110945.GA21272@suse.cz> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2018 at 01:09:45PM +0200, David Sterba wrote: > On Tue, Apr 10, 2018 at 04:31:46PM +0800, Jia-Ju Bai wrote: > > ipwireless_network_create() is never called in atomic context. > > > > The call chain ending up at ipwireless_network_create() is: > > [1] ipwireless_network_create() <- config_ipwireless() <- > > ipwireless_attach() > > ipwireless_attach() is only set as ".probe" in struct pcmcia_driver. > > > > Despite never getting called from atomic context, > > ipwireless_network_create() calls kzalloc() with GFP_ATOMIC, > > which does not sleep for allocation. > > GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, > > which can sleep and improve the possibility of sucessful allocation. > > > > This is found by a static analysis tool named DCNS written by myself. > > And I also manually check it. > > > > Signed-off-by: Jia-Ju Bai > > Reviewed-by: David Sterba > > We don't have any other patches queued for this driver so it would be > best if this patch goes via net or Greg's tree. I can take it, after 4.17-rc1 is out, thanks! greg k-h