From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B12F4C433DB for ; Wed, 6 Jan 2021 16:46:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6ED3623159 for ; Wed, 6 Jan 2021 16:46:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727446AbhAFQqc (ORCPT ); Wed, 6 Jan 2021 11:46:32 -0500 Received: from netrider.rowland.org ([192.131.102.5]:53253 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727273AbhAFQqc (ORCPT ); Wed, 6 Jan 2021 11:46:32 -0500 Received: (qmail 1012897 invoked by uid 1000); 6 Jan 2021 11:45:50 -0500 Date: Wed, 6 Jan 2021 11:45:50 -0500 From: Alan Stern To: Dan Carpenter Cc: Antoine Jacquet , Andy Shevchenko , Mauro Carvalho Chehab , linux-usb@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: zr364xx: fix memory leaks in probe() Message-ID: <20210106164550.GB1012582@rowland.harvard.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Wed, Jan 06, 2021 at 01:10:05PM +0300, Dan Carpenter wrote: > Syzbot discovered that the probe error handling doesn't clean up the > resources allocated in zr364xx_board_init(). There are several > related bugs in this code so I have re-written the error handling. Dan: I recently sent in a patch for a similar problem in the gspca driver (commit e469d0b09a19 "media: gspca: Fix memory leak in probe"). It seems there may be similar issues in that driver: one single function call tries to undo an indeterminate number of initializations. I don't know enough about these subsystems to evaluate this. Can you take a look at it? Thank, Alan Stern