Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp825681pxy; Thu, 22 Apr 2021 14:30:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzF/ivZSalxGwm4+HOy7XjEF6V9sgnk+H+1Rk0R0Me/jpXLW40uKkZTpyK+hqDaMWg+8Gh X-Received: by 2002:a17:906:c099:: with SMTP id f25mr666305ejz.499.1619127044880; Thu, 22 Apr 2021 14:30:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619127044; cv=pass; d=google.com; s=arc-20160816; b=lTFk+3u9hx2aYfV+HrSq0rWGpqLM8YjnMEpFsvQqb5YvJ+aKnBcbHuf0j2JqS3HfJS rdVVMv7wzKfaMiKRB9FtxxI8raM/pKirmRtJAYPc1Yk9u6SjPjLmV6iW2HDLht0C6IMX pxwFDYD9AgM+It//0Adz0pnksf3JsPqWut6ZD0PjiJZSlCvYZ6G6gdhsRmzdJAT/vsuG b4ynFDOu98LvXNBS41uuIppaMyNQRzf7OIXgqEdpneoX14m4/+yAZFNfM3fX0uRHWk4t lmesbssZzv2ywPYftPeJlWoQ0ZSUJAUdPova00hvkvTcpoz9+h8KosP9VXgbulHZDIan eWjg== 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 :content-language:in-reply-to:user-agent:date:message-id :organization:from:subject:references:cc:to:dkim-signature; bh=HBH5UNm1d8wm+0J/cCay0NSFQa3oQxJNocLJ0p4N9X0=; b=CDEYd7HpNIgP9Ux4oYv/7wirs3+oQjz3Uw5qxqhgl7dTgng/7S2IS7T2wdTxfXK1+A EUxWCZsWuYL4P1YIdnXFZ6SBCQ7LtcUfppuX6T2R8567PEgSrFKKzDZM/OH3sXMt9xnx 6i+cnwFsxNnNIssMLSfxZU5e4zHXd3XFzLx1JHmdhLirOSrs6LKOm+bAuppFHqMWSPzp Yc58wRSpe2eQ8BwwfIhZIeZuB9W1hvdoCA3E1g89St2X6pkg357OeoTUJIcNyPUnzWgs 4xgeXkS+EbIXVeDTl4VpQ4rNhUPENPs2MIWrQLCpompvN8HKA/dWWN4rhNMTXS+WkBCG 94Bw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@axentia.se header.s=selector2 header.b=oipBULU1; arc=pass (i=1 spf=pass spfdomain=axentia.se dkim=pass dkdomain=axentia.se dmarc=pass fromdomain=axentia.se); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si3668146edj.233.2021.04.22.14.30.20; Thu, 22 Apr 2021 14:30:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@axentia.se header.s=selector2 header.b=oipBULU1; arc=pass (i=1 spf=pass spfdomain=axentia.se dkim=pass dkdomain=axentia.se dmarc=pass fromdomain=axentia.se); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239577AbhDVVaD (ORCPT + 99 others); Thu, 22 Apr 2021 17:30:03 -0400 Received: from mail-eopbgr60090.outbound.protection.outlook.com ([40.107.6.90]:5604 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237018AbhDVVaC (ORCPT ); Thu, 22 Apr 2021 17:30:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WJ4xSryzTpD/VOr8zvLL0aC4h9z7xRA/yA/qfb+12M1Qj3l2F2rJDAKAh3e+ecpOeXJZlEfYIuYuIWlUQw1D7jBJUSbg5O24R/IwWITQ1zTlrhXlL/r9ygkDTKQ4M+MYPsZELjoKusvTRrq6RpBs4sSQ097gCFPAehvILVwvGSd3txhUIiiuND3Ygr/RzYo5vwTC+x3q4/c39Bc3KuKP3KxNUGKRibImW9eIScn91fHjHglwMYZGgTi6v7ANKdygtEjeFCpFLPXEUb/xYqbZB3e+sASsd8/ZN/Ju+8IExY6YTt7+v+oQdZJtO2BdryZLs1o2DdJUIZbHf9OvZDunxw== 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-SenderADCheck; bh=HBH5UNm1d8wm+0J/cCay0NSFQa3oQxJNocLJ0p4N9X0=; b=P27sFzLMY0yFJfZzguboPPEI6JkKoltvSuomqEhsbSBC1jmku8QK8q34/okqjRrWynAPV5/W/GapzdY05amibDCo46BQ/notWTD15FQpR5r7HhV8QTxCOQj4GI9MWmhTYljHXSHgBazpwZ7aGV9xhTP2vg/J3EyQtu1jXZHZ1e69LohhJej2PwNsDELyAJ2zr9PXpSaV8W96t8HfsMm2DX3KWFk9GHMPyu2BAM6bY+xEAHiSnwkssBwP22GIVRQFVzyfDobXxKPD1uJhADC3bSuKWIi9bPFIKZjr7z93TERONBRQUf84YTWenFJ1NOEmx+hDEp8rCudcQbMr+34Ljw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=axentia.se; dmarc=pass action=none header.from=axentia.se; dkim=pass header.d=axentia.se; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HBH5UNm1d8wm+0J/cCay0NSFQa3oQxJNocLJ0p4N9X0=; b=oipBULU1Aa2Rb6ZImkhMa70xL0vBRjVO9a6ZTvdt/RIjJVg20qifL1xtDNta9L6AnKzUdlAJqQZnmVVsjMXGoA/arhWxTtzsKBOxpAkgDFazTJ3MLYyDFH38Slt9XRGgoRfKCeN5NaATncrsn08Ho5gy/focVq2mhwo7AuD0zEk= Authentication-Results: umn.edu; dkim=none (message not signed) header.d=none;umn.edu; dmarc=none action=none header.from=axentia.se; Received: from DB8PR02MB5482.eurprd02.prod.outlook.com (2603:10a6:10:eb::29) by DB9PR02MB7354.eurprd02.prod.outlook.com (2603:10a6:10:25c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Thu, 22 Apr 2021 21:29:25 +0000 Received: from DB8PR02MB5482.eurprd02.prod.outlook.com ([fe80::d47d:ca8c:4fe6:3908]) by DB8PR02MB5482.eurprd02.prod.outlook.com ([fe80::d47d:ca8c:4fe6:3908%3]) with mapi id 15.20.4065.020; Thu, 22 Apr 2021 21:29:25 +0000 To: gregkh@linuxfoundation.org Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, wang6495@umn.edu References: <20210421130105.1226686-168-gregkh@linuxfoundation.org> Subject: Re: [PATCH 167/190] Revert "gdrom: fix a memory leak bug" From: Peter Rosin Organization: Axentia Technologies AB Message-ID: <23ffd3c5-0095-6a95-8c30-2b6f67377ce7@axentia.se> Date: Thu, 22 Apr 2021 23:29:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 In-Reply-To: <20210421130105.1226686-168-gregkh@linuxfoundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [85.229.94.233] X-ClientProxiedBy: HE1PR06CA0128.eurprd06.prod.outlook.com (2603:10a6:7:16::15) To DB8PR02MB5482.eurprd02.prod.outlook.com (2603:10a6:10:eb::29) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.13.3] (85.229.94.233) by HE1PR06CA0128.eurprd06.prod.outlook.com (2603:10a6:7:16::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Thu, 22 Apr 2021 21:29:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c953d7a0-6d69-4068-a592-08d905d5b386 X-MS-TrafficTypeDiagnostic: DB9PR02MB7354: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S/VhS+6LfApOpFGFBO3yjessCZdFg4MO8K/uiX+kKPzJtyjBq5sD2r40klI7oy+5YPnkvgaQdLdNLXwtgMy6BmTrzXOy+BSJ9Xf+SaBd5XL4p5dvGdyItGANEczHNDA2i24efKWZrZbePkAWZriPQheprO4YKybY0Dx317aRj5Uro8zhLJ9CyAkwz6U7tjbO2Ohf6yInXdx96eajObsjnQPjYAS4tdS5bwJCIdcjOuTfrAJzDaEQk5Y0Ss7GoaS9OfUiHd+qnXzZJ1CS3c3l+OH470lhLjSQGUdx+nE9ewGdN0/QLjNsS+5puMYzrFaKe97P96H6xWDtAjQSYv6zelLKAnmR8lLcMl/jfsW7eY4hV63aw/zYm1JDkapDtqwz2+0nrV76xTEGCd3QKtVmWWKmWHUjDX50SiXGLXEgf+UiS5lyCA9YkzW2CeQ65dVkR63mxLHSPOcs9VmtUNfXhNgXDE1MqWlA29fFybs5w/TP2oOHvsXWnrVkibiBKpbWkS7EA7dQwRrhIlgYq3247PMyYTIGz/dOeJINHzqy2FrtLZh6mVl9rJ8Cp6quOohCGqD+M+Tp3+dXZ/NdEJaQ+qWbecHZ/a0DjXf/6Dn4Rdxmp/YXRvwtEPO7lcxuai+J9vM8yQq/gU42Uekp5bh52qZLz7G6OUQ8MKv1rXOLHXGBtTDIlUDMHVoyHxvuzD6m X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR02MB5482.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(136003)(376002)(346002)(366004)(39830400003)(8676002)(2616005)(36756003)(316002)(956004)(4326008)(16576012)(6916009)(8936002)(16526019)(31686004)(186003)(26005)(2906002)(86362001)(36916002)(38100700002)(4744005)(6486002)(66946007)(31696002)(5660300002)(478600001)(66556008)(66476007)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?VjZCajQxZm1rQ1pvSmJJcTM5TlVrdVlQRVJHRjdXM25vZkZwUVF1cVlaM2p3?= =?utf-8?B?MkJNMnQwWWQ4TEoxWnR6Mmo5Z1BISDRIVm1XaTkyc2c5dHNocEVzRnJUQ3pH?= =?utf-8?B?TXRsa1ZNS2wrWDYvbFd1Z0s5RnJsNGJOcFFzVHRKZVVpV1pha1hpMFNxTEZK?= =?utf-8?B?VVl1M0ZVdjJYZ21SdDJwT2hERXJpajlGcHA4SHFQNHpTRXIzQXNZNkZnK0Qw?= =?utf-8?B?THBhV1BtQVZJZWQ0d1RQdUovOS8xSVZwTDdNNCsvTmtWdTZlVXBZTUsvWVFK?= =?utf-8?B?bVdrUm5mNXVld0dLbk42Y25WKyt4M1M5TWlQWDIxcXRrZlNPOFUxSjJGV3Rn?= =?utf-8?B?QjF3ZXdsVVZ2MnUrQmFDMUR3OVFlWlY3K01FUExGTUFaVUVMalFtWTNzbEVQ?= =?utf-8?B?SXFwTHpLYTREbnVwK2F5VUVnT1REWTUzWVdHUU5BR3ZvdVAwdXVrcWN2NUYy?= =?utf-8?B?S1JLcWZxZU1wZytpVG1VNEg1V1RVWW0vNmQ1VzZvV2RMTFRRNXFheHpLKzkx?= =?utf-8?B?MkZXc3hubW5GaGZuVzlNOUpNcjhyTHcrNVJkQ0h6VlRKTDRHVCtkRUJlQ0M0?= =?utf-8?B?ZXhmQ01ibTdVTnJZV21ZZDBnL2s2Tms3VlN0Q0lrR1F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lEVzY1N2tBamd0YnMwZVBDU0JzZTEr?= =?utf-8?B?WEhxSjJ5YVJTb20zUmpVUGc3eHRJZUhIMnZLS1R6cDFxbG84MWM4U3ZMV0Ex?= =?utf-8?B?Z245SzNjRFR6ZE5sVVFtTkdZVzdwRWhCd1c4TTQxY3pJOVRFWUlHblJkWnZv?= =?utf-8?B?SWYzam9OdDgrdC82RnRvM1JCeUhVelFVOTkrYkFvQmp5WHNGUGFqVFNaalZ6?= =?utf-8?Q?h5IwESY9Td5IkzsnuSeYn1348xvS2yeERkIviwC?= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-Network-Message-Id: c953d7a0-6d69-4068-a592-08d905d5b386 X-MS-Exchange-CrossTenant-AuthSource: DB8PR02MB5482.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2021 21:29:25.0862 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uzX/OTP8jjKvixtnhWYjz2NsGUaFlTPU5iYd4IJODmD/1cSc89VIfMPLh3NzpQbn X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR02MB7354 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > This reverts commit 093c48213ee37c3c3ff1cf5ac1aa2a9d8bc66017. The reverted patch looks fishy. gc.cd_info is kzalloc:ed on probe. In case probe fails after this allocation, the memory is kfree:d but the variable is NOT zeroed out. AFAICT, the above leads to a double-free on exit by the added line. I believe gd.cd_info should be kfree:d on remove instead. However, might not gc.toc also be kfree:d twice for similar reasons? I could easily be mistaken. Cheers, Peter