From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753656Ab2LLJxc (ORCPT ); Wed, 12 Dec 2012 04:53:32 -0500 Received: from nat28.tlf.novell.com ([130.57.49.28]:60727 "EHLO nat28.tlf.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343Ab2LLJxb convert rfc822-to-8bit (ORCPT ); Wed, 12 Dec 2012 04:53:31 -0500 Message-Id: <50C8622802000078000AFD96@nat28.tlf.novell.com> X-Mailer: Novell GroupWise Internet Agent 12.0.1 Date: Wed, 12 Dec 2012 09:53:28 +0000 From: "Jan Beulich" To: "Olaf Hering" Cc: , , Subject: Re: [PATCH] xen/blkback: prevent repeated backend_changed invocations References: <1355259026-16946-1-git-send-email-olaf@aepfle.de> <50C85F9F02000078000AFD6E@nat28.tlf.novell.com> <20121212094749.GA3382@aepfle.de> In-Reply-To: <20121212094749.GA3382@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 12.12.12 at 10:47, Olaf Hering wrote: > On Wed, Dec 12, Jan Beulich wrote: > >> >>> On 11.12.12 at 21:50, Olaf Hering wrote: >> > backend_changed might be called multiple times, which will leak >> > be->mode. Make sure it will be called only once. Remove some unneeded >> > checks. Also the be->mode string was leaked, release the memory on >> > device shutdown. >> >> So did I miss some discussion here? I haven't seen any >> confirmation of this function indeed being supposed to be called >> just once. >> >> Also, as said previously, if indeed it is to be called just once, >> removing the watch during/after the first invocation would seem >> to be the more appropriate thing to do. > > Does the API allow this, that the called function can disable the watch? That is what would need looking into (and why I said "during/after"). Jan