Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1794522pxy; Thu, 6 May 2021 16:29:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj0kWViKixno2aPMwdBOp/nAbkdqrNz6wGdgN6Q9WJ5Sm6qg0VYQtRjdhhTrrQBIg5/Xon X-Received: by 2002:a63:4512:: with SMTP id s18mr6838867pga.275.1620343747472; Thu, 06 May 2021 16:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620343747; cv=none; d=google.com; s=arc-20160816; b=bKxrYxSmxFGvWTPwVIoTLEOqkTU/r8xtgNGwn4Znt+erNq0pVXOss0YWwvuSC+01u1 V5GYqoh2XmRNk9DJT6/KxEDgBjgy0oP2OtJN0J0lksioR/oIlFZKz+2COoLpZHmi60T5 cMXTXfuL4SJGfdXknEi5/8xlr27Uwapl+2MT3tLpuUQd9SN/Yo1jfxZmpBT/9gJ8Bbsu 6E6QRXW4gbdmUhVNoNXOlyn0UL5qrtQcWgrbqTkknviZ5OAGE9zBvREF7/CyYk+S6AT6 MYDZ2U9yrifLKRz8/wPRjUdiB7DpPBDXkjxtdIg1ioUFzrbpxsZSE44clyAumGlcnsdU QYaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xXizdXUAjSz2jlshC5sOnX3iWhZuSTNGCElXukfmD5M=; b=FQk6sNzfU6qCs0kKquX501+tJmWw5WQCjVj8YQkoLfyQN591fyVZGQGLaMCK5cCAqF ZWnoLyPFWSHGIbFOChP9lFWsz3+zjOonqGPTC7UFzIbfCtvI9cc/j6evA0uUAoNvwEz5 6hbdSu8SYo+eypUJYPc+NcS07g7kg+Q9258lEgChsu3Ppw4Wmh7swSjET6j0/UkcG14e GK9zMnc9wWWBURNPsadXfzaeqjO4pKoutonSCzqKpMC5zmOlJ6krBG36qV41PpoBktnp Q9Zh6oFm58f5QHHlJWPTAvxS8gIFT3altf/Vie7Dyz9GF+sdYE0KWk2CZ/NJd6pa5a6P /+FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cR1tnwk3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si4924980pgj.353.2021.05.06.16.28.27; Thu, 06 May 2021 16:29:07 -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=@gmail.com header.s=20161025 header.b=cR1tnwk3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235985AbhEFQlM (ORCPT + 99 others); Thu, 6 May 2021 12:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235295AbhEFQlM (ORCPT ); Thu, 6 May 2021 12:41:12 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9DD4C061761; Thu, 6 May 2021 09:40:13 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id 10so5686819pfl.1; Thu, 06 May 2021 09:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xXizdXUAjSz2jlshC5sOnX3iWhZuSTNGCElXukfmD5M=; b=cR1tnwk3T/Wvlf5i9dst9jZsGLRtAexfDn11Uag1slcnP4yE6mHoDHZBR7IwSlcU0Q 6L2LTwSOtFe8robwxXO+Rm/EOV5d00Jo+lsHdOv5UvPYsCicJIjSSTMaG0bvzx6rKAGW Div/waoPb4F9hvalAUjlf6OAOanR/o1ROOP3J5aJ6ENyc5aXoPxtdlgcMPQsptVOxRxm YLRtc6+aqtjUHf4X8rPjeCN0gOBcbde4/iZsmg+6l/ezwPCnA52ns1Amk8EYbbe6QN+m jctKrRRcsB8XnqJcLZoQ6QNbVYLk1pDMV05XF2P/x85vwu/cRJkKaEtzUmtzfBZsxNcE oeaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xXizdXUAjSz2jlshC5sOnX3iWhZuSTNGCElXukfmD5M=; b=uduPj7unvm7AwXn7hS6LBdgvJqVio6cj2E85vrgwitf5hfjD+lScr28rp13tIoZYyb aKdIl/YLZtR1zaXYa/xfqO0wUgBZFgWcUWOokfzFhS1iHcZG0hK2tHVp4fLMbt6Vl6jO otcDqHFKmbGBCAyZgIdBWJQLbrGDVDw9iCOMVsOxKlczNSMklydoNe0pSSkO2x5/kXNZ JLnaku9JiHCGsbmeyd/NFVsU7398wj4I1jAU6+YDrTltdKR0U7BemEtYxUq+qgxzLbH+ O2vOuhtamLgi0rJj3MiCCrzi1QMFXJsad1jSe5BHTOrmx67L+7zxVd8LfL++3l0D2azB 88RA== X-Gm-Message-State: AOAM532zOn/9OG3rTDzyCUuM2u8eR9vbXH1sbF01hm5ynulMQnU160Gl mTuHld5srj12gC1/cCv7U7ti3j8jea8= X-Received: by 2002:a63:4c0e:: with SMTP id z14mr5198740pga.30.1620319213313; Thu, 06 May 2021 09:40:13 -0700 (PDT) Received: from atulu-nitro ([122.178.201.168]) by smtp.gmail.com with ESMTPSA id lx15sm9867586pjb.56.2021.05.06.09.40.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 09:40:12 -0700 (PDT) Date: Thu, 6 May 2021 22:10:08 +0530 From: Atul Gopinathan To: Peter Rosin Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Jens Axboe , stable Subject: Re: [PATCH 27/69] cdrom: gdrom: deallocate struct gdrom_unit fields in remove_gdrom Message-ID: <20210506164008.GA6283@atulu-nitro> References: <20210503115736.2104747-1-gregkh@linuxfoundation.org> <20210503115736.2104747-28-gregkh@linuxfoundation.org> <223d5bda-bf02-a4a8-ab1d-de25e32b8d47@axentia.se> <20210506143208.GA7971@atulu-nitro> <1912bddd-0788-5586-1cb0-0400630c32f8@axentia.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1912bddd-0788-5586-1cb0-0400630c32f8@axentia.se> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 06, 2021 at 05:43:14PM +0200, Peter Rosin wrote: > Hi! > > On 2021-05-06 16:32, Atul Gopinathan wrote: > > > > Apart from this, I don't see gdrom_get_last_session() being called > > anywhere. But I could be missing something obvious too. > > > > If you don't mind, could you point out where gd.toc is being used in > > probe_gdrom() before it is kzalloc-ed in the same function. > > You are very probably correct in your analysis, and I can't find it in me > to spend the time to dig any further. > > I simply thought it bad enough to hand off a pointer to a function that > uses a stale pointer to some other driver. I never dug into that other > module like you did. Relying on that other piece of code to not use the > function that was just handed to it is way too subtle (for me at least). > When you "register" with something else, you should be ready to get the > calls. > > This is true especially in the context of what we are fixing up here; > broken shit related to people that are fond of weaknesses later to be > activated by other innocuous commits. Ah, I see, that makes sense. I just wanted to confirm if I was getting things right. Thanks for clarifying! Regards, Atul