From patchwork Thu Jun 9 18:07:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 866412 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p59I7gna032558 for ; Thu, 9 Jun 2011 18:08:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216Ab1FISIL (ORCPT ); Thu, 9 Jun 2011 14:08:11 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:42801 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353Ab1FISIK (ORCPT ); Thu, 9 Jun 2011 14:08:10 -0400 Received: by pzk9 with SMTP id 9so861686pzk.19 for ; Thu, 09 Jun 2011 11:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=AhJ6dnWjP3p4X/WyuQO86aXR1pGtuSfTQbPfcxDSt70=; b=HJDH9zcYjm1YwGaZwI0jRUr6ON1ViymhU9dfoCuq+aiSEhAJuElrjiAM38D6euJAut FN7lsxuoViQSGyQOck2ZlpeHBiA5U+RdJX9Fe0u6CSUaTUic5lq1aC31wU6PEhS752n+ EaN3JywNzPkSrrjXL9m8ExYkbacLb9XGri7RQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:in-reply-to:user-agent; b=SCSy/WjDYX/HMH03QGhfaukwWRoj0SoGF/MtdtvKujtwLIuT/fvUeV4DGP+t+ZtPBy Mn5dZHouhMH5p01SLGTJD93WVRclSYAV2oYzDNijNmOiNoAdbJaIs70gZVEN4pnbtQX7 C9YoiG5q5QaYlMlqKgx3/qGltDIMaZ/cIuFw4= Received: by 10.142.56.3 with SMTP id e3mr175375wfa.392.1307642877520; Thu, 09 Jun 2011 11:07:57 -0700 (PDT) Received: from shale.localdomain ([41.139.221.94]) by mx.google.com with ESMTPS id k9sm1593809pbc.22.2011.06.09.11.07.53 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Jun 2011 11:07:56 -0700 (PDT) Date: Thu, 9 Jun 2011 21:07:33 +0300 From: Dan Carpenter To: Trond Myklebust Cc: "open list:NFS, SUNRPC, AND..." , kernel-janitors@vger.kernel.org Subject: [patch v2] NFS: fix debug message Message-ID: <20110609180733.GJ4069@shale.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4E3994E6-9DBF-439B-808E-F134EB5DD923@netapp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Jun 2011 18:08:12 +0000 (UTC) "tmp_ds" was intended here instead of "ds". Also "ds" was already freed. Signed-off-by: Dan Carpenter --- v1 fixed the user-after-free but left the message incorrect. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index 77c171e..ed388aa 100644 --- a/fs/nfs/nfs4filelayoutdev.c +++ b/fs/nfs/nfs4filelayoutdev.c @@ -365,7 +365,7 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags) kfree(ds); atomic_inc(&tmp_ds->ds_count); dprintk("%s data server %s found, inc'ed ds_count to %d\n", - __func__, ds->ds_remotestr, + __func__, tmp_ds->ds_remotestr, atomic_read(&tmp_ds->ds_count)); ds = tmp_ds; }