Received: by 10.213.65.68 with SMTP id h4csp2116887imn; Sun, 8 Apr 2018 20:07:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx48tBNK/dgi9hIfUBh1oE4kT6QkWR3UCYSfdAZj7sszcv5u6K5F3PGIJp/d/qotUDycGMw/b X-Received: by 2002:a17:902:8f8f:: with SMTP id z15-v6mr2434499plo.174.1523243273163; Sun, 08 Apr 2018 20:07:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243273; cv=none; d=google.com; s=arc-20160816; b=qM8+pRPzml4eHZbxccoEiyeEESA4UynP9BDZYyleoT8EP+csg0wwdq+w8zNe/JjV2P ThVaYWy8KQWoiXMjWLgx7Iwn+kv04zzM+4zMand3oaKS/2FZJd9TheWVHWfndpwMwxa6 M7aNQwaXxQWr00ICpo40A+ZV80igD3xSCXyZGL118eGlU0DnZZSkJpYobP3JGUy8b7Na wxhuoaTfqJp2NKMocmhpWeDu45XeEI9FeNMoqul5rS6pIyLk9dI6DCP5EqiwjhgWnvz1 hPdx5xGALzPCLLSC/Z6HLAAYVw6syC9w2cNhrNN4LC7wKbWtyd/XxkOZx40flofI9eFE gzvg== 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=e8UDj0/H1V7ipQyzatHcVrUOw57HyTfFQ4om3LgXasI=; b=T7T3cx+YDhAZKXGKVQje8ZI3IxcCvoEj00ErYx36WjUv6zB/JVPPb5ySErwLYuwyaY taj7164xJ53FPNQQSOp8tCl4lNEB+wy2LB1DEtr6Y5M9v+aBSGNKPD4k0F4QCmr9ogb2 roSRNQtZ6pAVO+uRFqww+dQb+haXDvjHCGcvtzduc+T4A8GLXK6FNSq3VjLpKecE+rtV Yr3nAJcbhq1RDiis1LHguhYrqxJhGI3Pa8ceN/qcbaGvBkt3wRMD/u82GAnT2Gw0Ko86 nDe3TMqTzfd7Dmnsiwv2QYejWM16VzzrObFF/vCzXW1RGeYhNH8kHIeJqcAW6Z/G6jAA 3PxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NjpbBqCW; 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 f32-v6si16804471plf.415.2018.04.08.20.07.13; Sun, 08 Apr 2018 20:07:53 -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=NjpbBqCW; 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 S932836AbeDIBfh (ORCPT + 99 others); Sun, 8 Apr 2018 21:35:37 -0400 Received: from mail-sn1nam02on0123.outbound.protection.outlook.com ([104.47.36.123]:10752 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755736AbeDIAfI (ORCPT ); Sun, 8 Apr 2018 20:35:08 -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=e8UDj0/H1V7ipQyzatHcVrUOw57HyTfFQ4om3LgXasI=; b=NjpbBqCWx4UxJtaO1qgxfnbecp4kmoqcjF1dOOg9icPrSX/+KiIpQwbBa9t2+KdQRigd2yhzGCRwq5ap4wikNYkIl0swybfIL6pCQTTZ2gZa0vwsxgYvjtu8OrhJxCz4tH/CERylf3hAy6ADexWXNxdK6kYVSPzHoz2Bo7qska4= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1013.namprd21.prod.outlook.com (52.132.133.35) 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:35:05 +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:35:05 +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.4 024/162] scsi: megaraid: Fix a sleep-in-atomic bug Thread-Topic: [PATCH AUTOSEL for 4.4 024/162] scsi: megaraid: Fix a sleep-in-atomic bug Thread-Index: AQHTz5mdAg7uyGxtCk6uLNgT6Eo5Ig== Date: Mon, 9 Apr 2018 00:28:00 +0000 Message-ID: <20180409002738.163941-24-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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;DM5PR2101MB1013;7:TsBo8xKRE9MrqsF2dpptasoC1y/ucAj15TqQy1AZYL88eN/bRezR2sxjAd2Sn7BNrsQRIpisbEgNN2rVb6XuYyVR3hmLudMPN3aGF7lZg0VIXrfCdFKb/SrsxuUEklbyXH+h00q4cbar+Ngtrw//XWqJjrhMFq2fhBMvORjkEqZSkpReUhT1aXTOkO2RPQWv5MBDR0ro+QCJkcVTxLr1K0bRdk+YsHTJKVQd9pIgBHzAMUaf3L8k/VtLKX0ta+i9;20:ASemaBuFWshhB7FV4YueM7DGK3RWR10a0V0GxYMXQsDRnWWboORKe0NlWLvzQuqn6kA/r7aYPNY6EWTgVT7mkiqW4V/A/n34HTh1aHBpM/oknWaGd3wzqTm69Hedru8BJx19ScrhRTh6yF+hJlxc/JSeWgaL81n+hnvF33s38RQ= X-MS-Office365-Filtering-Correlation-Id: 0828a6e3-84e8-4ee9-ea5a-08d59db1bd9a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020);SRVR:DM5PR2101MB1013; x-ms-traffictypediagnostic: DM5PR2101MB1013: 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)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1013;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1013; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(39860400002)(396003)(346002)(366004)(376002)(189003)(199004)(478600001)(10290500003)(6436002)(5250100002)(2501003)(5890100001)(14454004)(305945005)(4326008)(66066001)(99286004)(10090500001)(6506007)(36756003)(102836004)(54906003)(486006)(107886003)(76176011)(59450400001)(2900100001)(22452003)(316002)(110136005)(86362001)(3660700001)(2906002)(81166006)(186003)(86612001)(81156014)(2616005)(8936002)(3280700002)(11346002)(53936002)(7736002)(476003)(446003)(72206003)(68736007)(6116002)(5660300001)(106356001)(6666003)(6486002)(8676002)(1076002)(105586002)(26005)(6512007)(3846002)(97736004)(25786009)(22906009)(31853002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1013;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: EcMR3Zu2aoAoDKiUwHdoEcwJ/4vEOgzer5jlOJ3O5mmn/FaESA8jobC9GE2IL+xUxTbYlhpNDSlhi/74H822JEn207uGX6zNyqN9qn05PL8Tcjaa46LyHxq8242v0B0YKgDUfU1Q0qGjF5zTonZkti4XLH5e1SF517xAiqdXhOekMp7r7e/H7Av1HljreVoN0+PUE2McD1rrRvef7U9RhCv0MrpRKA95h5KS+nn83QqAztAN9TUvk+UYgIi9HHXu1V6PaETCqP3vGn8yyXRK32mRmEsnSyVkcFuGbZE55gubQ6ZYd3msyxfrM+pbhPCfkyPosi0rEk7M8v5GLo2y2CcW7uVH2emIJBIgZZtt137sGgRPUZCfw7RVcqQto8jnqmvqNiwmH0rTpq4+en1kVSTWhgNhss1myYUOtF7Y6Dk= 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: 0828a6e3-84e8-4ee9-ea5a-08d59db1bd9a X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:00.0985 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1013 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 a70692779a16..bfc7984a1c17 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c @@ -570,7 +570,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