From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:46537 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbdJ2MwD (ORCPT ); Sun, 29 Oct 2017 08:52:03 -0400 Date: Sun, 29 Oct 2017 13:51:59 +0100 From: Johan Hovold To: Viresh Kumar Cc: Johan Hovold , Rui Miguel Silva , Viresh Kumar , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, stable Subject: Re: [PATCH] staging: greybus: spilib: fix use-after-free after deregistration Message-ID: <20171029125159.GA659@localhost> References: <20171029120133.32585-1-johan@kernel.org> <20171029124328.GE4240@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171029124328.GE4240@vireshk-i7> Sender: stable-owner@vger.kernel.org List-ID: On Sun, Oct 29, 2017 at 06:13:28PM +0530, Viresh Kumar wrote: > On 29-10-17, 13:01, Johan Hovold wrote: > > Remove erroneous spi_master_put() after controller deregistration which > > would access the already freed spi controller. > > > > Note that spi_unregister_master() drops our only controller reference. > > > > Fixes: ba3e67001b42 ("greybus: SPI: convert to a gpbridge driver") > > Cc: stable # 4.9 > > Cc: Greg Kroah-Hartman > > Signed-off-by: Johan Hovold > Acked-by: Viresh Kumar > > While looking at this I think I found another problem (I will send it as a > separate patch later on) and this fixes it: That's right, and I already posted a fix for that use-after-free: https://lkml.kernel.org/r/20171029115625.32385-1-johan@kernel.org Thanks, Johan