From patchwork Tue Oct 2 20:01:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Schumaker X-Patchwork-Id: 1538651 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 80352DFFAD for ; Tue, 2 Oct 2012 20:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173Ab2JBUBk (ORCPT ); Tue, 2 Oct 2012 16:01:40 -0400 Received: from mx2.netapp.com ([216.240.18.37]:22993 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158Ab2JBUBk (ORCPT ); Tue, 2 Oct 2012 16:01:40 -0400 X-IronPort-AV: E=Sophos;i="4.80,524,1344236400"; d="scan'208";a="696667585" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 02 Oct 2012 13:01:38 -0700 Received: from davros.hq.netapp.com (davros.hq.netapp.com [10.55.77.27]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id q92K1cAN008015; Tue, 2 Oct 2012 13:01:38 -0700 (PDT) From: bjschuma@netapp.com To: Trond.Myklebust@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH] NFS: Set key construction data for the legacy upcall Date: Tue, 2 Oct 2012 16:01:38 -0400 Message-Id: <1349208098-18997-1-git-send-email-bjschuma@netapp.com> X-Mailer: git-send-email 1.7.12.2 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Bryan Schumaker This prevents a null pointer dereference when nfs_idmap_complete_pipe_upcall_locked() calls complete_request_key(). Signed-off-by: Bryan Schumaker --- fs/nfs/idmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 675b389c..9cc4a3f 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c @@ -707,6 +707,7 @@ static int nfs_idmap_legacy_upcall(struct key_construction *cons, msg = &data->pipe_msg; im = &data->idmap_msg; data->idmap = idmap; + data->key_cons = cons; ret = nfs_idmap_prepare_message(key->description, idmap, im, msg); if (ret < 0)