[OpenAFS-devel] Re: linux 2.6.x (FC2) SMP oops: it's not CONFIG_REGPARM
chas williams (contractor)
chas@cmf.nrl.navy.mil
Wed, 23 Jun 2004 16:12:11 -0400
In message <20040623200632.GA21076@jadzia.bu.edu>,Matthew Miller writes:
>EIP is at crref+0x46/0x69 [libafs]
> [<43b0c6c4>] osi_Init+0x20/0x35 [libafs]
it probably shouldnt be calling crref() during osi_Init(). the
following patch is probably correct:
Index: afs_osi.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_osi.c,v
retrieving revision 1.44
diff -u -u -r1.44 afs_osi.c
--- afs_osi.c 21 Apr 2004 02:20:21 -0000 1.44
+++ afs_osi.c 23 Jun 2004 20:11:57 -0000
@@ -74,13 +74,14 @@
#endif /* AFS_HPUX_ENV */
if (!afs_osicred_initialized) {
-#if defined(AFS_LINUX26_ENV)
- afs_osi_credp = crref();
-#elif defined(AFS_XBSD_ENV)
+#if defined(AFS_XBSD_ENV)
/* Can't just invent one, must use crget() because of mutex */
afs_osi_credp = crdup(osi_curcred());
#else
memset(&afs_osi_cred, 0, sizeof(struct AFS_UCRED));
+#if defined(AFS_LINUX26_ENV)
+ afs_osi_cred.cr_group_info = groups_alloc(0);
+#endif
crhold(&afs_osi_cred); /* don't let it evaporate */
afs_osi_credp = &afs_osi_cred;
#endif