From patchwork Fri Sep 14 13:05:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 10600743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAEA214BD for ; Fri, 14 Sep 2018 13:05:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C50A12AEA6 for ; Fri, 14 Sep 2018 13:05:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8B332B035; Fri, 14 Sep 2018 13:05:07 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08CAD2AEA6 for ; Fri, 14 Sep 2018 13:05:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3E028E0005; Fri, 14 Sep 2018 09:05:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DC6178E0001; Fri, 14 Sep 2018 09:05:05 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C909A8E0005; Fri, 14 Sep 2018 09:05:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by kanga.kvack.org (Postfix) with ESMTP id 671B98E0001 for ; Fri, 14 Sep 2018 09:05:05 -0400 (EDT) Received: by mail-wm1-f71.google.com with SMTP id o25-v6so96923wmh.1 for ; Fri, 14 Sep 2018 06:05:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:mime-version:spamdiagnosticoutput:spamdiagnosticmetadata; bh=dGWIsdMYSRMGAa6McwfrhtqK3K80zd7CYPsxJRYuGVY=; b=b+h8bGD3gXo8DPFGSK4cju+rPaFyS2IPTDIxsHtEw4YdwcPFHyfTMyWHDmqEQYvtXh ePUYc4ck8fcGlNKpdYCMDbMwea6kim4q+vrNkZ+ow+i0Ol3SynqeIw4aAJAouU4EiQ2U 03Cqe98q16edBI4s4jmo4Hd24IEcAqzyE2BC4RwawkcTRG1GQOwrlT87wzkQ2aQKgTV3 Yj7REKQ+ukORsBGoebrtSCfKSLkSMlCJVDCSlktVZohIU3Zba6R1ayCWzuF9FrinmZq1 CrofyFkewCg3nOR4pI7Z0lFWyRXB0A4wzqkQS3A60ajA1by5uBZOMk8WPulhQViwUcSu exoA== X-Gm-Message-State: APzg51CXySlynjaA8C/TnqGZW/echzTBb+78Q1uIWZ4z07D2ZPon6VV/ C0He6fSKJ1YlKxq7E9T+0vcBS6xgbhwRXCi9kuuU12+AjfYIkl6a64+g10MXGaO+yQA9MlOUFRd WsF17JLOel56jGAE17vGxWEoJIySRotugcrCSk7It4RAWdqe0spMang2DVx8IWDLNCw== X-Received: by 2002:a1c:7015:: with SMTP id l21-v6mr2241390wmc.81.1536930304888; Fri, 14 Sep 2018 06:05:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdamF7iQ1gxnt/iCVzJcRIhVuZt2oLXTbJZoYqf+5pQ2fMLBshr9BNvohSg/KyluLyqKVU6G X-Received: by 2002:a1c:7015:: with SMTP id l21-v6mr2241318wmc.81.1536930304106; Fri, 14 Sep 2018 06:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536930304; cv=none; d=google.com; s=arc-20160816; b=P+O0qSKyjkATeZTWKUv2PzBpa3AH3vKnZjsQ7sTOfxHeBPEtDqk0f8+zwPm7F3cH8a FFI4gJZcfHDbDd0rHtVdF5tP5gqgQXdIUFlNYR/YDYy0cT6zRfbVOKHhMEZTdaYQNZZR n0baEC3hQa3J/OLxvQuMrQTa9EwYNhapqFantz/gGBj+IJQomxCHAYWThGCjOHND+/F8 1yHjUZqGEbOL8CtUz1P9dYCP7p1O+QdFTlzOFu44uREL5FFiGrSg52tXMiDrzwxv3WzV QuaNWCd1AXwYPapcGpm+CLq48GIXO7TsQyBKaTNxQtNjDoHFBlgsBefNQ7z9oJnGETnm Oaqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput:mime-version:message-id :date:subject:cc:to:from:dkim-signature; bh=dGWIsdMYSRMGAa6McwfrhtqK3K80zd7CYPsxJRYuGVY=; b=J834SEA5uaI0Jfrb85+4cEB5jYlRRwrfc+AZqyM8micszvcmny+qfu+bYu5fyMAt/p n5I0EJeWj0DzB+R5X+Ikr9pLtwxG1Bd748L7Z6qEFoa9xI4zU3sT8nPaTI15p7G1CMQv h5asso00pAtOoktAMwBuqOzxL+F+4HIZAFuyEy972vmDG7C4P+xX3f3KgUKWEIoaIhwT 6goQSKKATHpkwmvf6DI16gnPtpYskxghOkKHjD2JSndjg0ky9WdtLD0tlVT3OyRbtyVJ bm9htF1IEMgy1VNmSQiALmHBGwbX3TmaA7pDmyHv/ZuuCRRPWMZV0pw1lh2m+kCwh3iP chdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=TFEkchhF; spf=pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.91 as permitted sender) smtp.mailfrom=aryabinin@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50091.outbound.protection.outlook.com. [40.107.5.91]) by mx.google.com with ESMTPS id w12-v6si4695304wrl.27.2018.09.14.06.05.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Sep 2018 06:05:04 -0700 (PDT) Received-SPF: pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.91 as permitted sender) client-ip=40.107.5.91; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=TFEkchhF; spf=pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.91 as permitted sender) smtp.mailfrom=aryabinin@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dGWIsdMYSRMGAa6McwfrhtqK3K80zd7CYPsxJRYuGVY=; b=TFEkchhF6x/0IjbM3mSEh+dHsmbb+LkggoC9+Hs/LmIlbYKc/G6VED0dC6oE9TE3l9p04qnMBZcG9S0aJzzUHvGT/d+IwoZpNLr6jgE9YYqx++QLaHaKzqYn5tbLfD9KQGdujGww3r5FBJ/5NGCdM9EdQy8kVvExwdF/FVQhbKs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from i7.sw.ru (185.231.240.5) by VI1PR08MB3261.eurprd08.prod.outlook.com (2603:10a6:803:3d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.16; Fri, 14 Sep 2018 13:05:02 +0000 From: Andrey Ryabinin To: Andrew Morton Cc: Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Ryabinin Subject: [PATCH 1/3] kvfree(): Fix misleading comment. Date: Fri, 14 Sep 2018 16:05:10 +0300 Message-Id: <20180914130512.10394-1-aryabinin@virtuozzo.com> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1P189CA0010.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::23) To VI1PR08MB3261.eurprd08.prod.outlook.com (2603:10a6:803:3d::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4fecbcbb-020b-4764-56c5-08d61a42aee8 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1PR08MB3261; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;3:0byODzHccb4EAAuQ1SDZ/BCymPA13IjEFyAjqx3jGPP4OdaE3Yo2P2zWMuXYywbe1CCHIbMtqH5yyyGvUu1REHUIYAy4qi+TSiVBqMT32pbrNARVTe55uoKwnKdYRpXdaiJuITjyh8jhosj0nJ1yzIxqg7nnc5XRiJBxBpNz0nKIVldRgnWLrqZoxQR/9FDYps9nTgD7N9RnsKAXmEABOxuPzRCnhllCBxKKhAmUEULEkXMwZ9LSiOyTDVu8++W8;25:NBvljTs6Z2rJj60URvXHuB3Tzc67HLu1kNeCB5pPaVV9DRo6opmwNmfSCRnNJk0kk0AWjaKuhwpSXjGC82JgyJSIZthC4jqyeN40hz+GS2gsk47SEs26FomoQzTUasq+hJEbuzU1JS3oWT+T98WrwVuTjUk04CCncM6tTDtvkl5v/VTidvZXtraLgdVG253MXHFcqlvgko3gfLt2LIv0mCgU2bQxcSzBmHL4CIOVhJLyMatUOzQMfIIzFfOSbiv1Kchm4xxfsaksHh0SmAlZ+oofY2EmBR6SguRpkM5aEpIyyWm2Md2l5S+nQHAIoTOUBfLLwrcxzGCoF3NULP8T/Q==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rSKDUhV0EuzZ6vr4E5mQwuHtA8+vKZAFPg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699050);SRVR:VI1PR08MB3261;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB3261; X-Forefront-PRVS: 07954CC105 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(376002)(136003)(39840400004)(396003)(366004)(199004)(189003)(107886003)(52116002)(51416003)(66066001)(478600001)(14444005)(81156014)(7736002)(305945005)(25786009)(105586002)(50466002)(5660300001)(106356001)(53416004)(6666003)(81166006)(6916009)(2906002)(53936002)(6486002)(8936002)(50226002)(386003)(956004)(1076002)(3846002)(6116002)(16526019)(4326008)(2616005)(476003)(36756003)(48376002)(16586007)(6512007)(6506007)(186003)(486006)(97736004)(86362001)(68736007)(8676002)(316002)(47776003)(54906003)(26005);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB3261;H:i7.sw.ru;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;23:NfUYbdX7j4gCFCVTtRVVoU/xTlLuF7uzaAvVIMXTzJqDUr8ou45mcScSvpOtQ22xqyNQlazcGcgFQl4gGv3pDYH16jRBXbsepOb3ezIDlSsAQEHzdR9H3jTPmKPCNd9ZSYrCDtuVIw/Y4xnWdLbwunDZ7wiQEbMsKNJn9ElJI+DKOlJF945YSN9I/E5qUrkkG7qGJejIfLdgC9LbWHlaCVaaW3/p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+by/icqrxeV7H/3tdMm0Jzzlmv1fo4+re3kev1GZjlwwKLPG5CVShumFIz/2BUXwN+eeTHiQ/CtB6Oqd8KU2vqs1yYXCPR8x/kYlNdj/YXfYLKy+P7IgjgWxb3KQpcDyu6xnmlzqHihN27sfbc+ezDflFHMPRl31jW9ctLAQb/9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;20:sNt8s2XWDxx4f+cf/hlQcmHWGshyTLsKbK8CiAkMVWXH7dOcMVS8JPZSrimox/Gw7km+vnKqRSPhmuX+4wAe20Eil0pOFaKRcioKObJ1ytbQuEbDYUKoiu2twVTkkzzPyIQPHLESKUJdrI+P+bsGqgKRjpMAmpSz2Vw8Us5W0js= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2018 13:05:02.0067 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fecbcbb-020b-4764-56c5-08d61a42aee8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3261 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP vfree() might sleep if called not in interrupt context. So does kvfree() too. Fix misleading kvfree()'s comment about allowed context. Fixes: 04b8e946075d ("mm/util.c: improve kvfree() kerneldoc") Signed-off-by: Andrey Ryabinin --- mm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/util.c b/mm/util.c index eeac38a64290..7f1f165f46af 100644 --- a/mm/util.c +++ b/mm/util.c @@ -442,7 +442,7 @@ EXPORT_SYMBOL(kvmalloc_node); * It is slightly more efficient to use kfree() or vfree() if you are certain * that you know which one to use. * - * Context: Any context except NMI. + * Context: Either preemptible task context or not-NMI interrupt. */ void kvfree(const void *addr) { From patchwork Fri Sep 14 13:05:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 10600745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 120A06CB for ; Fri, 14 Sep 2018 13:05:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F078C2AE30 for ; Fri, 14 Sep 2018 13:05:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E42732AEA6; Fri, 14 Sep 2018 13:05:10 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B800E2AE30 for ; Fri, 14 Sep 2018 13:05:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 340F38E0004; Fri, 14 Sep 2018 09:05:06 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2C9028E0001; Fri, 14 Sep 2018 09:05:06 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D4698E0006; Fri, 14 Sep 2018 09:05:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by kanga.kvack.org (Postfix) with ESMTP id 8D9318E0004 for ; Fri, 14 Sep 2018 09:05:05 -0400 (EDT) Received: by mail-wr1-f71.google.com with SMTP id g36-v6so10036361wrd.9 for ; Fri, 14 Sep 2018 06:05:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references:mime-version:spamdiagnosticoutput :spamdiagnosticmetadata; bh=esdq8XAOwg27qWK39vEEqTDErGne7rDq6+xWhuz0ZKw=; b=lzUP9il+zTYo60az8qpzqyoEIVEUw0e+rejs4B/C4/BAUA+x5rlUDbiRhaCBzKlJzx uvcYipv6oNwNt+OiDivnKRWA4TwY8YzEDgUEjFuBn4jjRCDBHESH7G1QDlqVl5vVTHr9 8TTEI0y7IlmWsh5+02znbzY5Cze23HpWdqwOwS/jNdEXCkJb9Mu8Bb1ewmzGmXoi8WOs vmM9TlIhxNjxRR8hf04Slqa1Dh4EIemcCxxs3pTtMGS7gXcAmgseDayQUQpQIpXzVHq2 oYogGK/4huPjg+PXbY2C+p17i0asv8fy143VcMerbwQnF148ZflELkmsLwTKd+xilmIf xScg== X-Gm-Message-State: APzg51DWA4FwZPMejF9McI8M0Fri5dB3J2QebexQl2205Pk+Kse1u/xc tQrvyjWjajMw0vTTqgSjq0haxLPwg8RzbJ5ripMPCOqdqphjLEIhMiszaziiBOoPx4s9TBwfy7n mvaQ9PNS/yImxBp1OP1Y1IcRXcQiwKQJsjj7k2iY2yIYtxgLvvRn+BfeeOkRlYGUDpw== X-Received: by 2002:a1c:e289:: with SMTP id z131-v6mr2307192wmg.32.1536930305033; Fri, 14 Sep 2018 06:05:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbdII+aoEzzKhjER5w3K+tziEExgTnYfkS5bfyO3swIaeW473dHGkye7c2ypen14j1U0EPX X-Received: by 2002:a1c:e289:: with SMTP id z131-v6mr2307119wmg.32.1536930304212; Fri, 14 Sep 2018 06:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536930304; cv=none; d=google.com; s=arc-20160816; b=FPlrf7XBIsjPQPbnAgJwwkeUArPWjjrnH15Tk2npL3KqKUpKIGSejIoUC8MvWzTv9Z 10+m3XSAHRF5nqwh97OWMFBmmyKpybgsFKcLDesrNNCwp9bbUBkw8PaTCCj9fJGKahhT 5GDssFOb1uVocpACY2kVX24gz/mMp68LJzkmbXB5C3I2vUqZxUjG3f7Ub6eZbfyWR0gJ On/YStBpq3pYIkkpvywpf/yAX0xeYWVYSs3+Z2U0sBL8rZw/JxYMcVQh5UysufsOc9R4 zeOFeUB7pCvSTipjKoewtLOoroNFJcgfzUu4bhC1jBpR+q974APZC41uz+UnB9F1Pz7Y Bktg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=esdq8XAOwg27qWK39vEEqTDErGne7rDq6+xWhuz0ZKw=; b=HkaIDPcX5hXxmq2y3r7c9GOiIOeqMofhj6la2xyTDyWex51htpp5byRVEqEmzTlHbF d2mvvc66VgVjtiaNIAnv5gupIq5iz1mHNVKPPu4WbFC8YPANebeiiXjsqz79ZWeukjpt 89oqvcYmmeN6tMZPON/Vbntgl4C1L48/+m7/ma0U0RnBye1GK8jwztmlu89T3q/QAMw6 SS/YXfZ+V4rtQOjTsFRoi/uUQwoTK3OdtFUguNN/g2S+eZPfmftqPyQaA+n8AFFq3XeE S5EbjyhbAAQMKPpXwz7ZlSg8au63i54q/0ctyUOyZsqX/0NcVUWM9tAFZ3R16Rd7kcID tX+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=bB8APbxk; spf=pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.91 as permitted sender) smtp.mailfrom=aryabinin@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50091.outbound.protection.outlook.com. [40.107.5.91]) by mx.google.com with ESMTPS id w12-v6si4695304wrl.27.2018.09.14.06.05.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Sep 2018 06:05:04 -0700 (PDT) Received-SPF: pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.91 as permitted sender) client-ip=40.107.5.91; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=bB8APbxk; spf=pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.91 as permitted sender) smtp.mailfrom=aryabinin@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=esdq8XAOwg27qWK39vEEqTDErGne7rDq6+xWhuz0ZKw=; b=bB8APbxkX/lm7rvajOJNdUeQiY+0TRDxU/s0iTT+PqwUON25jGq+EbMIKjU6SYJ+z/p6miLgyANVDFSQKfpTP48FCx9TuTYldEbl1vT9uARBHQoLAL1TnerpozMvI5ERF5KU8rX508iqm56UMxN1fC6ADLJrSqW5+S6DHszbhDI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from i7.sw.ru (185.231.240.5) by VI1PR08MB3261.eurprd08.prod.outlook.com (2603:10a6:803:3d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.16; Fri, 14 Sep 2018 13:05:02 +0000 From: Andrey Ryabinin To: Andrew Morton Cc: Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Ryabinin Subject: [PATCH 2/3] mm/vmalloc: Improve vfree() kerneldoc Date: Fri, 14 Sep 2018 16:05:11 +0300 Message-Id: <20180914130512.10394-2-aryabinin@virtuozzo.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180914130512.10394-1-aryabinin@virtuozzo.com> References: <20180914130512.10394-1-aryabinin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1P189CA0010.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::23) To VI1PR08MB3261.eurprd08.prod.outlook.com (2603:10a6:803:3d::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 57b6de67-348e-4a16-6586-08d61a42af58 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1PR08MB3261; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;3:UVSM/G5j3vJfrQZz8Yl6y/GQ2zuQ/wMzdY200wmDRaRO2zmg7xyfW5cEjZ2utyKIEHOZipD+ddbf9LvoMiJ5UbniqT85QHkNP0j8N8NsMmE1fmj8ZTopV0vctRgt817mHSG5W8Nuay1bgrGXZTg6Aub1FKFh2OXKushyNG7zqeyNiyFMpJDr98A0JNrkVTgpCCyvZQE2R/xpyO1+R/MLiv95e/ceMJ/HeBXmM8nOhmG2T652wSCUd6leK0nH6iwZ;25:rFsnlOHYUyXp1M1W9N5iCvKYXgJED1ZasqsLn72l9Gn2vIxeajAAMTuOISFsrABL1tS40noz0p80p0qf60dsja7cwa5ihxTJbcmSu2PF/WTXvxFQ5/baSUxEvFUQwXMdvHhjZYH+0RUze53NYI306czcVMTOmnaQdJrkxtUdnBnI7p7ZtC/5lmMeuUUHAkOIxk7WyvTqsFyIpj4UTm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Aa8mLuBSDICjofLZ108TuWTiYncbhPGITD8QMt5yCh0ijUHUAF/S/EGUVIkZVhjNv0iSIJGfeiNd92q38eD7uDRELQm0LvMa5l09O/dqIDYQSz2JklUulMW/OJJ7tr29yapPgSQIaqHIraAlTtr6F9aSdeDA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699050);SRVR:VI1PR08MB3261;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB3261; X-Forefront-PRVS: 07954CC105 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(376002)(136003)(39840400004)(396003)(366004)(199004)(189003)(107886003)(52116002)(51416003)(66066001)(76176011)(478600001)(81156014)(7736002)(305945005)(25786009)(105586002)(50466002)(5660300001)(106356001)(53416004)(6666003)(81166006)(6916009)(2906002)(53936002)(6486002)(8936002)(50226002)(386003)(956004)(1076002)(3846002)(6116002)(446003)(16526019)(4326008)(2616005)(476003)(11346002)(36756003)(48376002)(16586007)(6512007)(6506007)(186003)(486006)(97736004)(86362001)(68736007)(8676002)(316002)(47776003)(54906003)(26005);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB3261;H:i7.sw.ru;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;23:GfKxsehmrkhD3VE8MBh/KiHap9VYMUQNZlXbJDpIcjXQLJasGt/K3C8rUp8m2cQkJVXiXlTvOFZmu3ZwC4eguevy/mwrs+4CfYdOV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zBlPCATOShtWQ9SVXbZLlgZROAaWhGL+UVve4n4nxPU/9dPGbNlxphKpW6r76e7QeAtqAOR3tPsqprfQoUY=;7:8YfNg0ID3umqD+FJB7K9PhgB/TVE9gz5VqlU2uYLZ3BiEuZTWmgTcNXBjrhyEJa9wDYiZ+t+02e1YIi7leHIasOjJlT/Nty1YOfMi21poWnqHl5eM3mwXhpYzrCHjxR1N2uCJAtMjv5pCoDP5aXX7rQT1WixK9CAlTfe06YUMa6uEY35POtswVtzI/PP+Jfyxkyzdi5cXrZ4GdQ4Y0ItI80jczg+Rk4xlNpjbBkahE9LUl5jGgisqLN6JXSoTU+h SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;20:DYK9fG+Ss+LyCJb4lo27nEOqnyRT/Ulk3OT2dUY3ex+GEAYnGZziONX4h/cY1Ne/OnZPiDtmiUvKVZ+QDXrWMoyAF7jZUFlEaWbfeZcXRteyegJCTrn1rbnQlMOeTfo53HTIsndKpfNo0455NQdmm51pZn0zkAeI4qYCZH2hNT4= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2018 13:05:02.7411 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57b6de67-348e-4a16-6586-08d61a42af58 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3261 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP vfree() might sleep if called not in interrupt context. Explain that in the comment. Signed-off-by: Andrey Ryabinin --- mm/vmalloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a728fc492557..d00d42d6bf79 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1577,6 +1577,8 @@ void vfree_atomic(const void *addr) * have CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG, but making the calling * conventions for vfree() arch-depenedent would be a really bad idea) * + * May sleep if called *not* from interrupt context. + * * NOTE: assumes that the object at @addr has a size >= sizeof(llist_node) */ void vfree(const void *addr) From patchwork Fri Sep 14 13:05:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 10600747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 403B06CB for ; Fri, 14 Sep 2018 13:05:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A6DC2AE30 for ; Fri, 14 Sep 2018 13:05:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EA212AEA6; Fri, 14 Sep 2018 13:05:13 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7D302B06B for ; Fri, 14 Sep 2018 13:05:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F6618E0006; Fri, 14 Sep 2018 09:05:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0A6608E0001; Fri, 14 Sep 2018 09:05:06 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E17B18E0006; Fri, 14 Sep 2018 09:05:06 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by kanga.kvack.org (Postfix) with ESMTP id 7C0758E0001 for ; Fri, 14 Sep 2018 09:05:06 -0400 (EDT) Received: by mail-wr1-f70.google.com with SMTP id d10-v6so9827523wrw.6 for ; Fri, 14 Sep 2018 06:05:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references:mime-version:spamdiagnosticoutput :spamdiagnosticmetadata; bh=HajUu/WgPzQ8CJMDC4scAtOrLQhbGs5JiPspH+eAkNU=; b=DRnQHRMPVDY6jKEhTCSpsRvnXdvWA2MUc1p0nuPkjB60Dt2TTrEdYuXeubZOIrogT8 wcke0AjSc959T7eBtjMP4+cVNYUXkG5VqxlqU0RzaM0Ok+ox5lYdRAdIoUGKG9kr5/vX ICrVtr2ekSsaEdAUJYg/2gKp0A4t7pPVkpZW+ALZ1K+h5suWNetgxdoa3myASLZXWF/v /0Z05cP/PhmaXGZVx39cCstdQ7WEjSbYlS4KtvH4ZTFjPLLV9KUvWxJOo3E4C8UiW7oN wtykaRcKKoKjzKhMkTL5SqhoYJy65UFj4FZ2GredIsW0/Xfbnfp+4lEuBu/ruFbghxpM ZQgw== X-Gm-Message-State: APzg51AWyS06QemaO6HpESKWtN2KdQ2Jif44H9t/gSESp0xnyFB7o5LH IerfARBqZ9Kr6QvdjPN6yaQilWcP5K1/MsMpBFU8mb9DK+yNiLMv29uIe9lkb/PT7in+TKxT4Lf YjhYxtZjqVOgHXpUKSy70Pgn8OAj/FoyIxuQK+p5fYB69BoabE4VbhCECDFqQombiEg== X-Received: by 2002:a1c:c3c6:: with SMTP id t189-v6mr2068415wmf.59.1536930305963; Fri, 14 Sep 2018 06:05:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYiUoyn5PXKokUyQxlWqM5b7do7MXtq+i/JmfRrUTZ4Kj0X8FpTAYJxjLcsIZ2mR8DGv/XY X-Received: by 2002:a1c:c3c6:: with SMTP id t189-v6mr2068327wmf.59.1536930304949; Fri, 14 Sep 2018 06:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536930304; cv=none; d=google.com; s=arc-20160816; b=tQs+5rI0A/MP7RqGaxqVlGgM0ZbLhH06q78v3M1/zrfbImK20GALgfaQnxWSgt/9pR sl1N611k54BSamtVO+wc5BZRxOKsOpHeTtvVrt9/7PaDm1wCdoTHQoO1DSBoB6BgI0F2 5PFY8uMVIf+BMJdY/4/+QUnrZ57PtVfz6b1EU/etkazXGnTt4iDjii0PmCfH0JVPGG6I wWugZTvV8afrB91RSLvuHLXXnSRMZGHg4gjP6smEPdnZQsFzBOvixZezHDV3D+XuyrTL y2Vzsrlx/M9qNUr5pVWAD6C5XY8LaXbooG4dHzCLkz+HvAslV2UFQa+2B6YxTMvyvVNy 1wDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=HajUu/WgPzQ8CJMDC4scAtOrLQhbGs5JiPspH+eAkNU=; b=mwsFwfMQI1V1YnmlHQe6W+bjuZZf1YZE3S/ylt6jrIMm1vncRuklDUm73bFdX6ks/B oQuluGeJF2146fcAWqUJkiigkyy1Hg8BsEJ7oCKIU+xoDYV0NRKo7znezd7h7zoDmtnH yZpeor1uG/9kwyqoqujC32jnXvPwihGpVzhQflKWZxpbGMXXFR26GtKmiXuA0vqOof7R Oi8nuvNo5rMuZ74rNfAy8QCFNH77MpmVJPqADUCGDy3+MpWW1XPXehSccdNifda07XDe V9AX2nsQLibYbYDHzWEZ4lgOMZauEm+W64E+mhL24jqBKQthXTH7JjA/xz7sMc+3G55h /B2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=OEuXT9Oo; spf=pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.100 as permitted sender) smtp.mailfrom=aryabinin@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50100.outbound.protection.outlook.com. [40.107.5.100]) by mx.google.com with ESMTPS id p2-v6si6340165wrj.355.2018.09.14.06.05.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Sep 2018 06:05:04 -0700 (PDT) Received-SPF: pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.100 as permitted sender) client-ip=40.107.5.100; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=OEuXT9Oo; spf=pass (google.com: domain of aryabinin@virtuozzo.com designates 40.107.5.100 as permitted sender) smtp.mailfrom=aryabinin@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HajUu/WgPzQ8CJMDC4scAtOrLQhbGs5JiPspH+eAkNU=; b=OEuXT9OoIeW4HojD95Uk2DrS8qWzCs2zEgCcycC6RPKJcwGHuEgrI34nYeL3iubl3cHSlVwRYyb9NrRy/2tqnZNVVxDOj84VaKFIqZDDzpy13RApXmG7Y7oxEIlW8GJpWRZXDrrKbYRgH0vrrM3nn+gnPNbJI4KfTdhlQc/EFss= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from i7.sw.ru (185.231.240.5) by VI1PR08MB3261.eurprd08.prod.outlook.com (2603:10a6:803:3d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.16; Fri, 14 Sep 2018 13:05:03 +0000 From: Andrey Ryabinin To: Andrew Morton Cc: Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Ryabinin Subject: [PATCH 3/3] vfree, kvfree: Add debug might sleeps. Date: Fri, 14 Sep 2018 16:05:12 +0300 Message-Id: <20180914130512.10394-3-aryabinin@virtuozzo.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180914130512.10394-1-aryabinin@virtuozzo.com> References: <20180914130512.10394-1-aryabinin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1P189CA0010.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::23) To VI1PR08MB3261.eurprd08.prod.outlook.com (2603:10a6:803:3d::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b7557ff-de00-47c1-38f0-08d61a42afcd X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1PR08MB3261; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;3:OxsGGzySfv4xeXO0Z/4eP002NFWzVBJr0wRyterpRMmPg9zzYW/13g3cK2He93tPcMZy2JERoXcjdJyYBe4hkT8SrsOPFAP/n0mb90tkpOTyWuU4zGfOfrgn9PRBuyaYCfUXfcXUGDhpTQX4kVu+HL6kSYC52JgpemGarmGd0oZSuZcKtcLBcknYu4xfEXZ9Hj+7vICB5DhviIohTsVzux30A7ya070CgnFybxFp2nhrScetYHLCHfJZUked3Re+;25:iKlx8BvkMBtwkdOy5a1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CAWqtx7XG/aSRXTHCXee53NWe+hvm6mO9XdsFR1rixfWlhHxnWwCsdrqX3zeAhGLwEuj2K;4:YnMqJjUuPkbNKVe5YrQ5gC6cA6KO74TMYzDQ/7+b9p7kW4whtMQ+bHyxMlSb2RFSSNJSsVUEE2wOP+Ro+sjuxHa7sK0F7rdU7MdCUtYHvKtFomni6PbKN3rn+OtSU+Cucpw0357NqE0Pb2lY+aiY2Rxpu9iXDiKqrs1kWA0SsC2BeCQNW5kbQ5D9N+gM+xMLdIWRFDn/9vHu4oYAH+1txdLG2wst4diPU2Ld5LfJMAQB/pyWNQrds5As4yk/bINQamMBs2wUDa/T421NEuhzfA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699050);SRVR:VI1PR08MB3261;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB3261; X-Forefront-PRVS: 07954CC105 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(376002)(136003)(39840400004)(396003)(366004)(199004)(189003)(107886003)(52116002)(51416003)(66066001)(76176011)(478600001)(81156014)(7736002)(305945005)(25786009)(105586002)(50466002)(5660300001)(106356001)(53416004)(6666003)(81166006)(6916009)(2906002)(53936002)(6486002)(8936002)(50226002)(386003)(956004)(1076002)(3846002)(6116002)(446003)(16526019)(4326008)(2616005)(476003)(11346002)(36756003)(48376002)(16586007)(6512007)(6506007)(186003)(486006)(97736004)(86362001)(68736007)(8676002)(316002)(47776003)(54906003)(26005)(31853002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB3261;H:i7.sw.ru;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;23:Pshxg/9eecm5eBJziJY1oAea2gLSWvFq9v8XbI7uw50xgA5AtzE5XsP/CBHI4uzEQWcmkH9Fjo0mf0ztVOE1060eTpxkdWOt5ZTeVhs5+9Y/IhM6ARxuQ+Zd+4lbuVLOwyh5S1s2tDa6pcS3LdOXi+cpw8OJr+o3j6a+yY6YSXPbiQY48LLKAGN+ZFfRUMDAaD3N3Wp7R3jLnUFqapelfK6KGj38ilYrKE5nbAPttT0JSgd5IAKyJo/oVoENpSLyWaf7A2WgbblptPgvgylRE2LBBGM2Q0Y3dm4Tb1chmjHsIHNB29x3gQBi4M+XMh9NcCkADkQlkjgZPMUkZ1Sd60KxouQt650Ypxu4Lku7r7lG9ok2nyAjH5+PY9pMS3n2q477WFWM+pljNLhYOZZXnY/46+Zv2smC4eIx/eEjR4mO1QmuvV6uOtDlCkLINDochUcvIcMSs5vLQLDCjlafbM68HEMkQMOLhrJnf9OMQvdeo/juUvm5CF4pU/7kiMB3YXgd/S9e2/EW5s42YFH5hSwvK9gzcQ0qFaVlGpTwfeWmbOFb9xxJquKT3cwJGzA1JaNg7fj4g2l2CEsp/JFF8wEvlDOmGmcFzWEYfUF2x9bB3V5AlP6oMBXr5Wh+rx4IW0EupsCDGObPQF8suTotOUBpSxCJWfDLfOEH+ybf/E4Q1phrHYqB38yzVGS+wJbLgn+v7ygGYgVcRI1i/sUYReAg5p0Ra9qc9p+vP51CnXQZDYv8YqwkDvuoPJxI0cB0z2DSAruhXJdeMcY85LPTFb2DV0/bFAjRYnEs74IqJV4knsbdv+UYDA4IamBFT88/adgtcxqzn6Sk/niubI3e1pDIYcaz3/+a5NkO6vLqdJZuXNCjSvc4UspNwyG3DhJ6fY45KhwN5X1pc7X6j6HxyTX1NRnZDWCm9Cmf6SQ0HAggqYWo+hnZB9w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/mUIxHsMgN8IEDJ+sHKsdexSiylTz1HLIVN+FA/oZgxngHGrA4+kbQ5TDCA1rWaSf+F3YYstqUBgG8EbgQcGLeWCSJoe7Uxf9aT11yxdmBUKgfPwXTYVpPARIJAhPThoT4KhlcbwMg==;5:mke2Hh2lseCS6M9qjUjcv3+bqtB84aL/2BMi0qThFiy4IlfIVhLFaov+0uLxJhu56ENQX5K0PqNq3HZ7hjKwL/B/f/qrsCz4JjcQ2jT9ljLs3SkXYzy1zymgQ4AG0ZzJBMVwuGoRVbOm66+/tEh+KHLXvx6McXe1NCT2UdEs27g=;7:FZrfjyr7bouRWjYYu43/CA3sMOQ4459GUzLBFxFUr9N7hqw13krNObiGtRtC5L9pBNagSgM1jiaw+oUuRu/+xSOmO2qMYOjMvtDukExfV2kHBUsQOfioFz/fsu8AbiGF2eUL5NaDHQFVIJ8+lbF3ZXHZ5UvHFfjRtnHXslZexbTPVqI2W/31dM9CtIaIvshysZPAAvN5bBoj26uW1vcH8MngePpfisFmUGgaAGjHk6+vPRpw1r5na11P2aLNiegP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3261;20:Q4Fsnuvgfziw1Hgz8kMh5rXFuH+TjVqo4P8LWtrIotwbipczW2wPXfY275RxgQXYAUn+vAAhbStzf2T9pzyZkTt4/MIEDKj03/21X8Y0wWoVoR9TBzlbAT0xZQdnZtX72uSHhtPKpksf+7tC5Lw1sAvWpMfvlWJVFiW6osuVsFg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2018 13:05:03.5067 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b7557ff-de00-47c1-38f0-08d61a42afcd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3261 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Add might_sleep() calls to vfree(), kvfree() to catch potential sleep-in-atomic bugs earlier. Signed-off-by: Andrey Ryabinin Signed-off-by: Andrey Ryabinin Tested-by: kernel test robot Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> --- mm/util.c | 2 ++ mm/vmalloc.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mm/util.c b/mm/util.c index 7f1f165f46af..929ed1795bc1 100644 --- a/mm/util.c +++ b/mm/util.c @@ -446,6 +446,8 @@ EXPORT_SYMBOL(kvmalloc_node); */ void kvfree(const void *addr) { + might_sleep_if(!in_interrupt()); + if (is_vmalloc_addr(addr)) vfree(addr); else diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d00d42d6bf79..97d4b25d0373 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1587,6 +1587,8 @@ void vfree(const void *addr) kmemleak_free(addr); + might_sleep_if(!in_interrupt()); + if (!addr) return; if (unlikely(in_interrupt()))