[PATCH] SPARC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please queue up the following Sparc bug fix for 3.14, 3.18, and
4.0 -stable, respectively.

Thanks!
>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 <sowmini.varadhan@xxxxxxxxxx>
X-Patchwork-Id: 463148
Message-Id: <1429626641-199974-1-git-send-email-sowmini.varadhan@xxxxxxxxxx>
To: sowmini.varadhan@xxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx
Cc: david.stevens@xxxxxxxxxx, davem@xxxxxxxxxxxxx
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 <sowmini.varadhan@xxxxxxxxxx>
---
 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);
 

[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]