Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp793831imw; Fri, 8 Jul 2022 11:50:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u6mlXR+y/j0bt7XMSdcVie8wR2XCXWQ/HmJGgtKKEdkFrXNDf60jwOrD3i+axXLJz4G+vu X-Received: by 2002:a05:6402:ea2:b0:43a:1278:533c with SMTP id h34-20020a0564020ea200b0043a1278533cmr6661145eda.77.1657306250766; Fri, 08 Jul 2022 11:50:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657306250; cv=pass; d=google.com; s=arc-20160816; b=q2NfeTaNhUGsfcQMCWJW1MlmZu3cMqsuCehDfpvsOav2WYxqOYvl7I9wd7zu6irHyT rD51pPrFtICf4+UZAU0iATmS2ZedlKGwulIzfcXJcp2DDiizYCArgsJXttaeUzmnSeBC jazfF6SB7GltxcPUvqZB6TCvJ5vRlShKZgCxafRm/C83WPVaY85arKZM/e1FABowCIMS /5yH4XxIn3T05cA2UuvqpM3mexGG8HNlQu/qLQtigvAH40hIrrQmgX0LMcYE7ok86lfv 8RuWjLY7EHKtwV2nQaPJX0SY+YFvs8TA4RyNOO1Z9KQzMLeI0HZYQNXjzlLQovR1Hsty ZESA== 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; bh=LHec/yxXRRO8ADfra18bTFs97a+DSlLIhXotM1fcBzM=; b=l1H+A7+LMhgnAYAC7S2ONCy7AF88b5vw16NTSDCKXTrdNMlDE+Z6CyqGTaRK4D/EKY 8GI4xoqOCcsdZbydkG6wpZdrMbe9dSFOUEM1QhgakDBa/UmcaFVftQToS26TQJ0xaGyB KHzKpiMel7Rde+FSahkwLNGytG55doiZQDK4T7W2eVbfd+hktHmIufs8cXpHIzOgWkM4 aECLmBIoIJEf/AtwplM/UooRs1g6LHZ3VTTcO/iKb+Uso4U8/jttDomvi84jKBqn9nR9 K2FKBU52igx27CUlYx7jk8WkYqerDZ0gW4Hqo61WzbUWzJDCZ1RW8X1b1fmLBDxnVwjH Zs2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=NqzksPNi; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a17090669cb00b0071728eab6a8si23471620ejs.124.2022.07.08.11.50.25; Fri, 08 Jul 2022 11:50:50 -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=@Nvidia.com header.s=selector2 header.b=NqzksPNi; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239434AbiGHSZB (ORCPT + 99 others); Fri, 8 Jul 2022 14:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239445AbiGHSY7 (ORCPT ); Fri, 8 Jul 2022 14:24:59 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2081.outbound.protection.outlook.com [40.107.93.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EC1823B6; Fri, 8 Jul 2022 11:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TpzH8oe9iyWhX0ua73nLmATNE/kQxLUOEVqzMiGzqnPQOKhCNGQMYV0DTi0D8MR8T9CiyHEp1RCVKBjH0J9N/m1xLq1CtHmYv+UiaxiHBAcJO4wHWHG6zoWFtV81HTFpSqy3DDWtr03KGlI+xv143KtRmi3p1jNMHKKIOwod3RzQZHsDNpORcBr7a0/SLRA5qSMV+s8XTG6KNhmmfDwy5Y+Cv20xCJgcaD/FWm3KAk49XAgtVthFKnYSgH1W6pV3toAXyMPpwgIUXsi87QhU3lTBNvRrk9cbj25IuRRdHuBAciAIGIIrt5xZgUhMOT9OrjhnGihFvEscRiTzq0pyZg== 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=LHec/yxXRRO8ADfra18bTFs97a+DSlLIhXotM1fcBzM=; b=ktY4qJh+JNelJhLZTXb7wlXSlpvsN49nAqCCILIFlP4YylRXPG4DZgstFVdQsTNBk03feSnZAsfW3IlhNzkGMR25LWoURougIv717DeNpE6xlm6evVCX5ZOw148ZHpN5WP+4OfozXAagp5jKyvM5cD0gKC28ZAB2rMMjdn3EgnzpYnKT9TruEzZrktdwk+6Oe49D10evUFvR2CMqQwAGCGaeqHq0ua3FXpGfEvpaWJJYSoEOR6DDmxzlYqRqgIKxHKKIti41CYSBRZdfFU3rDmkZaZjfJvKG12uM3U4LEEuNK6iZ9RHon18xz5ceuy2ZvGbAb9vtJccT6olfNCXyLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LHec/yxXRRO8ADfra18bTFs97a+DSlLIhXotM1fcBzM=; b=NqzksPNi9N1e4/R73JGtjQQWPwlRNh3BN7VjFFUOoOfQoYUctuUNBR6XgpRDDXKLOpVkkW7uNO2ZsbALdr04pdhs707F+WAMoG43HNvEIRJ+6SfvkyQDWzwEuzXRBnNiHurNsxXjJZ7VeSJnIlguGIjDgWll5slVNAJtYgQNyAG2e3F+FgT0BQ5j83F/XRhiLsEVR61MpCrKTXoq1HLUVlWdFltjJAJdiBP2s/EwQd+7YrhMQPqBQf6FU8TrY9iqAs8Tbova5xd1B7cpuEZl2D0xlJvPjKNvnxsAzim4VMSTJiXWocftI0nHKf1tzJp7UpUe9ED4epKaZoBWWecfhw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4116.namprd12.prod.outlook.com (2603:10b6:a03:210::13) by DS0PR12MB6437.namprd12.prod.outlook.com (2603:10b6:8:cb::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.16; Fri, 8 Jul 2022 18:24:54 +0000 Received: from BY5PR12MB4116.namprd12.prod.outlook.com ([fe80::dda2:7b0a:3280:5365]) by BY5PR12MB4116.namprd12.prod.outlook.com ([fe80::dda2:7b0a:3280:5365%7]) with mapi id 15.20.5417.020; Fri, 8 Jul 2022 18:24:54 +0000 Message-ID: <424af43a-bcaf-4f59-086d-b1afea425054@nvidia.com> Date: Fri, 8 Jul 2022 11:24:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] gpiolib: cdev: fix null pointer dereference in linereq_free() Content-Language: en-US To: Kent Gibson , Bartosz Golaszewski Cc: Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Linus Walleij References: <20220706084507.2259415-1-warthog618@gmail.com> <20220706085025.GA2259579@sol> <20220707090006.GB57165@sol> <20220707102918.GA60169@sol> X-Nvconfidentiality: public From: Dipen Patel In-Reply-To: <20220707102918.GA60169@sol> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR07CA0063.namprd07.prod.outlook.com (2603:10b6:a03:60::40) To BY5PR12MB4116.namprd12.prod.outlook.com (2603:10b6:a03:210::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 475b0c16-ce01-4fd0-07cb-08da610f27ac X-MS-TrafficTypeDiagnostic: DS0PR12MB6437:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jOHQ5MIzwWtQsjGYYWhRSw86DM6H/DR31U8PSkXYF8B+hFKSu0p7fQLZbtEvb8YvT71b66nc3syu5Xa/FiTyZMTZyM/bWnghSuOVKqzL6maBGqLF6/tgXthYjQd0xfXs/GdVwjgtvfRNV/ylMfUTaJ3cwV1b1A3BgW5zmduYq7/b20grWr3b6yVx/09kTCho1xgSQ9jV5E+EFeKTLP71gsmjb1EYpzYJIxPDBAUIx1UFt1hcWJ5LgxCNQO8ASIaIOQM3wc84CRSmm5RwnqL0g5Ta6R0Syz5DDbrdodTygjp8KHEGOmrrqOVkC8a4ZH+5mirEHU6mT07k+t4aFCTNr28Wo8/KyaZATUNzEv3vS8HD4ZuEp6ibC+rqeXW8WenE3Mt5qXikBoG6abVHdjKytARbuQb2TOFEvUv0X59uxDYkijKxWbpT82LajGcWT8S4I2+fTTvm2kt0WwfvJFypyaGIS8cEkLH954HsdE42cXTg26/JpJ7kkDEOH19GmaWT5K1qitJokETlZDhS0x32hEqnaSwTQuXL1p1a5z6WxEp8QhSnAuIMIpKeaAYjLe9oPbh0jZxig/MQ2Kbj9mn1DhkASzkADCi5oZEwH1il4CNKYGdaZtNsbJ20RQNwDwr9r47hc2uTJWDzX0S5rbv65AETCf/0JPjOcRoKzXYI9c53SoCaInl0APl5epJZcTq4byAm8X3sv7W7lnomay/9DoOP+dIOw0uR9juFDmCgScKDS/5iXDc6rvnEaLM+jgiqzczMjT2wmUu3RCrDkrRQblk4ChXFtE7EvFQLTW8RzeOCZDdKn6FBzmyeIcj9AwsVUGHsQPtGfXH85AQbYF6IbM3OLQynr8Nb01LbpYYhonM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB4116.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(136003)(376002)(346002)(39860400002)(396003)(186003)(6666004)(38100700002)(2906002)(110136005)(53546011)(2616005)(54906003)(8936002)(6506007)(86362001)(31696002)(31686004)(316002)(5660300002)(36756003)(4326008)(83380400001)(26005)(6486002)(8676002)(6512007)(478600001)(66946007)(66476007)(41300700001)(66556008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TFpuak1WTUwxSjBHeUlyQno0UWsyQ1BQeDRVbWRvZ3ZhRlMyRUx4SFF5MEFn?= =?utf-8?B?UncwVVBBNDlDTytFWXVrVW1RcGkzRkZKbnNoeGN6UTJGUXFvQW5yUk1WR05n?= =?utf-8?B?S2I5eEdkY0hoZTFQbEtWcm42SDVtandpVlN6b053aVN6T1FESUFBM2hGS1JZ?= =?utf-8?B?N3lmaU10NnU0blNYQndQSlJtMnczWEFHRWNxVktnbUVVd2NHa1Bib3ZLZEx6?= =?utf-8?B?bWpZdzcvV0UwUlJRalBBSWE4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?utf-8?B?R0ZxY3JFMW1kMVMrY1g5RWlSeEhlbmR6bWtUU0pkc0ZDNm90WDBvaVM1aENI?= =?utf-8?Q?w4enqWQukngo1pC9ECDSzs0Ct?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 475b0c16-ce01-4fd0-07cb-08da610f27ac X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4116.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2022 18:24:54.5741 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ou7wx1m4kamC1/5+hx+cN34MxnQDkXAzOx+nzC1GTsnSzqTrHsia2/0UAjM0n1gBFhYRKK50nx/2Zqjq3znG+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6437 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, 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 7/7/22 3:29 AM, Kent Gibson wrote: > On Thu, Jul 07, 2022 at 12:19:15PM +0200, Bartosz Golaszewski wrote: >> On Thu, Jul 7, 2022 at 11:00 AM Kent Gibson wrote: >>> On Wed, Jul 06, 2022 at 04:50:25PM +0800, Kent Gibson wrote: >>>> On Wed, Jul 06, 2022 at 04:45:07PM +0800, Kent Gibson wrote: >>>>> This patch fixes a kernel NULL pointer dereference that is reported by >>>>> gpio kselftests. >>>>> >>>> Should be: >>>> >>>> Fix a kernel NULL pointer dereference reported by gpio kselftests. >>>> >>>> Sorry - I rushed this one a bit. >>>> >>> And I might not've been totally clear, but this bug is present in >>> v5.19-rc1 onwards (when HTE was added), up to and including rc5. >>> >>> Would be good to get it fixed before v5.19 goes out the door. >>> >>> Cheers, >>> Kent. >> Yep, figured that out. Applied and fixed the commit message, thanks! >> > Good to hear. I never got around to reviewing that final HTE patch > and, while it did end up pretty close to what I expected, there are a > few things that I would've done slightly differently that I'd like to > tidy up. I can create another thread to address this. Let me know. > And also have the HTE specific code compiled out unless CONFIG_HTE is > selected, as that is very likely to be the case for most builds. > But that can wait for v5.20. I am assuming #ifdef CONFIG_HTE blocks around HTE blocks. I think Linus W. also indicated that. > > Cheers, > Kent. >