From patchwork Tue Jul 25 20:45:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 108711 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp29420qge; Tue, 25 Jul 2017 13:46:37 -0700 (PDT) X-Received: by 10.98.236.78 with SMTP id k75mr20451822pfh.215.1501015597115; Tue, 25 Jul 2017 13:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501015597; cv=none; d=google.com; s=arc-20160816; b=iqMmQKythOXQ8v8THXUXgJq77alxwaiGCqNXVD1cbP9rrsH7Gj31egd5QqF7EsWKf5 gRjXMyniD8fntrSGKTjzB4maVSlngI0vltFH/jyUDb2DX7wdsjq8ukMaXDQBx4WyLrL7 5Enac1wR5u6lUvsw28N3nlB/yccIvUmsdcf4E5q6x4UNdGLi4pwQUnnrfi/4Rj4yRbLO ezyPLDWSK0SKN3qfRahQVZbb4sZwYNxycST2VYTnJY1vRwEC1LyXfZa4zhwDpkax8S82 dAAHZBtnj4tfoLpmkenSc2xDbqGFRxXzpA0MMFEm289N44FCT7UXY6T60Rw3V0qEanjB MrnA== 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=xyGnSAklHTpoqB/QEP2QE1vVKsCMpxgJnV4Fll2+pNmVrYPFSCch2ttinBpsCw2bGp YAikRT2nABD6PccMtItIBXfKfXW/dtwYLKqHghN55bBlBu56wxu9HgzFkLI11p7kFdon RJzq5qTzBLwalDwyAnS9tNKyTzuUD4kybp02fNy1FPx+pLhaSgJGs0lttMJ4ZN0X6ol+ PuJMlNGoNJaajKJazjSblBg80fkM92N8hdHGnf/8sLQ2wTs9cTh6gNN7SAhSZQEO/J0X HzvBtJCvGcaHbNzG3TNOPuLyCQvZ2YUrkelmjNdCNyIxf9g9MsAePONI3+mcsKtPmNY/ O9Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=W6eQJMm3; 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 m1si8985184plb.340.2017.07.25.13.46.36; Tue, 25 Jul 2017 13:46:37 -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=W6eQJMm3; 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 S1752599AbdGYUqA (ORCPT + 6 others); Tue, 25 Jul 2017 16:46:00 -0400 Received: from mail-pg0-f52.google.com ([74.125.83.52]:34585 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752552AbdGYUp6 (ORCPT ); Tue, 25 Jul 2017 16:45:58 -0400 Received: by mail-pg0-f52.google.com with SMTP id 123so74824707pgj.1 for ; Tue, 25 Jul 2017 13:45:58 -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=W6eQJMm34V33NvClKVghYPDeYoDqGjkfOelfG5GXfvcMZbUQ8iJwPCOSExUkSssHY5 0nz2j5+MGjKnpk6ck0d7uBTRQ/OQqon+u/RcJM/+iInbuYACzwyb55DnGA9qP0lfIGUE pKXdqTNHD34eIZC84BEbRAHFjZOw8bB9I6pyo= 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=eksF1JwUpdK0g6aO4tMcZQV65mqCmnl7dfGze3wTeg4dm1PdVh4G+EQVdXxPOu9ieY zi1YzQ05s5Im6Qwx9CE94yfgBK/J0zNxdIz1BL8APfiFmyXtKl+/6O/HkIWdPSo+Mm/i Ok8cJcfmIFtinbjYQCfUNovAVhjvQ9dtFAws/Mj+M94EVd0H2u8qdhHJIWZNGHdn8o07 rQhbO/1fwNlDlpKTbe4BahlDhjtRM8r2ZtI2OpOKgNzYPo9R4Quzw3jkzcTzyJqAbc9M F3RsXARQLLgXlCLvDo0KzLPXqRnRruCM0J6ZykQmNENJ3H4ooBLthz5AG50f7nmMcg78 o7zQ== X-Gm-Message-State: AIVw1124B6OTBTZefXdcU4i2DZ6VHT2boWteRpQCI6y5I/Ds3Nvoz8ss cR/Wo5jd1rbd0Lo/ X-Received: by 10.98.72.90 with SMTP id v87mr20977477pfa.337.1501015557997; Tue, 25 Jul 2017 13:45:57 -0700 (PDT) Received: from localhost.localdomain ([106.51.135.235]) by smtp.gmail.com with ESMTPSA id d4sm532125pfj.59.2017.07.25.13.45.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Jul 2017 13:45:56 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Jia-Ju Bai , "David S . Miller" Subject: [PATCH for-3.18 09/15] isdn: Fix a sleep-in-atomic bug Date: Wed, 26 Jul 2017 02:15:20 +0530 Message-Id: <1501015526-32178-10-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501015526-32178-1-git-send-email-amit.pundir@linaro.org> References: <1501015526-32178-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;