Message ID | YnOnHoGasHiIzXYQ@kili (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4AB6C433EF for <linux-mm@archiver.kernel.org>; Thu, 5 May 2022 10:30:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1CD1A6B0071; Thu, 5 May 2022 06:30:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 17BF06B0073; Thu, 5 May 2022 06:30:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F123A6B0074; Thu, 5 May 2022 06:30:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E1C726B0071 for <linux-mm@kvack.org>; Thu, 5 May 2022 06:30:13 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B54452D83A for <linux-mm@kvack.org>; Thu, 5 May 2022 10:30:13 +0000 (UTC) X-FDA: 79431319506.24.3C642A2 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 612C61800A0 for <linux-mm@kvack.org>; Thu, 5 May 2022 10:30:06 +0000 (UTC) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2459em97018676; Thu, 5 May 2022 10:30:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2021-07-09; bh=AT+5rWoCTsKn+6I1Fn3L9qP8FeNMZ2+PftQYYPg+elo=; b=ZJc14e+ufX18lVBl2A9SAt3FExQKjtImTPorXViVVCMGfJszD4SfI9znVzXovHgh9My3 EHmuTjWMkqpbONpxcKfjQXzBRK2ZO/79UFHi69YgI/WtMdLOLtu6cVna9aQuepbu1tfh aGpWoY/lX0hGE4PGZeNFGL1JlAB2sh2B+FPRUM/rNgqtQ3lvY3IK0LjdcvUC6hx83+7z xUHj3jgvKQNA1Jrzy7iekD6SO4Jzh3VrvyHxyP6rTX3z0jYNxUqpWN85MamNLPrSAE5f H34tHMnXUfVItZCqfoVOkjf8565Lzgl4v74qbZXTdtnfW4SiFgLNJHSjHzcHvEx4LLzq bw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3frwntb0rd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 May 2022 10:30:04 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 245APcSX033930; Thu, 5 May 2022 10:30:03 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fusaghmbk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 May 2022 10:30:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q+95l+ibUChLKrb2BOec3QCjTT1YW3cbDMPWEj8C/DP40BgYFcL7zBYTtYn64N+s3YIEuTiT/loGLr49xbIAZ/4h5/gv6r1nSZHbE7Cw/NsIhhEWe40AVj41qEoIp0j8MiL8mtNx5+Biwydkuq5hdD7Wb0MfSE9xHKOPnWduDwl1a4F1BlGj2YImqmqW88gcK2K9W62BfwGraeWIfK2vkaSZ5M54O3j0zffVfehqEuW7l/NtpzDc4cV6+5z0IkT0D/UttZSm1gJ+F3l9RtOily6iHvAjBBRBpxFkIK9m1GQPB5tIkfu6M/Pd59t3ElqXIjFzpuv8zZGguFupn3cOtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AT+5rWoCTsKn+6I1Fn3L9qP8FeNMZ2+PftQYYPg+elo=; b=kN6bUdx6QPpRnS+KD3pmWqThR/4IUac1EjZi7UCHOnM1tc1AuexeUUJzBhm5/2TmdkkO0xVEZ2iAFHM0RLIbQYuat6wBRJu/fQdjUcNg92lng1LshFS6ihMG0Azgsdye/JJX6N6pHMPZz/SzgYxdPWl9gF6cAYpxFyAuzNcB8kLwOjFUKVV8AXuJNJmdE/mAdr4WCERkMI676d3jG+pI4zIsA8TVmjOvYiXPSZHwpDn5N/55bpLqe4CbSGJn9GO70BFpqJUlE70K5GC9JO0I4d6HPKzsq4d2N4Kz8HwYWB5q37TK/aieCNKuG59ccq+oF6ZfYiXOLQsCRB5rbYHZjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AT+5rWoCTsKn+6I1Fn3L9qP8FeNMZ2+PftQYYPg+elo=; b=n+Hnz4EcUF3OzpdBtkZi3uhe0VpQEtR8vdk4PpgTC1Nz9hKtkd3AWq+AhwYMfYrN4UKCpjoqlIKdcCi8BXTFSy+N/0LwYY8J3jHQy6wsz9TvJF7blu5CziXHwvsFmfSPIN0M/filnh6JQrFye//jufoFtSucBFSZgrhtzaaeB88= Received: from CY4PR1001MB2358.namprd10.prod.outlook.com (2603:10b6:910:4a::32) by DM5PR10MB1836.namprd10.prod.outlook.com (2603:10b6:3:10c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.13; Thu, 5 May 2022 10:30:01 +0000 Received: from CY4PR1001MB2358.namprd10.prod.outlook.com ([fe80::e929:b74c:f47c:4b6e]) by CY4PR1001MB2358.namprd10.prod.outlook.com ([fe80::e929:b74c:f47c:4b6e%4]) with mapi id 15.20.5206.024; Thu, 5 May 2022 10:30:01 +0000 Date: Thu, 5 May 2022 13:29:50 +0300 From: Dan Carpenter <dan.carpenter@oracle.com> To: Hugh Dickins <hughd@google.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, kernel-janitors@vger.kernel.org Subject: [PATCH] mm/shmem: Fix uninitialized variable bug Message-ID: <YnOnHoGasHiIzXYQ@kili> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-ClientProxiedBy: ZR0P278CA0020.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::7) To CY4PR1001MB2358.namprd10.prod.outlook.com (2603:10b6:910:4a::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 42e5caec-5bce-4528-f47c-08da2e8235ec X-MS-TrafficTypeDiagnostic: DM5PR10MB1836:EE_ X-Microsoft-Antispam-PRVS: <DM5PR10MB18362BC9FF52CBCEDEFCDD818EC29@DM5PR10MB1836.namprd10.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ztTuJW3jNz1R1rOU1amrNEgW/L/0guyLXLrpdbJVi039B4AeBiXuE9paFEffAU9yk/g1cq2N82sVN7UmER7m7bwk1BGllD81OeZW5SugngcNPpEZbHlSVf7fvj+1CuL8/LEdLbJYM5iFY7syc4ba/Sa/q+SNDjbwgQK1R5kq6n1Zrmdl3SaSdpL2HuIMGS2yMLdT0U4EWEtXydfSy7u8CGwkJCg0bVUIkh1N3dazZmwqnqjRJ63kciD5T1pXhyO/o13ryFZeU0fwuJFbAd2rqIdPWmrc/4kzM6vCFmdrNugBPFguuna8DaY4QFivhBojRZxeLcTDr97mC7sufFl3YMcrTsnLZdhvfZ8FWb/xtNg23Bn/LHI2o8HV9ERHKQWJ4LpD9TMX3TcyCadj7RsXYoz7cWMhe74YPlFPoD2VtrFlWSef+e5MGQ+PZmWDt5cF08iJ+kdcOxVdtrVK/Og5EbF1Okzy92+WtjH/Rupszqpo2qXDGLaxtPOZtHNRW09QUfl6Dj4IvCAvKbpbvW5Ijd6F8EoRlYDrll2i/aVCRGJ56VZ+KKe3tNMS7P1NTvZoKGJHwmMlO5JhMHXELmphrlrOV8dX6rhdaTNKQNQoBVyQ7VJS6e0IdFtAwB1CVX/5d6e38kr+JEWMf5ML58Deny7LTxPQHqgcnwZU7DhvY6YRDfeBTpGLNIwaEUjcLt6FS3KwariDnYNKjBcLhEmewA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR1001MB2358.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(7916004)(366004)(186003)(110136005)(9686003)(6512007)(86362001)(508600001)(6486002)(26005)(6506007)(316002)(33716001)(6666004)(52116002)(38100700002)(38350700002)(83380400001)(66556008)(66946007)(4326008)(66476007)(8676002)(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ENT6YFkmaccvxqYqiQnyyZj6dmLcwzgMCCaNvZ0uWbIfCnZomCANJoTbMBeCf1pnxhwipMSlzYVgdugp7MPanDg6KDHIl+VezuC3k6x4pIyS8Ugr2BSz9PqmcmbQ9bN8Ojhhma0LmmD5IA3b68qIBgock6uKvbtRJ5GcmBrOegEN2BooAZPJHzoeqhCAieDjP4NUCLCPe9d5h6wkEe6vE+WvsFf/HCVqOzu+tk9nRmxCgn7RMymGSo9jOuToL5oJxPeesyC7h99Qkatz8FhsnSFrn6LBQoCgeYCQy6gQQJDNUNq9jluzbUtXQ1ahZnOhtsFcZcNNiC4da0KjZcMAyVsoWd/Jz6+wTFs3xHruLLOY6SnRF7rMbmfwNyu0EYAFBDtFvEn5KUaZ4mKMCsnbbf/h3Bt9X7Saurg99lRTIEUYGr1jNixqhXdeZkU9BRXAp2Bpp6phHtIl+cKrqKT1P7grEsXkKmaKTaA94Qcv12c1mUyNUenKqN3c5GchhSNS4AufEajec1wZgl2RSq0kcKh0N37pNLDW7FyIAkQ24hCu8NjjDesx+2lDsegiYra24lKz0o0KfNg9wpKabAjNhtbVBbpZJimdf99IfYmML4jldNuUgDYSL0o38z95sTNTWyefCqkSVhD7fgjGYqX6VashfLm/SCjSDjR9umlYtAew96CuTcWsd7Y6avdww2hwyziXvUHPtW0PSrsiuC4fw2wSGCvM5+yLcuZagTsLnR9IfgVB8s7CsY3pdvizOhXz1F2S4hJcBLvrD1tDPK0WVF2l19nO9kjfg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42e5caec-5bce-4528-f47c-08da2e8235ec X-MS-Exchange-CrossTenant-AuthSource: CY4PR1001MB2358.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2022 10:30:01.3100 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hwTbt8k3LUALmv5tfpuflKtkEKXgPbD4TzVpvXEG82x/zZSN7qvRZIKK28K3oQhIajcf9XLNRT2gBV4TcPnKiICv/vsnIvOj2RHFI02AuCg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR10MB1836 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.858 definitions=2022-05-05_04:2022-05-05,2022-05-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205050074 X-Proofpoint-ORIG-GUID: -ZCHu8qtVZetapWny9xGKh7G6bghghZW X-Proofpoint-GUID: -ZCHu8qtVZetapWny9xGKh7G6bghghZW X-Stat-Signature: cg3rdndhw9jsn5rdfh64jmrqbktp4cxz X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 612C61800A0 X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=ZJc14e+u; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=n+Hnz4Ec; dmarc=pass (policy=none) header.from=oracle.com; spf=none (imf16.hostedemail.com: domain of dan.carpenter@oracle.com has no SPF policy when checking 205.220.165.32) smtp.mailfrom=dan.carpenter@oracle.com X-HE-Tag: 1651746606-983134 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: <linux-mm.kvack.org> |
Series |
mm/shmem: Fix uninitialized variable bug
|
expand
|
diff --git a/mm/shmem.c b/mm/shmem.c index 107f1e4dd0aa..97f9ea59a7d1 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1681,8 +1681,8 @@ static int shmem_swapin_folio(struct inode *inode, pgoff_t index, struct address_space *mapping = inode->i_mapping; struct shmem_inode_info *info = SHMEM_I(inode); struct mm_struct *charge_mm = vma ? vma->vm_mm : NULL; + struct folio *folio = NULL; struct page *page; - struct folio *folio; swp_entry_t swap; int error;
The "folio" pointer is not initialized on some of the early error paths. Fixes: 2b58b3f33ba2 ("mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- This goes through Andrew's tree and will presumably be folded in with the original patch. mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)