Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752996AbdFUQdv (ORCPT ); Wed, 21 Jun 2017 12:33:51 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:47939 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988AbdFUQdq (ORCPT ); Wed, 21 Jun 2017 12:33:46 -0400 Authentication-Results: canb.auug.org.au; dkim=none (message not signed) header.d=none;canb.auug.org.au; dmarc=none action=none header.from=fb.com; Date: Wed, 21 Jun 2017 11:51:09 -0400 From: Dennis Zhou To: Stephen Rothwell , Tejun Heo CC: Christoph Lameter , Ingo Molnar , Linux-Next Mailing List , "Linux Kernel Mailing List" Subject: [PATCH 1/1] percpu: resolve err may not be initialized in pcpu_alloc Message-ID: <20170621155108.GA89068@dennisz-mbp.dhcp.thefacebook.com> References: <20170621152020.47cacaf6@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170621152020.47cacaf6@canb.auug.org.au> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [2620:10d:c091:200::3:3657] X-ClientProxiedBy: BN6PR22CA0042.namprd22.prod.outlook.com (10.173.23.28) To CY1PR15MB0506.namprd15.prod.outlook.com (10.163.235.151) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 42760db6-9036-49d0-1d99-08d4b8bd5b79 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:CY1PR15MB0506; X-Microsoft-Exchange-Diagnostics: 1;CY1PR15MB0506;3:gUrvPrvr8NCYwhEK5KA/s60mYMhii/3EHb6m7DNaTK3WlT2AlgtAkimRtcylr5rZ848+HI4UK4Hk2zlkLZK9WAPqC06e3FKInjd/c3d+CI7uGG1GSSvgbCw8Pj6wi05PPHEBe6vV2+3aK7MGZHIm01HRXp4KsXS9rFMmyTelF7I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/R+pEp2jzKukx4KlPxNoli5CuesWCsTanlv5aNUlDkKS3EcWe1qEgtKptcAOgIKlkLAtVZkcS+rBHadQilQiQYw/KMGwaVkFfhC6dirtSpnO4qDH9ldCaPhxQ+lVaJyuITpIsaTf1UYdfWDtu2s4OeA/3bNZyjKzoChjAwF/ly2OZPsCsoMX25s95S8Ke/qh3XM0MqWPbuVtmjVbTluFJZ7nni2ApHnwpkp7FgkqBXp880/VbwNIPr858nDpSluZK32HGWaLG6RB/wf8mvJBB4T+Z7ALJTqJnoJSw7iHsoz2FOtICeM7jHMietbppQnUFQfkOMWftEKi6YkpiAoX56KyoKrNokByi7AQCOgDY2N4tT3JjrKcQoORRCZ569t8mjsyNGLGG14rFUbENzJS9xlud4rbkuoKF/HrrPW1/Fj0PReJpFpajLdkeglawA69Jvm3uEGURD/VEfmvGZO5QSj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR15MB0506;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR15MB0506; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR15MB0506;4:9d39wW1F775JHsy0oEj7A5vygXn7oj4OXyACjZqdAo?= =?us-ascii?Q?KgKXNKABBeKUuZBwwxldyMQ4XobteMhQ/Ub8Wmu9P9Ul2pwELGs/8gsL8ibT?= =?us-ascii?Q?VQGjwfGLjJhh1fOMWh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/7+ZGvf1np20MjfRQ9O9g/EJ6yAFixWSQk5zkB8SkqO/FCe5GTat7DktH/p5?= =?us-ascii?Q?hmlwmEnlABlhS1o7UPykflHzlfNawvauVhCmL2+wtTqwvTqkvDagvKhUmFZY?= =?us-ascii?Q?QATCkA0byD1Tqdj0hKeyAs8fJQvtnjGLZivWtNbbTc1+l2IxMaGBggMi7ftR?= =?us-ascii?Q?gksYhiITEP4Zs=3D?= X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39400400002)(39410400002)(39850400002)(39840400002)(39450400003)(23726003)(1076002)(305945005)(6506006)(4326008)(6116002)(86362001)(83506001)(478600001)(2906002)(47776003)(33656002)(8676002)(81166006)(9686003)(50466002)(50986999)(76176999)(54356999)(6666003)(2950100002)(189998001)(55016002)(25786009)(54906002)(38730400002)(53936002)(4001350100001)(42186005)(5660300001)(7736002)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR15MB0506;H:dennisz-mbp.dhcp.thefacebook.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR15MB0506;23:8wZGYeUKxXMQSy8/0TfxZfqkRakCa/d4+rNNjsWM4?= =?us-ascii?Q?2VLwC7wtNTKmImQFbean8R2rDc+aHw/YqoHNF5bqw0pygBFao8PU6XOOLp5j?= =?us-ascii?Q?LLaf6wJK1bj3LS8Yql6hogY7X0+KchJyzKlF8NziBm1VA0eOiEB5knkvKnc+?= =?us-ascii?Q?S3Ox5RAcxHg4eKpExkyVTEmyYW8XcasEfSW+rylu/0EnMjfZSSD7Lexi5XSu?= =?us-ascii?Q?eO9v6MIT/2eruo6xVAeBdWDNuKrpIq1d8MTK7cnxCipzX2Yee1OhPstXedme?= =?us-ascii?Q?pcwbsF1RuOH+7F1R+L3N+/czXmJUVbiX9vNgH6aAGQw7tv9ytPzSXExjLZ2a?= =?us-ascii?Q?Yp1JTjr+rcY/Vj6GXM4iuHECLuptlhbuxbpK/pZYFQIAuXoZK/t0fwH1XPSo?= =?us-ascii?Q?pj9QBBy+y++tn/5+UJA5uz7ZdzQ+7NOqjgM0MaJBVXLEVQVpr/pCjeNRNMmM?= =?us-ascii?Q?m79lFRm+FwUbfNCg2qcrAxZayF4S2OmLO6kcKdDkQNyR7TIIUoyUT5nNt7oD?= =?us-ascii?Q?8uuJSAD9+TJXFbFMy8ba9vNH2SxP2Kb6lOUNY/H30zScAwi+EvffozlsND3B?= =?us-ascii?Q?hPAfzco3AHdDaupdtj1hoNoFrfL0V2JOLAxLsX9LF52Hn4nibPDm+HAtS87k?= =?us-ascii?Q?Re9BUDAmRnOWGebdoq+VxZj7lb2VA8TVIWQy+xqFMZ4QVnaAZNDyXlLxczDg?= =?us-ascii?Q?5+O2dUWXwQCrACa6IrByEfjLR7ubJZn3NbycVU2w0MREjY6AMOltUk5kmxqx?= =?us-ascii?Q?Fu+O27UkICOb+qrlGp9Ldzqd2lFl8XHnsdtMei6gfmMVcKfI0WgI8tjWI/7R?= =?us-ascii?Q?wORU+YbzT0M52ZHgH+ovAUO3EtT6K99J1jVKW8YOG06N6b+vNlp/0KUP/MYI?= =?us-ascii?Q?6FyKNcsOEXWTE2NQG+oIuDzQe1Ncir6kjo+Rh9bV+UuV7M73eD76FblTd7fz?= =?us-ascii?Q?2G520/V2rD9B1i4lppOdHtaKOO8ym7ouD3lgddYkPpGkX42+iu4qCrqo/3dh?= =?us-ascii?Q?Sau097K9TloZzo5ErkFBtR2?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR15MB0506;6:KxWySAk72lSSSUuo04T5XtUqCmsbHDQw3tUr4/PTcC?= =?us-ascii?Q?w58SElGE2m3vB4s8znCpDb9rhCBS+Spyjn/IrxplEB/fug4VuWl2N56KXr0D?= =?us-ascii?Q?ARS4OuhvrbOfABktj7Asl3kINpsI7lAMnfow1/8zw3IVkLMJQt3lVLlS57Ec?= =?us-ascii?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7WUf0DuFogFP5sS9sDiQjVpYttgM2RLLptTDys2yPhOUqnLyrMHB81M593Hqyvk1/bZVXFNoXQDJQXtWxRaYS+hj6TAUCxGP4eEGgWlf8IPCRtYlyFXR+ziBjCi6NRzHC5C4xc0QZYt3Zg/aJook+FG6HdrRs/pCChIEvZjIWzsxa96Bv/h5cY0tOsPZCAES+G3WotTvKpQ/MbaBVXbWhHW3Gy2xaEL8KoNeJNbVZsufZJ/FRq6g5Kftbm6RdQFd4BCnK0bNvcezeuynOg5UvSaRMhE5YVu1f5eqK0pD1KTc6Jl3bY1vTzMSvXKbYFdkVAiNGdXS+AxzyohSlo56a1A9t0QenAhZ5TI7LlIP2iSX7iCK0MFtTAjEzdwbnZeV/S+CKfT5Yo4MzHEDcw+f1NDdPI05pGER2Aknhff2m+5NUVs2ERZEy7gHM5eF9hMThoXyevggePw= X-Microsoft-Exchange-Diagnostics: 1;CY1PR15MB0506;20:JgvKKo2Dg6QZ1QDqozWCHgbuCAbweKXh9/LNJDXnL4QoaB1f4LWLXAUAC82nJZxb/0bA3hrltqBEjuns590xUuO9xgyGBSr5YB2S4lMIEe2QCjyW61QoCGjDU3e8vAQWqmbbdxlPZyH2pg5LkxRygAM07t1XFXp2YOb0OC5mtjw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 15:51:18.1732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR15MB0506 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-21_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 973 Lines: 31 >From 4a42ecc735cff0015cc73c3d87edede631f4b885 Mon Sep 17 00:00:00 2001 From: Dennis Zhou Date: Wed, 21 Jun 2017 08:07:15 -0700 Add error message to out of space failure for atomic allocations in percpu allocation path to fix -Wmaybe-uninitialized. Signed-off-by: Dennis Zhou Reported-by: Stephen Rothwell --- mm/percpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index a5bc363..bd4130a 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -956,8 +956,10 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved, * tasks to create chunks simultaneously. Serialize and create iff * there's still no empty chunk after grabbing the mutex. */ - if (is_atomic) + if (is_atomic) { + err = "atomic alloc failed, no space left"; goto fail; + } if (list_empty(&pcpu_slot[pcpu_nr_slots - 1])) { chunk = pcpu_create_chunk(); -- 2.9.3