From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alan Stern <stern@rowland.harvard.edu>,
Hans Verkuil <hans.verkuil@cisco.com>
Cc: Antoine Jacquet <royale@zerezo.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
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()
Date: Wed, 6 Jan 2021 22:31:16 +0300 [thread overview]
Message-ID: <20210106193116.GE2831@kadam> (raw)
In-Reply-To: <20210106164550.GB1012582@rowland.harvard.edu>
On Wed, Jan 06, 2021 at 11:45:50AM -0500, Alan Stern wrote:
> 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?
>
The probe error handling in gspca_dev_probe2() is fine now. All those
functions are no-ops when they haven't been allocated/registered.
regards,
dan carpenter
next prev parent reply other threads:[~2021-01-06 19:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 10:10 [PATCH] media: zr364xx: fix memory leaks in probe() Dan Carpenter
2021-01-06 10:10 ` Dan Carpenter
2021-01-06 16:45 ` Alan Stern
2021-01-06 19:31 ` Dan Carpenter [this message]
2021-01-13 16:13 ` Hans Verkuil
2021-01-13 16:13 ` Hans Verkuil
2021-01-18 12:20 ` Dan Carpenter
2021-01-18 12:20 ` Dan Carpenter
2021-01-21 6:44 ` [PATCH v2] " Dan Carpenter
2021-01-21 6:44 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210106193116.GE2831@kadam \
--to=dan.carpenter@oracle.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=royale@zerezo.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.