<div>
<br><font size=2 face="sans-serif">The first time ib_cache_update being
called both old_pkey_cache & old_gid_cache are NULL.</font>
<br>
<br><font size=2 face="sans-serif">Signed-off-by: Shirley Ma (xma@us.ibm.com)</font>
<br>
<br><font size=2 face="sans-serif">diff -uprN infiniband/core/cache.c infiniband-patch/core/cache.c<br>
--- infiniband/core/cache.c        2005-10-05
06:59:34.000000000 -0700<br>
+++ infiniband-patch/core/cache.c        2005-10-05
08:55:42.550693304 -0700<br>
@@ -252,8 +252,10 @@ static void ib_cache_update(struct ib_de<br>
 <br>
         write_unlock_irq(&device->cache.lock);<br>
 <br>
-        kfree(old_pkey_cache);<br>
-        kfree(old_gid_cache);<br>
+        if (old_pkey_cache)<br>
+                kfree(old_pkey_cache);<br>
+        if (old_gid_cache)<br>
+                kfree(old_gid_cache);<br>
         kfree(tprops);<br>
         return;<br>
 </font>
<br>
<br><font size=2 face="sans-serif"><br>
<br>
Shirley Ma<br>
IBM Linux Technology Center<br>
15300 SW Koll Parkway<br>
Beaverton, OR 97006-6063<br>
Phone(Fax): (503) 578-7638<br>
<br>
</font></div>