Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libp2k puffs might call getattr after we decided to recy...



details:   https://anonhg.NetBSD.org/src/rev/9c48af85ac24
branches:  trunk
changeset: 747983:9c48af85ac24
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Oct 07 20:56:29 2009 +0000

description:
puffs might call getattr after we decided to recycle node.  protect.

diffstat:

 lib/libp2k/p2k.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 1a022dccf2b0 -r 9c48af85ac24 lib/libp2k/p2k.c
--- a/lib/libp2k/p2k.c  Wed Oct 07 20:55:25 2009 +0000
+++ b/lib/libp2k/p2k.c  Wed Oct 07 20:56:29 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: p2k.c,v 1.19 2009/10/07 20:55:25 pooka Exp $   */
+/*     $NetBSD: p2k.c,v 1.20 2009/10/07 20:56:29 pooka Exp $   */
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -740,6 +740,10 @@
        struct vattr *va_x;
        int rv;
 
+       /* "deadfs" */
+       if (!vp)
+               return 0;
+
        if (needcompat()) {
                va_x = rump_vattr_init();
        } else {



Home | Main Index | Thread Index | Old Index