From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([149.20.54.216]:51471 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755846AbbGCWcP (ORCPT ); Fri, 3 Jul 2015 18:32:15 -0400 Received: from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net [74.93.104.98]) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 201EB58232F for ; Fri, 3 Jul 2015 15:32:15 -0700 (PDT) Date: Fri, 03 Jul 2015 15:32:14 -0700 (PDT) Message-Id: <20150703.153214.1484455100213965906.davem@davemloft.net> To: stable@vger.kernel.org Subject: [PATCH] SPARC From: David Miller Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Jul__3_15_32_14_2015_000)--" Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: ----Next_Part(Fri_Jul__3_15_32_14_2015_000)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please queue up the following Sparc bug fix for 3.14, 3.18, and 4.0 -stable, respectively. Thanks! ----Next_Part(Fri_Jul__3_15_32_14_2015_000)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sparc-Use-GFP_ATOMIC-in-ldc_alloc_exp_dring-as-it-can-be-called-in-softirq-context.patch" >>From patchwork Tue Apr 21 14:30:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context From: Sowmini Varadhan X-Patchwork-Id: 463148 Message-Id: <1429626641-199974-1-git-send-email-sowmini.varadhan@oracle.com> To: sowmini.varadhan@oracle.com, sparclinux@vger.kernel.org Cc: david.stevens@oracle.com, davem@davemloft.net Date: Tue, 21 Apr 2015 10:30:41 -0400 [ Upstream commit 671d773297969bebb1732e1cdc1ec03aa53c6be2 ] Since it is possible for vnet_event_napi to end up doing vnet_control_pkt_engine -> ... -> vnet_send_attr -> vnet_port_alloc_tx_ring -> ldc_alloc_exp_dring -> kzalloc() (i.e., in softirq context), kzalloc() should be called with GFP_ATOMIC from ldc_alloc_exp_dring. Signed-off-by: Sowmini Varadhan --- arch/sparc/kernel/ldc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index d2ae0f7..7d3ca30 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c @@ -2290,7 +2290,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len, if (len & (8UL - 1)) return ERR_PTR(-EINVAL); - buf = kzalloc(len, GFP_KERNEL); + buf = kzalloc(len, GFP_ATOMIC); if (!buf) return ERR_PTR(-ENOMEM); ----Next_Part(Fri_Jul__3_15_32_14_2015_000)----