Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3716880imu; Mon, 14 Jan 2019 07:53:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN50YITOIexxY8ZcWj4xKiJT5xh05A1tsl+tw3EBfOphO8UhBGlSP/G9H3UWIHPDMsjPd0Az X-Received: by 2002:a17:902:690c:: with SMTP id j12mr25807751plk.206.1547481200749; Mon, 14 Jan 2019 07:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547481200; cv=none; d=google.com; s=arc-20160816; b=igD/Se0dDqS5bdZKZEHVaDiNiebvvQjuVeJrLUJRyHKcHPevkU/xxpS2oSMjgSjmO4 MY+bdzYlUzscLAge/+RP/i40JNWRjWnK/aUzCNkOWSooFnbNmyUY4KQ9FeYyLP+Dzd8O YPKhF9Do+p3nPjtSDZ2TJaIKEcoiCDx6n2TlNj1F1zy1X91F3iI0O11g52IqWGg59HZU dKxoPzFIUouVBnazUdCq06hIgUP/P8gQRIZSK6YySDvLo7wv0QsSfOktZ+/e6FtprcX3 JwcQoDv/BtzCkopaTWFPpSTBqitnwa6Wh9S1+XwxMNdvG7UozVjHeQF400oowq/CUf1c cUvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=R7cWA0rAR99iOdomE7NfAjm4s0f19VxumPd+0wyXzNg=; b=FDEPY3DYIMLnWZPemg7IeBkHn0m9+c+rp1LeMhvz74KmQTF4f17uG4KYpmbKtk2cNz NyJfoLBKUmH2BqyaRY2UpGLPwdd2n3WIDqb8GX23nqrmwOrqhzg58jQUXaBXMC5MKpX7 mwhyIUmhwSY6fvsJ5YJhxzqq2yocw+RdWiZsVZAkw7ZlyENaIPa1C6v5WuHMCCFFERmp hTIV5DrxrTMvb/vwT4c6I2rHO840BlmnL1CiscOXJmUEPaaPFg9XYcblu1H4tEjajCx+ sauyaf0ySOGtRfIYXzCdhAB+1CSjL2BT/6o+4JbzY0IXw2IAQhYto7baUl4XZXZk+SRe Ik3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=gH8jzLC+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si627679pgb.140.2019.01.14.07.53.04; Mon, 14 Jan 2019 07:53:20 -0800 (PST) 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; dkim=pass header.i=@163.com header.s=s110527 header.b=gH8jzLC+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726771AbfANPuh (ORCPT + 99 others); Mon, 14 Jan 2019 10:50:37 -0500 Received: from m12-12.163.com ([220.181.12.12]:55573 "EHLO m12-12.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfANPuh (ORCPT ); Mon, 14 Jan 2019 10:50:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=R7cWA0rAR99iOdomE7 NfAjm4s0f19VxumPd+0wyXzNg=; b=gH8jzLC+rtkO7GCj7LMLOrqcR0aZERT7rE fn1p5ULIFWbn4mjTQ8Pqkpag+M4Hztxa+7g2VbOtdxfpjImaYWI6orC1biHWJI0K V3BaF3yHP23fe5grIGcgf8MXnDBL+C+are2/d54P6mTFbgV6cxyjoiGtwW0P4OzR ajT4woNcM= Received: from localhost.localdomain (unknown [171.213.47.169]) by smtp8 (Coremail) with SMTP id DMCowADX389QrzxcjExAAw--.49367S2; Mon, 14 Jan 2019 23:48:33 +0800 (CST) From: wangbo To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, sstabellini@kernel.org, xen-devel@lists.xenproject.org, wang.bo116@zte.com.cn, wangbo Subject: [PATCH] pvcalls-front: Replace GFP_KERNEL with GFP_ATOMIC in create_active Date: Mon, 14 Jan 2019 23:48:29 +0800 Message-Id: <1547480909-11844-1-git-send-email-wdjjwb@163.com> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: DMCowADX389QrzxcjExAAw--.49367S2 X-Coremail-Antispam: 1Uf129KBjvdXoWruFWxurW8Jw1Duw1DKFWkXrb_yoWDAFg_GF WUZw13Gr4jgFsxWF1qkwsxZF9Yyayqqa48uFsI9a47Jw4vyr4DZrW8Zr45Kws3GFW8C3y3 tw45Xr18ZF4UtjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUndWrJUUUUU== X-Originating-IP: [171.213.47.169] X-CM-SenderInfo: xzgmy4re6rljoofrz/xtbB0gk8GVUMMsEWuwAAs5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Create_active may called inside spinlock,replace GFP_KERNEL with GFP_ATOMIC Signed-off-by: wangbo --- drivers/xen/pvcalls-front.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c index 77224d8..31bd3c9 100644 --- a/drivers/xen/pvcalls-front.c +++ b/drivers/xen/pvcalls-front.c @@ -344,11 +344,11 @@ static int create_active(struct sock_mapping *map, int *evtchn) init_waitqueue_head(&map->active.inflight_conn_req); map->active.ring = (struct pvcalls_data_intf *) - __get_free_page(GFP_KERNEL | __GFP_ZERO); + __get_free_page(GFP_ATOMIC | __GFP_ZERO); if (map->active.ring == NULL) goto out_error; map->active.ring->ring_order = PVCALLS_RING_ORDER; - bytes = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, + bytes = (void *)__get_free_pages(GFP_ATOMIC | __GFP_ZERO, PVCALLS_RING_ORDER); if (bytes == NULL) goto out_error; -- 2.7.4