Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754526AbcCEH1E (ORCPT ); Sat, 5 Mar 2016 02:27:04 -0500 Received: from mail.linux-iscsi.org ([67.23.28.174]:54670 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbcCEH1A (ORCPT ); Sat, 5 Mar 2016 02:27:00 -0500 Message-ID: <1457162818.19657.282.camel@haakon3.risingtidesystems.com> Subject: Re: [patch -target tree] usb: gadget: f_tcm: use after free From: "Nicholas A. Bellinger" To: Felipe Balbi Cc: Dan Carpenter , Christoph Hellwig , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Andrzej Pietrasiewicz , Bart Van Assche , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, target-devel@vger.kernel.org Date: Fri, 04 Mar 2016 23:26:58 -0800 In-Reply-To: <87k2ll856m.fsf@ti.com> References: <20160302100848.GC5533@mwanda> <87k2ll856m.fsf@ti.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 947 Lines: 26 Hi Felipe + usb-gadget folks, On Wed, 2016-03-02 at 13:55 +0200, Felipe Balbi wrote: > Dan Carpenter writes: > > We need to move the kfree() down a line so we don't dereference a freed > > variable. > > > > Fixes: 1b418a8fcbc0 ('target: Convert demo-mode only drivers to target_alloc_session') > > Signed-off-by: Dan Carpenter > > It's okay to take this via target: > > Signed-off-by: Felipe Balbi > Note this specific patch is only a mechanical change, and we still need reviews for the more interesting conversions: usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation http://www.spinics.net/lists/target-devel/msg11777.html usb-gadget/tcm: Convert to TARGET_SCF_ACK_KREF I/O krefs http://www.spinics.net/lists/target-devel/msg11782.html Felipe, Sebastian, & Andrezj, would you be so kind to review and test usb-gadget using target-pending/for-next code..?