Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp962234pxu; Wed, 6 Jan 2021 08:48:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4XyJuaq5yDL54Krh5A84HNl28qHqSokIpIpebp6H+093dbxRBaBhuTmoZgcV87SAtYSAA X-Received: by 2002:a17:906:31cb:: with SMTP id f11mr3544026ejf.468.1609951721232; Wed, 06 Jan 2021 08:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609951721; cv=none; d=google.com; s=arc-20160816; b=03BfDCYVRX9zze/9Y2BKobqd5uYbCTwJhBJS5XDkHKUsRQ7EQ3947ZigKqDvzvHPcf JdCAGCMydH/v8Jq1bFtEBmhtbHEJGfFbEK6l/wQ6wvT0ryDNpFplGXhQ1TjXbHyFP8LC NiahjJiBcphawDu77eO35c8spGYC0Dd1yK4iXjgRx6t2tRJUOcJNnEATwIwDY+eJIEfM CWYx0z2j1gT03gI52nRQb4qvyKtvfpO7chcAye31Hpp5m+tLJb8Aedh0De/MT5zuuNMI 7SwXmDL11BoedSg+pISEXGuvDMDa8iMO/hrOeqo6NGZzTuO1AIGsJqIAZFFJJsPjl+2X T+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=I9TCldcFlO3d6FSovvJF9ddC2dM3SlsBcwbYfhzJQRs=; b=c7cnOKXX1mUW2pA6NNoZN2BqoOBxUg60vmpvvWGNLPHf4zxN6/kJ9w/GW4fQBQ45Hy 4XHL5Myfwg47nNOFSFrOdVKlEsSx3qiLuNsi2LJi5lHuOnIxQfoNbEJy5PRkJkr8ulbV TK4tyLpMZaNtbkUOUXkq2uFWyDe4JN9w920qCJrt+EQ/m65pL1cAysejYj8uGCYBoedq GAiu/PwsZhJ0rzN6Gx+nrykz1eHT7v6DbLtAKjX6ODRLbQp5/hDaSWmuPMwxmeMCMJv8 J0jMFCNvui7+UsrMuDvJ00t2BrLt3SkZxmr+N0QZyXziAtfNvLu+kaumzTfrIAM4RG/B gsQw== ARC-Authentication-Results: i=1; mx.google.com; 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 bt28si1112807edb.269.2021.01.06.08.48.17; Wed, 06 Jan 2021 08:48:41 -0800 (PST) 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; 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 S1727429AbhAFQqc (ORCPT + 99 others); Wed, 6 Jan 2021 11:46:32 -0500 Received: from netrider.rowland.org ([192.131.102.5]:49287 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727337AbhAFQqc (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-kernel@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