Message ID | 1502683489.903.1.camel@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 897C4602BA for <patchwork-linux-block@patchwork.kernel.org>; Mon, 14 Aug 2017 04:05:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C06328562 for <patchwork-linux-block@patchwork.kernel.org>; Mon, 14 Aug 2017 04:05:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70C0D28564; Mon, 14 Aug 2017 04:05:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D914528562 for <patchwork-linux-block@patchwork.kernel.org>; Mon, 14 Aug 2017 04:05:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbdHNEFk (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Mon, 14 Aug 2017 00:05:40 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:30796 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbdHNEFj (ORCPT <rfc822;linux-block@vger.kernel.org>); Mon, 14 Aug 2017 00:05:39 -0400 X-IronPort-AV: E=Sophos;i="5.41,372,1498492800"; d="scan'208";a="138550781" Received: from mail-sn1nam01lp0112.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([207.46.163.112]) by ob1.hgst.iphmx.com with ESMTP; 14 Aug 2017 12:10:56 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8L9Gskmf0SYk3p8egXf2p8OAhcxAN9ZUBA+MA5ncUoY=; b=RBnnKzOfC96TZewfGMTEN9j39c5YwKD7JlvptLBrB9aheYuQaaLMfhSAAKsrTUmltrTw5vTz/MJ/CD/xGWTPTjnLMU664JExLx+dR1p7Jd6bp7CNswssphLQRQIsXmBHX70JcN9XUQx3I1lcULKLgCJ0cLlAlZFweEVsA6fMSTE= Received: from BL2PR04MB1969.namprd04.prod.outlook.com (10.167.97.141) by BL2PR04MB1970.namprd04.prod.outlook.com (10.167.97.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16; Mon, 14 Aug 2017 04:04:50 +0000 Received: from BL2PR04MB1969.namprd04.prod.outlook.com ([fe80::3dd8:226a:7213:18cb]) by BL2PR04MB1969.namprd04.prod.outlook.com ([fe80::3dd8:226a:7213:18cb%13]) with mapi id 15.01.1341.020; Mon, 14 Aug 2017 04:04:50 +0000 From: Damien Le Moal <Damien.LeMoal@wdc.com> To: "hch@lst.de" <hch@lst.de>, "mpatocka@redhat.com" <mpatocka@redhat.com> CC: "tom.ty89@gmail.com" <tom.ty89@gmail.com>, "dm-devel@redhat.com" <dm-devel@redhat.com>, "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>, "gmazyland@gmail.com" <gmazyland@gmail.com>, "axboe@fb.com" <axboe@fb.com>, "axboe@kernel.dk" <axboe@kernel.dk> Subject: Re: [dm-devel] [BUG] BLKZEROOUT on dm-crypt container cause OOM / kernel panic Thread-Topic: [dm-devel] [BUG] BLKZEROOUT on dm-crypt container cause OOM / kernel panic Thread-Index: AQHTEDBP3CRESqcvckKeqLY7/ahWiaJ8CTWAgAclxACAABWYgA== Date: Mon, 14 Aug 2017 04:04:50 +0000 Message-ID: <1502683489.903.1.camel@wdc.com> References: <CAGnHSEngW1Ugf66V5henR9fMEev0xcJnKVY9MjJb19gy3CkgNA@mail.gmail.com> <20170809133833.GA25681@lst.de> <alpine.LRH.2.02.1708132245190.18210@file01.intranet.prod.int.rdu2.redhat.com> In-Reply-To: <alpine.LRH.2.02.1708132245190.18210@file01.intranet.prod.int.rdu2.redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@wdc.com; x-originating-ip: [199.255.44.174] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BL2PR04MB1970; 20:3FzEoXhAyqjqc37Cob1YFuTJa0X5TT4xkszP6vIJSJuKV7LIbuOAc1+0NHClXa5FGsn/ahYcNpT8FePuAhaK7CqGk3uQM620nys8OWZolkP6Ra81YRNVFPg/1Lnda6p/sogpNDlUlSGrdLJlMJ57BqYZkRRSPtiTui+f3vRnP44= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 2a30755c-323d-4825-0a87-08d4e2c99c5b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BL2PR04MB1970; x-ms-traffictypediagnostic: BL2PR04MB1970: wdcipoutbound: EOP-TRUE x-exchange-antispam-report-test: UriScan:(218171748494069); x-microsoft-antispam-prvs: <BL2PR04MB19709973AC2D74762AD265F0E78C0@BL2PR04MB1970.namprd04.prod.outlook.com> x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BL2PR04MB1970; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BL2PR04MB1970; x-forefront-prvs: 039975700A x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(199003)(377424004)(189002)(24454002)(51444003)(102836003)(3846002)(6116002)(25786009)(3280700002)(33646002)(3660700001)(50986999)(68736007)(76176999)(54356999)(103116003)(66066001)(101416001)(105586002)(97736004)(2501003)(966005)(53546010)(5250100002)(189998001)(36756003)(5660300001)(2900100001)(106356001)(229853002)(39060400002)(4326008)(72206003)(81166006)(86362001)(575784001)(6246003)(6306002)(6436002)(53936002)(99286003)(54906002)(6512007)(2950100002)(305945005)(2906002)(14454004)(6486002)(81156014)(8676002)(6506006)(7736002)(8936002)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR04MB1970; H:BL2PR04MB1969.namprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: wdc.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <FBB69C1C86992F4CA24266EEE229E19D@namprd04.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Aug 2017 04:04:50.3723 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR04MB1970 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/block/blk-lib.c b/block/blk-lib.c index 3fe0aec90597..ccf22dba21f0 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -269,9 +269,9 @@ static int __blkdev_issue_write_zeroes(struct block_device *bdev, */ static unsigned int __blkdev_sectors_to_bio_pages(sector_t nr_sects) { - sector_t bytes = (nr_sects << 9) + PAGE_SIZE - 1; + u64 bytes = ((u64)nr_sects << 9) + PAGE_SIZE - 1; - return min(bytes >> PAGE_SHIFT, (sector_t)BIO_MAX_PAGES); + return min(bytes >> PAGE_SHIFT, (u64)BIO_MAX_PAGES); }