Return-Path: Received: from us-smtp-delivery-194.mimecast.com ([63.128.21.194]:35627 "EHLO us-smtp-delivery-194.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423283AbdDUSGh (ORCPT ); Fri, 21 Apr 2017 14:06:37 -0400 From: Trond Myklebust To: "asavkov@redhat.com" , "andros@netapp.com" CC: "anna.schumaker@netapp.com" , "jstancek@redhat.com" , "linux-nfs@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] nfs/filelayout: fix NULL pointer dereference in fl_pnfs_update_layout() Date: Fri, 21 Apr 2017 15:00:42 +0000 Message-ID: <1492786837.47403.1.camel@primarydata.com> References: <1492784324-29661-1-git-send-email-asavkov@redhat.com> In-Reply-To: <1492784324-29661-1-git-send-email-asavkov@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gRnJpLCAyMDE3LTA0LTIxIGF0IDE2OjE4ICswMjAwLCBBcnRlbSBTYXZrb3Ygd3JvdGU6DQo+ IENhbGxpbmcgcG5mc19wdXRfbHNldCBvbiBhbiBJU19FUlIgcG9pbnRlciByZXN1bHRzIGluIGEg TlVMTCBwb2ludGVyDQo+IGRlcmVmZXJlbmNlIGxpa2UgdGhlIG9uZSBiZWxvdy4gZmxfcG5mc191 cGRhdGVfbGF5b3V0KCkncyBvdXRwdXQgaXMNCj4gY2hlY2tlZCBhZnRlciBlYWNoIGNhbGwgc28g aXQgZG9lc24ndCBzZWVtIHRoYXQgaXQgc2hvdWxkIHRyeSB0bw0KPiBoYW5kbGUNCj4gdGhlc2Ug ZXJyb3JzIG9uIGl0J3Mgb3duLg0KPiANCj4gWyAzMDAwLjYzNjE2MV0gQlVHOiB1bmFibGUgdG8g aGFuZGxlIGtlcm5lbCBOVUxMIHBvaW50ZXIgZGVyZWZlcmVuY2UNCj4gYXQgMDAwMDAwMDAwMDAw MDAzYw0KPiBbIDMwMDAuNjM2OTcwXSBJ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