Received: by 10.213.65.68 with SMTP id h4csp2121268imn; Sun, 8 Apr 2018 20:13:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx49fBTDoDfOOzHPRGWC0TQk0DbbhHOhZCOweoNxtgCIiwopTIVza/xYN7P/yinTwm4otddjl X-Received: by 10.98.166.14 with SMTP id t14mr27990341pfe.195.1523243627656; Sun, 08 Apr 2018 20:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243627; cv=none; d=google.com; s=arc-20160816; b=DIk110Y8xzyoS9T6mt112IouGlepNK+5lxO5Bj4R5dWkIIoDiZeUEqxgu0a/ilCnxG 7CkRe2DJL4vy5go6k5E1VtzhHAuB6kVifHT3nfcqLukwinhcJ1cGKsDOaJkv9HcnwuBp 89PBygZNQNVaghxlIRL+kNu/KlKXsR/DZYoow2SOgT0pzLKuqPByU61534pDATl3TZ/0 Cu/8hvtymT9tK6Ze8FzqpLqKBkb3W89DSHvdKlXLnEgp5C18DbvRIPv9W31m2oOoX2wx XsDqQlT9vPyMhCGNIYJVjH8omVMY0f64BNAoOBHhw29z67dV18CR6aynmskE+dsT36Qs JoeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=B8NwzCfmzZAlxjfb9glc2PFhLBDQ0tQBfBWAjD8bKjE=; b=d6qTsQc66u9QPOspjCVoQ6/vjlKCpKgzmW7R+xSkXVXiVT8b6Jsf/el879df9TYRHI PoL8g1iaI2x82jM7usp0+n9fCcBKOCQ6zLwxvNCw2dgM4ugb80Ud9hJzEqYJ+KiHyP4y IcxNbbGnJwjPkB230SePswGJhucCrFTPFNlSlUH+GA1uyVaFi0N+0U7wkkE+TxnhWE88 EPA1JPc9W/DY3MqZr8CgwUlcAWYPmPHH+BL9ROMxh/uYLF3iIGLOU7BeFwvR+MQYiyyp jqEOZbQfNOcxh8f7g4A8cCZ4Hpf9N+r58UpeVbNsteVhm5Hf2bW5YE7GbtyJh6ZtR5Rj 0cig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=lS0fQhKO; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si10664900pgq.266.2018.04.08.20.13.11; Sun, 08 Apr 2018 20:13:47 -0700 (PDT) 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=@microsoft.com header.s=selector1 header.b=lS0fQhKO; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758072AbeDICfi (ORCPT + 98 others); Sun, 8 Apr 2018 22:35:38 -0400 Received: from mail-cys01nam02on0104.outbound.protection.outlook.com ([104.47.37.104]:11355 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755635AbeDIA1h (ORCPT ); Sun, 8 Apr 2018 20:27:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B8NwzCfmzZAlxjfb9glc2PFhLBDQ0tQBfBWAjD8bKjE=; b=lS0fQhKOTuHJUotBSorWkMnKTCZwEuS0/+CTJjXHZpDwTU3MLEfIBw+Dp4ZOD6wbTNGgFzE1WRcTKupt2OKYIuHBumD4K8LTlYmnlZZC8PGgGBIUbw6/EBN6TYjJ1c4RJCWDOD98H0lmu7uBHRfGq/54XTj8z405tSuYgMHq+VM= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:27:30 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:27:30 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Jia-Ju Bai , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 051/293] scsi: megaraid: Fix a sleep-in-atomic bug Thread-Topic: [PATCH AUTOSEL for 4.9 051/293] scsi: megaraid: Fix a sleep-in-atomic bug Thread-Index: AQHTz5j84JIbDjCD6EWNA7Dy9nySLA== Date: Mon, 9 Apr 2018 00:23:29 +0000 Message-ID: <20180409002239.163177-51-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1031;7:R4CjEsEKrq1rLNuZIYzc/IBT6/ijMAwWPjBuiY0e0T2hhn4aRO+14Y7PixvnVdZdoPV4wi4LF7ZMyDyO96ZnsCfK2osIfo9rdPwCL2k1Se21nePb+N63GOPJWFSvW0hKAGSroxJOR83Q9rPplPstN1+ly4d0zDZVFtSHsUOHb3bOUZzyXeubWVzmwygTCBZOfJysrvvyynw+P2k8LoSpYGj6ZtAsaztk2iuMojociWB10Q0W6PfOgr+hIYNXuxE2;20:mSdbWTZVnGGKBfD/FAKFKj57IHbr8z7hmxwMjIMvaWvdZSfGK1S2h0Q1WSGl7qeqbWrp/pU77eze/WaUt4W60naB7Qo7AFlwDvL4OeDKQuCo3wKfY4j3DcSImystMPWAS8KSqOpQ6j1l11bc7D5S8/PYp6GwGB2C1LxvsziZaD4= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: d1293ab3-150c-4843-75bb-08d59db0ae65 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(130843839470238)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1031;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1031; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(366004)(39380400002)(346002)(39860400002)(189003)(199004)(2900100001)(10290500003)(99286004)(76176011)(14454004)(7736002)(11346002)(26005)(86612001)(72206003)(478600001)(36756003)(106356001)(66066001)(2616005)(186003)(22452003)(86362001)(68736007)(305945005)(54906003)(102836004)(486006)(59450400001)(110136005)(316002)(6506007)(446003)(107886003)(5890100001)(53936002)(4326008)(105586002)(6436002)(6486002)(476003)(6512007)(5660300001)(5250100002)(25786009)(3846002)(6116002)(1076002)(97736004)(3280700002)(2501003)(2906002)(81156014)(8676002)(10090500001)(81166006)(8936002)(3660700001)(22906009)(31853002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1031;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /hVLFc+YY2gPx2HtAIXl7OW3WKZ09OAxhULcuF7/17XlMDLkWBL/Ktvf0BKkQOmfcyCAS9jlIFzkdGFODjC7AF9/pegDRJM3DOpH0eFUys9tf+8g6PmuGjzjeSuyeGmXr9vIZka+bFRCaaQdFevevFjeH/LyRZieqUtwZtDTGNxv9dvC/z32mZYgBoD9L23YTjDfDZnW6FUp69+ZYmB5poPimTAO8QrP9Xt11cvaXcIjtRJ/w+RH1JEBpunfPRNh+FQxwPPZMduRmBPNhOWGldYYdoOyAAJv7Z97nqn39XZf2kpSmByxZBYeVNdlSrcwB2fDVMqdJisdWkrTgAFmMM2D/R5ohtMtsL+olMoJBsFMa6Ax3q1gz3oAGwjodyWKAt8soWhdcVWnFmKqc7diZPqNTpTLjsvOuK81MhEWkHw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1293ab3-150c-4843-75bb-08d59db0ae65 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:23:29.7374 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia-Ju Bai [ Upstream commit 896f6966fc815abe71f85fb26f0193875df8a035 ] The driver may sleep under a spin lock, and the function call path is: mraid_mm_attach_buf (acquire the lock by spin_lock_irqsave) pci_pool_alloc(GFP_KERNEL) --> may sleep To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". [mkp: fixed whitespace] Signed-off-by: Jia-Ju Bai Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/megaraid/megaraid_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/me= garaid_mm.c index 4cf9ed96414f..544d6f7e6138 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c @@ -574,7 +574,7 @@ mraid_mm_attach_buf(mraid_mmadp_t *adp, uioc_t *kioc, i= nt xferlen) =20 kioc->pool_index =3D right_pool; kioc->free_buf =3D 1; - kioc->buf_vaddr =3D pci_pool_alloc(pool->handle, GFP_KERNEL, + kioc->buf_vaddr =3D pci_pool_alloc(pool->handle, GFP_ATOMIC, &kioc->buf_paddr); spin_unlock_irqrestore(&pool->lock, flags); =20 --=20 2.15.1