another small patch: get_attr_bulk
Nickolai Zeldovich
kolya at mit.edu
Fri Dec 29 08:07:32 CET 2000
It looks like get_attr_bulk() uses conn around fcache.c:3393 (in the
call to update_attr-entry) after free_fs_server_context has released
it, which means conn can potentially be recycled already.
(In my case, this bug seems to have caused arlad to segfault, while
I was writing to AFS and running aklog at the same time; conn was
on connfreelist and zeroed out..)
I believe the patch below should fix this bug.
-- kolya
--- fcache.c 2000/11/28 01:48:42 1.307
+++ fcache.c 2000/12/29 07:03:18
@@ -3262,6 +3264,7 @@
AFSCBs cbs;
int i;
int len;
+ u_int32_t host;
arla_warnx (ADEBFCACHE, "get_attr_bulk");
@@ -3359,6 +3362,7 @@
break;
}
+ host = rx_HostOf (rx_PeerOf (conn->connection));
free_fs_server_context (&context);
if (ret) {
@@ -3394,7 +3398,7 @@
&stats.val[i],
&cbs.val[i],
&sync,
- rx_HostOf (rx_PeerOf (conn->connection)),
+ host,
ce->cred);
e->parent = parent_entry->fid;
if (!(prefered_entry && i == 0)) {
More information about the Arla-drinkers
mailing list