Received: by 10.192.165.156 with SMTP id m28csp585813imm; Wed, 11 Apr 2018 04:15:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+QiMDSSdd5JlDLkAnIVysj97Zju2ypA9NVxia/Qgx+1n+nX9xB5RxXU+0IbxZ1v2zaYSZ7 X-Received: by 2002:a17:902:51ce:: with SMTP id y72-v6mr4531913plh.157.1523445353236; Wed, 11 Apr 2018 04:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523445353; cv=none; d=google.com; s=arc-20160816; b=bJaWWM5y+FHeVByUmpcYebIQYqjdcFdXUvAvA4iV6wBC+cVNVRbo2J40pxsrceIoIF ENDVvzqXC17qXhU+BPgUQM/eLUAyATF/qgJUr22iJUdWaF0faSO+A6bF0j5Do9b1nGBr QbIMB0166ZWyHg4ZZwmZiaS4ZnN6ag/2thOAKkv3xBGuxIKHs7Jpt5HeTjFRe6g9+e4D Dz56l3rxQyKIkR2llKkA3d35ks2Ja4TG86alai1kUO1K6SivbfEOuTqVvakMnf7ym3Wu PYBdWvzxH2+jnu41xHr3G+76408oCKvJOVYNuy9l9ilKrfw6ckJDkaJdgZ9UvtNmJmWA uirw== 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:mail-followup-to :reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=icIenROs0wInk5toLXQcyUScMJj6oDTrpJ2Bblsm5Vs=; b=XbKxE9VzZokH7ThTi3WsPU5dRNUcUlwvm6jQsoXJN8bEfFS+zhK43nx9q8JIkl2WFB 4EN9mq49jIENrMqh18kj77viCgkQGTAKzFQJJQ05KvHxAbfkaTVF7veGFoA72Fjbta3B 1iqzof6YOjAS9O7RmQUPHYy90vNIG5Ls8/Hy0DMIxybTAMho9+okgA1ibieHKqAkbxiQ Rt2dUZPinSPjG2UJkP19ra2HKW43XBibPWZgi1iSOocXjnyQYnoKF07NfBz4I9np2juT LNruhkxoVQN7kQ5XzQJR1xmTpMNpnF3BMYXd8CsmTkKAiAw87i0u3KRsoOoVZqkkbWgd 0/2g== 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 14-v6si940977ple.450.2018.04.11.04.15.15; Wed, 11 Apr 2018 04:15:53 -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 S1752804AbeDKLMQ (ORCPT + 99 others); Wed, 11 Apr 2018 07:12:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:41770 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbeDKLMP (ORCPT ); Wed, 11 Apr 2018 07:12:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6402AAF26; Wed, 11 Apr 2018 11:12:14 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id AFE82DAD25; Wed, 11 Apr 2018 13:09:45 +0200 (CEST) Date: Wed, 11 Apr 2018 13:09:45 +0200 From: David Sterba To: Jia-Ju Bai Cc: davem@davemloft.net, johannes.berg@intel.com, jikos@kernel.org, gregkh@linuxfoundation.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: <20180411110945.GA21272@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Jia-Ju Bai , davem@davemloft.net, johannes.berg@intel.com, jikos@kernel.org, gregkh@linuxfoundation.org, stephen@networkplumber.org, Jiri Slaby , linux-kernel@vger.kernel.org References: <1523349106-29584-1-git-send-email-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523349106-29584-1-git-send-email-baijiaju1990@gmail.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.