Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbdHJLGu (ORCPT ); Thu, 10 Aug 2017 07:06:50 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:28240 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbdHJLGt (ORCPT ); Thu, 10 Aug 2017 07:06:49 -0400 Date: Thu, 10 Aug 2017 14:05:53 +0300 From: Dan Carpenter To: Phil Elwell Cc: Eric Anholt , Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Aishwarya Pant , linux-rpi-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: bcm2835-audio: Fix memory corruption Message-ID: <20170810110553.eavfnl6bi4cpei2s@mwanda> References: <1502193902-87160-1-git-send-email-phil@raspberrypi.org> <20170810102155.6j373u3yktnlwsqw@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 461 Lines: 15 On Thu, Aug 10, 2017 at 11:52:42AM +0100, Phil Elwell wrote: > > This label name is out of date. There is a later error path where > > vc_vchi_audio_init() fails and we leak on that path. > > Also agreed. I'll rework it. > Actually I wasn't right. That error path should probably stay how it is, because we're re-using the vchi_instance. We allocate it in the first call then re-use it later. This code is really subtle and ugly. regards, dan carpenter