From patchwork Wed Sep 30 11:26:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Farman X-Patchwork-Id: 11808853 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 470576CA for ; Wed, 30 Sep 2020 11:26:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D55772076B for ; Wed, 30 Sep 2020 11:26:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Guw/OC5I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D55772076B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B881A6B005D; Wed, 30 Sep 2020 07:26:24 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B61706B0068; Wed, 30 Sep 2020 07:26:24 -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 A76776B006C; Wed, 30 Sep 2020 07:26:24 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 93C096B005D for ; Wed, 30 Sep 2020 07:26:24 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4FB5F5010 for ; Wed, 30 Sep 2020 11:26:24 +0000 (UTC) X-FDA: 77319499488.02.owner52_450bcab27192 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 25A311015C703 for ; Wed, 30 Sep 2020 11:26:24 +0000 (UTC) X-Spam-Summary: 1,0,0,cd16feb19c88ee3d,d41d8cd98f00b204,farman@linux.ibm.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1345:1359:1437:1535:1540:1711:1730:1747:1777:1792:2393:2559:2562:2693:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3871:3874:4321:5007:6261:6653:7903:10004:11026:11473:11658:11914:12296:12297:12517:12519:12555:12679:12895:13069:13161:13229:13311:13357:14096:14130:14181:14384:14394:14721:21080:21451:21627:21990:30054:30069,0,RBL:148.163.156.1:@linux.ibm.com:.lbl8.mailshell.net-62.2.0.100 64.100.201.201;04y8aismtw4dqe3m345ytw6exda5noc81k9kctw6ro1ctjxtbadk1brmr8diqng.g6gkab3r18qggz81bubpn8nqux4ygutxzdutoq6jywk7gn48ktonzr1nie7weyh.k-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: owner52_450bcab27192 X-Filterd-Recvd-Size: 5125 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Wed, 30 Sep 2020 11:26:23 +0000 (UTC) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08UBE1Oc058574; Wed, 30 Sep 2020 07:26:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=Pe0BJPJJpv7o17gF8+cWhB4OIjDBroeHo8i+7IDUEv4=; b=Guw/OC5IIuj25VRR28NhDnZBJGybBclW+6pgVsNOZleA89FA3zmBVaacMqDsqyUAGh3T gIbIDSvMNBrNFEUTjRrZU46H8JhWzvtw5VIyqeur9BQ8uYKUeLSgfCkqcglrdavdrDzt B9QoXsSVgv5RH0jNecyo71kNCeURfqai0ewC4ATFKnUgWhTxHFVxNHWg62Fi1vcsO2rZ WjxHdKYIaYRxp5tfTb9fl8BvhZs2xiB98uNT03oYgVWl5hWKHVNr+U0kPqfejXRQPF26 mt4LGBumZbdFndfmSih/LX4or1+E6b1BnPzLa4w3nZEEHh8PZ6uKegNRl5efXsrhNOy1 Tw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 33vry3gadm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Sep 2020 07:26:20 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 08UBEFTQ058978; Wed, 30 Sep 2020 07:26:19 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 33vry3gacv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Sep 2020 07:26:19 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08UBIOUX011397; Wed, 30 Sep 2020 11:26:17 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma02fra.de.ibm.com with ESMTP id 33sw9829ms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Sep 2020 11:26:17 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08UBQFvt28311866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Sep 2020 11:26:15 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0CE5FA4057; Wed, 30 Sep 2020 11:26:15 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E801CA4051; Wed, 30 Sep 2020 11:26:14 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 30 Sep 2020 11:26:14 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 4958) id 68D0EE2056; Wed, 30 Sep 2020 13:26:14 +0200 (CEST) From: Eric Farman To: Vlastimil Babka Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Kees Cook , linux-mm@kvack.org, Eric Farman Subject: [PATCH 1/1] mm, slub: Restore initial kmem_cache flags Date: Wed, 30 Sep 2020 13:26:12 +0200 Message-Id: <20200930112612.76109-2-farman@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200930112612.76109-1-farman@linux.ibm.com> References: <20200930112612.76109-1-farman@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-30_06:2020-09-30,2020-09-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 adultscore=0 phishscore=0 suspectscore=0 impostorscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009300089 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: The routine that applies debug flags to the kmem_cache slabs inadvertantly prevents non-debug flags from being applied to those same objects. That is, if slub_debug=, is specified, non-debugged slabs will end up having flags of zero, and the slabs will be unusable. Fix this by returning the input flags for non-matching slabs as was done previously. Fixes: e17f1dfba37b ("mm, slub: extend slub_debug syntax for multiple blocks") Signed-off-by: Eric Farman Acked-by: Vlastimil Babka --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index d4177aecedf6..3d7c95fd6a08 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1450,7 +1450,7 @@ slab_flags_t kmem_cache_flags(unsigned int object_size, } } - return slub_debug; + return flags; } #else /* !CONFIG_SLUB_DEBUG */ static inline void setup_object_debug(struct kmem_cache *s,