From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752222AbbCXVq2 (ORCPT ); Tue, 24 Mar 2015 17:46:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37218 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbbCXVq1 (ORCPT ); Tue, 24 Mar 2015 17:46:27 -0400 Date: Tue, 24 Mar 2015 22:46:23 +0100 From: Greg Kroah-Hartman To: Alistair Strachan Cc: linux-kernel@vger.kernel.org, Maarten Lankhorst , Colin Cross Subject: Re: [PATCH] sync: Fix memory corruption in sync_timeline_signal(). Message-ID: <20150324214623.GA19829@kroah.com> References: <1427230504-8279-1-git-send-email-alistair.strachan@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427230504-8279-1-git-send-email-alistair.strachan@imgtec.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 24, 2015 at 01:55:04PM -0700, Alistair Strachan wrote: > The android_fence_release() function checks for active sync points > by calling list_empty() on the list head embedded on the sync > point. However, it is only valid to use list_empty() on nodes that > have been initialized with INIT_LIST_HEAD() or list_del_init(). > > Because the list entry has likely been removed from the active list > by sync_timeline_signal(), there is a good chance that this > WARN_ON_ONCE() will be hit due to dangling pointers pointing at > freed memory (even though the sync drivers did nothing wrong) > and memory corruption will ensue as the list entry is removed for > a second time, corrupting the active list. > > This problem can be reproduced quite easily with CONFIG_DEBUG_LIST=y > and fences with more than one sync point. > > Change-Id: Ie2a6bc1480bbcfdc14f9b385fca5a2b833effc05 This line doesn't belong in a kernel changelog, can you please remove and resend? thanks, greg k-h