Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1693922iob; Sat, 14 May 2022 17:35:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm8dhzjVtl0987Ut368uafO/DFVCpKd+uwO7w+WkEHthQUQatmvjnYcq6D8xXbdxcxQRlb X-Received: by 2002:a5d:5441:0:b0:20a:cdc0:6e90 with SMTP id w1-20020a5d5441000000b0020acdc06e90mr9196428wrv.566.1652574909197; Sat, 14 May 2022 17:35:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1652574909; cv=pass; d=google.com; s=arc-20160816; b=ZddNNX94NJ3w4lWgjMpMygKtXfdogHZzqJen0m3qkq9uruuViZzN1omGh0uc7gl4/0 NmkEFE3iqV40e+0pUIiUuBtfDlgBolXgjAYrQ4Ckm5StSXlo3WE90dtJEEW5jqtQUDr1 xKDAuF8aau9hIrdmVLlz1kIAZ5jEoy6O3aQegxulPZNb7hs4CSH86WggUa14ib6jKkkl H2RW7/sivitTOcICW3oV2r11V1J04wYVITJxHC5MbBxl5BRGQW4qIq9QKaiurmlvWyBJ DJtEpzklfwf7zQ0RdvELyFzhnEgYL3ycxI9XsEQaDmA9vHkVDdejW32nR3oDeodds/J+ AC1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=Ov1bHXiCb8Wip9l7Zdf67mGy3mt7u1fpoYF7jhaSO5c=; b=glxDgQZsqWmUcA/0TArocJLTfXGgkI6CCslTT5K2fFeRrav/1d/iWzI/8NiZMq87Du POYOZ1Y1rWmjTaGHHWFi3EHfOV6esKVVCb0F2cYko//qYCBXCbg84fEvp8h8G3BI1JF/ Ow/ifz3AeEtsse0R6/i4gcEhyBDRi3MnHuoYJjxiwjbvx007RNrQNP4HWaT78IgwwZ2n k2Ll1GX6ctZfK1xz0Z1xEeZZ81RGjZFpmUOdlSnV3reE4yyJzJmFPD+6umhj9hhx2swf oeRVdvVhESFL86gQkcJzyRZU/FVs6rKQnK43cQQuRTbnjWxmrC3o2RCBIyRu/37fvVhv wW2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=yEAdasmi; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KE8YrLJj; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a5d5888000000b002060de0b7edsi5523870wrf.846.2022.05.14.17.34.15; Sat, 14 May 2022 17:35:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=yEAdasmi; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KE8YrLJj; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234197AbiENQaW (ORCPT + 99 others); Sat, 14 May 2022 12:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231238AbiENQaU (ORCPT ); Sat, 14 May 2022 12:30:20 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA2F42CE2C; Sat, 14 May 2022 09:30:18 -0700 (PDT) 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 24EFXSRm012287; Sat, 14 May 2022 16:30:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=Ov1bHXiCb8Wip9l7Zdf67mGy3mt7u1fpoYF7jhaSO5c=; b=yEAdasmi/d2c+1JPHg8VPazO1ht8E2du5SGkLEi3kHMJDKPlMHDE6KdYMloyc4jUFFEX WMnPnfkEI0FuiWF6dyh3UOjSlnnLMnQj7fE2oNIv5RFD/crTCN558a1ouZAPz7VnFOJn pYW9Q8G1cYxPUejNuQhepBwcGgnA53EbAPu4BaVlbL6b4UhFVfWOBZEP/tX8D0KzOv1W caKuC60Kfo79T9Y31bxt86VPW7CGldcRp2msIiDwZ0FqZzL+Xc3/bTJUhK4Mqj+u2UZ0 ud8FYzcoUqSol5APOC7jFCYuL2a37sM+N+THbkwxkIrmDWx0hxJ0DbiMMmvJnEOY8Wtv cQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3g24ytgjq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 14 May 2022 16:30:11 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 24EGM64x026630; Sat, 14 May 2022 16:30:10 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3g22v0d4kt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 14 May 2022 16:30:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H6gKgmABrYzOnzqO99oA+VqQzMHdp0w/67+XrzLlyJpD2F9Hr81HjMdV0Q/+zJxxr8f24h3JM2Ng1dZjVTXWcJIIEoQ99Uezz2+0W0TRzAjugKJ97QmLYodgf3GrEo4ad60+n6JP5DxWVaw5qxkW5rK0yFvZj2XyIHyCnRIqutE51PtTmzRBebEuuN1ZEOG3bCEuVvCdqFsSvvuw+zztxIXkvOLMv7GeLTU1Utexa0FcSGNKvfRwNpSIUvvDTEVgZE51niaqifPUyNGIZV4xOhicLzFfwAaG79gZ8Vn/hYdzjd/GiPtIcYdNV28ZjlTO4wTCbaMHnC6s6nacFxvzZA== 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=Ov1bHXiCb8Wip9l7Zdf67mGy3mt7u1fpoYF7jhaSO5c=; b=c+8SZBPh66XfGhSPTBCLQkXAJAIeN5mmU98WNeBO8Qi+wUu208HwoExby3OpKSAqBPQHUC8/5MNILzC3izcl9m+O0+H0vqrGfJK8ugeqgRoVp2P8yhezI0OJ2nM8OSJDP0TCySEV/BvxZWlD58sLV3paIw5Ei3GxcuT6Z1/J4oVaPTj+WFJRAjX23i3eWcw8bGMmHU4oZRrmX1pudMiHuxKSBxbHOJxdY6T3q36ZzHhU8NKxLT7ulabY12/l32eSxla1DlsyxXJi8xfBtZJfKPYEQnbG+akuPrq0aMmMV4jsCMgaLb0yk9uoycMi+Oy6jirx/mqYE76MHgokb5XOQQ== 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=Ov1bHXiCb8Wip9l7Zdf67mGy3mt7u1fpoYF7jhaSO5c=; b=KE8YrLJjJ2mRfBWNCgjO54dYTFaaWjRzj6Jk9TuGXK1lwrAvH/NVMQTNqCgVnkJGFSasiPjCG/oWXyOBSXVRzygULuxfnUgWUTrcXQ5QfzQn0E0Yk6xVbOWGQnXkGhvtnDf731LMeVN4t5VbAafP82HDI2KiE2Q3VufI4K1lkW0= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by DM6PR10MB3178.namprd10.prod.outlook.com (2603:10b6:5:1a7::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.16; Sat, 14 May 2022 16:30:08 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::f81d:b8ef:c5a4:9c9b]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::f81d:b8ef:c5a4:9c9b%3]) with mapi id 15.20.5250.018; Sat, 14 May 2022 16:30:07 +0000 Message-ID: <64f16117-beb1-def1-5017-c5006c362070@oracle.com> Date: Sat, 14 May 2022 11:30:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] scsi: target: fixup incorrect use of 'cpumask_t' Content-Language: en-US To: mingzhe.zou@easystack.cn, torvalds@linux-foundation.org, zgrieee@gmail.com, martin.petersen@oracle.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, dongsheng.yang@easystack.cn, zoumingzhe@qq.com References: <20220513062745.3245-1-mingzhe.zou@easystack.cn> From: Mike Christie In-Reply-To: <20220513062745.3245-1-mingzhe.zou@easystack.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DS7PR07CA0003.namprd07.prod.outlook.com (2603:10b6:5:3af::11) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8277f5da-ed9c-46b8-4cad-08da35c70203 X-MS-TrafficTypeDiagnostic: DM6PR10MB3178:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RV6AoKgue2Ic2qlYtZ8H265EIe9q7uf4lw+HtHQm2rfkUFW74tqaz+vOd29B73w99vbHhse1OgDYeotcaaa2+0VEqEHPW8F5yFZXxeXnupqx5Y3bd+oHlSNjbhFwf8gGs6HeHN1FT4pMAMrpdAs1Hmnfmc9XU7GvoclGdH1joAKwtenQkB9rf0aIx8o6NjcH/o+hl5tsYOCc+j5RkyN8gNHBRQuuCqRudV7AEVsy24R8UrAXgu0KV1NskfbbcqyHUruHM+m+bnqjlWI8ml/C1ZITOxqHTkeh+ZRWvsLlnpFSRcPBgHCFW5WDg8KdY8XdjQ6OKdI0xdoOJeCFb3RvOkRZd89ZkAZnm90RFDShXG25lz9F3d/9KXkcF9PovuvfiKkDu/YCwbyno3WKR5jO6O5CwJ5bwE2aekwM4EIqcRT6PS0mwXl6j+HdhsBeIzZ0V6AB7uLVxhdRn1PVzrSL4f23VJoLFI6H6kkqrhHByBpEhzKohkXN0Sk7gNdx713QlWKiMAVsHNx7xVZ/3IpIqXAvrHbta7qt6qt52bXTLZJY2cDQ7zCtz+i0whcxfNIqXcragYHOh8qX68J62aW31AJ78XIkpSNY4Q8S5A6jsqugE7ZaOEPTS3EWg2OGUnU1W+WCp2hkpVw1WuzPit2//WF1bII5noHuouf9OPm+7qzBaC+CTz7IZDEOVjga/8tDytKvezWzEDtpYsVdL+re1mRkJlEPDVQwZy5ubtPBA8k= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR10MB1466.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(4326008)(38100700002)(6636002)(8676002)(66556008)(316002)(36756003)(8936002)(2906002)(6486002)(5660300002)(53546011)(6506007)(31696002)(86362001)(26005)(2616005)(186003)(508600001)(83380400001)(6512007)(66476007)(66946007)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WDFNelloK0VaM3piTEVFb1FiOSs1UWFUM2F4Q2ZSRjJRMURiL2JPZDBTRElx?= =?utf-8?B?QUdMcTV0RXMvNnBUZ0YrdEs2bi9MdFV6NEJzREIwK0IwZ2ZFOVNlTm1RSHp1?= =?utf-8?B?Wk9sNWNsOVhLc1pBTFpmVWVkTk14a3JuQW9VQ0JHb1NiemFEU0VQdWc5bTdS?= =?utf-8?B?elkyb0NoQ2N0a2tldnVEcXB0YlFlQXMzMVM5cWVpMHpqUVJaeFJuY3R6WWQ0?= =?utf-8?B?aUhETzFWd3Y3NlF4L0ZLMEdjajlzcDJQbVJxQ2tDQXBCNVc3ZTdzWlBwQUtT?= =?utf-8?B?bWM0bGVjZXVPa24yZlhpRFh0WnFrVGE4L3BaLytQO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k5YzVhSzI4WSs2VHYvdjdXa1FXcCtGUlJkQ0YzcFVrV0ZteEhx?= =?utf-8?B?T0trZHhLZXpybkIvbHNPZHdhcFlhY1pYN3N2SllzR0pVNHlnM3c2aWE5SVIz?= =?utf-8?B?V0VTa3NjVndYNEpZblZSejlHemhIZlRvcUF2TTl5RWhsMXcyM0twSlZsb3Vi?= =?utf-8?B?SkFVVjJDVjROdFlXQUtReXBxVXAvdk5Halc1VFc3R1dhdHBqVlMvUVYvTTQ4?= =?utf-8?Q?9yYkVsXSGRQsdPGE=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8277f5da-ed9c-46b8-4cad-08da35c70203 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2022 16:30:07.8005 (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: en6cXhNJxqRMoSpoYXBOAFF/2pBxkx83RAkbMnJfd9FWLQFEv6ZrAnN3OKGYKNFwLRnltxOQWzUQnR3Hg3O+vjY6qiHsRTqOAPgV9lnQZPY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB3178 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.858 definitions=2022-05-14_02:2022-05-13,2022-05-14 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205140087 X-Proofpoint-GUID: X9h4nG8q8LyzgYJzdpK40L0Db0Jd-Wt5 X-Proofpoint-ORIG-GUID: X9h4nG8q8LyzgYJzdpK40L0Db0Jd-Wt5 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/13/22 1:27 AM, mingzhe.zou@easystack.cn wrote: > From: mingzhe > > In commit d72d827f2f26, I used 'cpumask_t' incorrectly. > ``` > void iscsit_thread_get_cpumask(struct iscsi_conn *conn) > { > int ord, cpu; > cpumask_t conn_allowed_cpumask; > ...... > } > > static ssize_t lio_target_wwn_cpus_allowed_list_store( > struct config_item *item, const char *page, size_t count) > { > int ret; > char *orig; > cpumask_t new_allowed_cpumask; > ...... > } > ``` > > So, that the correct pattern should be as follows: > ``` > cpumask_var_t mask; > > if (!alloc_cpumask_var(&mask, GFP_KERNEL)) > return -ENOMEM; > ... use 'mask' here as a ... > free_cpumask_var(mask); > ``` > Add a: Fixes: d72d827f2f26 ("scsi: target: Add iscsi/cpus_allowed_list in configfs") to make it easier for people to pick up. > Reported-by: Test Bot > Signed-off-by: mingzhe > --- > drivers/target/iscsi/iscsi_target.c | 32 ++++++++++++++------ > drivers/target/iscsi/iscsi_target_configfs.c | 20 ++++++++---- > 2 files changed, 36 insertions(+), 16 deletions(-) > > diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c > index 6fe6a6bab3f4..3f9f5b8879fe 100644 > --- a/drivers/target/iscsi/iscsi_target.c > +++ b/drivers/target/iscsi/iscsi_target.c > @@ -3596,10 +3596,7 @@ static int iscsit_send_reject( > void iscsit_thread_get_cpumask(struct iscsi_conn *conn) > { > int ord, cpu; > - cpumask_t conn_allowed_cpumask; > - > - cpumask_and(&conn_allowed_cpumask, iscsit_global->allowed_cpumask, > - cpu_online_mask); > + cpumask_var_t conn_allowed_cpumask; > > /* > * bitmap_id is assigned from iscsit_global->ts_bitmap from > @@ -3609,13 +3606,28 @@ void iscsit_thread_get_cpumask(struct iscsi_conn *conn) > * iSCSI connection's RX/TX threads will be scheduled to > * execute upon. > */ > - cpumask_clear(conn->conn_cpumask); > - ord = conn->bitmap_id % cpumask_weight(&conn_allowed_cpumask); > - for_each_cpu(cpu, &conn_allowed_cpumask) { > - if (ord-- == 0) { > - cpumask_set_cpu(cpu, conn->conn_cpumask); > - return; > + if (!alloc_cpumask_var(&conn_allowed_cpumask, GFP_KERNEL)) { Do a zalloc_cpumask_var to make sure it's all initialized. > + ord = conn->bitmap_id % cpumask_weight(cpu_online_mask); > + for_each_online_cpu(cpu) { > + if (ord-- == 0) { > + cpumask_set_cpu(cpu, conn->conn_cpumask); > + return; > + } > + } > + } else { > + cpumask_and(conn_allowed_cpumask, iscsit_global->allowed_cpumask, > + cpu_online_mask); > + > + cpumask_clear(conn->conn_cpumask); > + ord = conn->bitmap_id % cpumask_weight(conn_allowed_cpumask); > + for_each_cpu(cpu, conn_allowed_cpumask) { > + if (ord-- == 0) { > + cpumask_set_cpu(cpu, conn->conn_cpumask); > + free_cpumask_var(conn_allowed_cpumask); > + return; > + } > } > + free_cpumask_var(conn_allowed_cpumask); > } > /* > * This should never be reached.. > diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c > index 0cedcfe207b5..ae9319934cd0 100644 > --- a/drivers/target/iscsi/iscsi_target_configfs.c > +++ b/drivers/target/iscsi/iscsi_target_configfs.c > @@ -1139,20 +1139,28 @@ static ssize_t lio_target_wwn_cpus_allowed_list_store( > { > int ret; > char *orig; > - cpumask_t new_allowed_cpumask; > + cpumask_var_t new_allowed_cpumask; > + > + if (!alloc_cpumask_var(&new_allowed_cpumask, GFP_KERNEL)) > + return -ENOMEM; You can do zalloc_cpumask_var and then drop the clear call below. > > orig = kstrdup(page, GFP_KERNEL); > - if (!orig) > + if (!orig) { > + free_cpumask_var(new_allowed_cpumask); > return -ENOMEM; Just add a goto at the bottom before free_cpumask_var then have this and the other failure path use it. Make sure to also fix up the return code (set count to -ENOMEM/ret or use ret at the bottom and set count to ret). > + } > > - cpumask_clear(&new_allowed_cpumask); > - ret = cpulist_parse(orig, &new_allowed_cpumask); > + cpumask_clear(new_allowed_cpumask); > + ret = cpulist_parse(orig, new_allowed_cpumask); > > kfree(orig); > - if (ret != 0) > + if (ret != 0) { > + free_cpumask_var(new_allowed_cpumask); > return ret; > + } > > - cpumask_copy(iscsit_global->allowed_cpumask, &new_allowed_cpumask); > + cpumask_copy(iscsit_global->allowed_cpumask, new_allowed_cpumask); > + free_cpumask_var(new_allowed_cpumask); > return count; > } >