From patchwork Tue Jul 25 19:29:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 108669 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp939302qge; Tue, 25 Jul 2017 12:29:36 -0700 (PDT) X-Received: by 10.99.96.73 with SMTP id u70mr20635986pgb.345.1501010976349; Tue, 25 Jul 2017 12:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501010976; cv=none; d=google.com; s=arc-20160816; b=xnSgCP6O76sezPY6GhCPzpwD+SXSQRrKmOp4okU0Mu+5mQP+0sgke/pzgglsFHHdbp V/jUO4rPkqQZrA5le0XGXWLEDj+wKF90hQpHqlO6uys2LTItJ1/hH6sG/vFJd4MiZ+Ih EV/iru2zb2p1p3vyEzgZVzj7/H0RjNkxdkZI/VAV9pOWJ3pqOai5ZZojeVC9MSLM2EzU FpoILOPEKOnNWqkyhpLjJ39GdCf1phCCp0bFhTflflLAdGmrMj3SdpBSmsm75Z1MYwNe ARaOwKqiNuQu0U4adHgSMmikZanNJ7vE4riTM/NsdBmivZCBbvvqkhJ1KNBP41PTmmAB 7/6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+IT8FuLYyNifhF7YAD4hYXJgW8YkQ4S8/FTml/GrQyI=; b=xYw25eEXKRQ4sXmA8SRDgPf9KPoSG2IwUWCSC21avkaFNfcRrqH7UA7wYbplQuIO1s lk4+hrJ6Qgf1qpn1SY7yCITSvIStLwpCjFbY/8VVT4bDyR0441IWzXlFPBKpw5vh7o9X wDApUouZ+LEYhDFmrWt3ki6pr7tDFEnNm5V7YKOnhOVYJNktlZlK5ZXszzyKYXxLY9Dl U38Aa2FQ7uZV22DmFX339SDwX50lwtWKNh30kmB2Wmf9JW0tZa++84soLrlVQ299Ylex PEF/j7XlhwCWsWMvIqeiiZqf181qgHjBAZ91SbgLEpGGnRtdY63DXPMlavkMoS7/nZ4I IKxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=f0RRSP+F; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o129si8605553pga.543.2017.07.25.12.29.36; Tue, 25 Jul 2017 12:29:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=f0RRSP+F; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754321AbdGYT3e (ORCPT + 6 others); Tue, 25 Jul 2017 15:29:34 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:36752 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752544AbdGYT3d (ORCPT ); Tue, 25 Jul 2017 15:29:33 -0400 Received: by mail-pg0-f41.google.com with SMTP id 125so74109663pgi.3 for ; Tue, 25 Jul 2017 12:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+IT8FuLYyNifhF7YAD4hYXJgW8YkQ4S8/FTml/GrQyI=; b=f0RRSP+FlCDryfeXQpB5eFU/8MiulnwWRr15GOcOvHOYNiuY2z+kMIjttJxuB40Svq DY3y/A1iKwLFvmBXrHIj83g240za0hMV9EcQ2vn/exDCRH+EfhdZs3W4y3cwOyrCA89S HRuAQkZpSzhWeUNnbxbK7x572jtqD39z1J68k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+IT8FuLYyNifhF7YAD4hYXJgW8YkQ4S8/FTml/GrQyI=; b=h317eEhAh9HLcoAMUr30IpzSfd9ErW8JLxa+M9GwTlQVtH2KrJ2p9fhoQ588SmDddX QY1oSvu4mGfBYfhq1waX3jtJlkJpuw35pkg63qbozO/Pb2QKs3VfbWC5eZZc6VulYjeI s0utAJ6ftnNblY/Njh0ZxffzPoRWkmgjaDtdbu12m+pHl9/O3Wl4pRVbqkO0ooWPQmUK +qSfDCNmCr5lE5+qZFzgYozIJjG2ryKnCAbX7N0cuxBAXMgrF47sTKwQAGwxFNDCkYzx gNW5grTMLxoSnVJJwZjjf78yqnAi+hNU0WUqWrQqZ1ME2WnJTL3y13rwocY4UB/FTs+N nugA== X-Gm-Message-State: AIVw110yqy4jzNBzD8w03BKjr8E6zeUixSgEsb2A+Dee6CLK5Swlgnrv 2bJd9TCsHH/HOFnI X-Received: by 10.98.152.208 with SMTP id d77mr20382267pfk.210.1501010972573; Tue, 25 Jul 2017 12:29:32 -0700 (PDT) Received: from localhost.localdomain ([106.51.135.235]) by smtp.gmail.com with ESMTPSA id 85sm30371425pfr.90.2017.07.25.12.29.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Jul 2017 12:29:31 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Jia-Ju Bai , "David S . Miller" Subject: [PATCH for-4.9 04/10] isdn: Fix a sleep-in-atomic bug Date: Wed, 26 Jul 2017 00:59:10 +0530 Message-Id: <1501010956-27944-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501010956-27944-1-git-send-email-amit.pundir@linaro.org> References: <1501010956-27944-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jia-Ju Bai commit e8f4ae85439f34bec3b0ab69223a41809dab28c9 upstream. The driver may sleep under a spin lock, the function call path is: isdn_ppp_mp_receive (acquire the lock) isdn_ppp_mp_reassembly isdn_ppp_push_higher isdn_ppp_decompress isdn_ppp_ccp_reset_trans isdn_ppp_ccp_reset_alloc_state kzalloc(GFP_KERNEL) --> may sleep To fixed it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/isdn/i4l/isdn_ppp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 9c1e8adaf4fc..bf3fbd00a091 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -2364,7 +2364,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s id); return NULL; } else { - rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_KERNEL); + rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_ATOMIC); if (!rs) return NULL; rs->state = CCPResetIdle;