Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:20262 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568Ab2BZXxJ (ORCPT ); Sun, 26 Feb 2012 18:53:09 -0500 From: "Myklebust, Trond" To: Stanislav Kinsbursky CC: "Isaman, Fred" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH] SUNRPC: fix use-after-free of rpc pipes Date: Sun, 26 Feb 2012 23:52:51 +0000 Message-ID: <1330300376.18817.0.camel@lade.trondhjem.org> References: <1330019288-13031-1-git-send-email-iisaman@netapp.com> <4F47D37D.2080409@parallels.com> In-Reply-To: <4F47D37D.2080409@parallels.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gRnJpLCAyMDEyLTAyLTI0IGF0IDIyOjE0ICswNDAwLCBTdGFuaXNsYXYgS2luc2J1cnNreSB3 cm90ZToNCj4gMjMuMDIuMjAxMiAyMTo0OCwgRnJlZCBJc2FtYW4g0L/QuNGI0LXRgjoNCj4gPiBU aGlzIG5lZWRzIHRvIGJlIGxvb2tlZCBhdCBjbG9zZWx5IGJ5IHNvbWVvbmUgbW9yZSBmYW1pbGlh ciB3aXRoIHRoZQ0KPiA+IHBpcGUgY29kZS4NCj4gPg0KPiA+IEl0IGZpeGVzIGFuIGlzc3VlIHdp dGggdGhlIGN1cnJlbnQgbmZzX2Zvcl9uZXh0IGJyYW5jaCB3aGljaCBjYXVzZXMgYQ0KPiA+IGNo YWluIG9mIG9vcHNlcyBvbiB1bW91bnQgZXZlcnkgdGltZSBpZiBzdWZmaWNpZW50IENPTkZJR18q IGRlYnVnDQo+ID4gb3B0aW9ucyBhcmUgc2V0Lg0KPiA+DQo+ID4gQSBnaXQtYmlzZWN0IHNob3dz IHRoYXQgdGhlIHByb2JsZW0gd2FzIGludHJvZHVjZWQgYnkNCj4gPiBjb21taXQgYzIzOWQ4M2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