From: Andrew Morton <akpm@osdl.org>
To: NeilBrown <neilb@cse.unsw.edu.au>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH] kNFSd - 3 of 5 - Allow sunrpc/svc cache init function to modify the "key"
Date: Sat, 7 Feb 2004 01:30:53 -0800 [thread overview]
Message-ID: <20040207013053.781f2dd1.akpm@osdl.org> (raw)
In-Reply-To: <E1AoyIo-0007Fb-00@notabene>
NeilBrown <neilb@cse.unsw.edu.au> wrote:
>
> When adding a item to a sunrpc/svc cache that contains kmalloced
> data it is usefully to move the malloced data out of the key object
> into the new cache object rather than copying (as then we would need to
> cope with kmalloc failure and such). This means modifying the original.
>
> If the kmalloced data forms part of the key, then we must not move the data out until
> after the key isn't needed any more. So this patch moves the call to "INIT" on a
> new item (which fills in the key) to *after* the item has been found (or not), and
> also makes sure we only call the HASH function once.
> Thanks to "J. Bruce Fields" <bfields@fieldses.org>
>
> also
>
> 1/ remove unnecessary assignment
> 2/ fix comments that lag behind implementation.
Whether or not patch #2 is applied, this one causes a deadlock when
exportfs is running.
(gdb) bt
#0 gdb_interrupt (irq=-1068954208, dev_id=0x0, regs=0xce98de98) at arch/i386/lib/kgdb_serial.c:198
#1 0xc010de23 in handle_IRQ_event (irq=4, regs=0xce98de98, action=0x3) at arch/i386/kernel/irq.c:229
#2 0xc010e1e7 in do_IRQ (regs=
{ebx = -1068657432, ecx = 315736640, edx = 0, esi = -1047921116, edi = 1835953411, ebp = -828842280, eax = -1068657432, xds = 123, xes = 123, orig_eax = -252, eip = -1072651591, xcs = 96, eflags = 647, esp = -1072540272, xss = 0}) at arch/i386/kernel/irq.c:493
#3 0xc010c368 in common_interrupt () at /tmp/ccc0QsD2.s:2044
#4 0xc03e8c7a in auth_domain_lookup (item=0xc189fe40, set=2) at net/sunrpc/svcauth.c:145
#5 0xc03e8d92 in unix_domain_find (name=0xcf210004 "mnm") at net/sunrpc/svcauth_unix.c:62
#6 0xc020da04 in exp_addclient (ncp=0xcf210004) at fs/nfsd/export.c:1093
#7 0xc0205c94 in TA_write (file=0xce3a7880, buf=0xbfffd534 "mnm", size=1136, pos=0xce3a78a0)
at fs/nfsd/nfsctl.c:122
#8 0xc018f40c in sys_nfsservctl (cmd=-835028864, arg=0x3f8, res=0x0) at fs/nfsctl.c:109
gdb doesn't show it, but we're actually stuck in __write_lock_failed().
I'd be suspecting that the rwlock in DefineCacheLookup() is not
initialised.
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2004-02-07 9:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-06 5:13 [PATCH] kNFSd - 0 of 5 - Introduction NeilBrown
2004-02-06 5:13 ` [PATCH] kNFSd - 1 of 5 - Fix possible scheduling_while_atomic in cache.c NeilBrown
2004-02-06 5:13 ` [PATCH] kNFSd - 2 of 5 - ip_map_init does a kmalloc which isn't checked NeilBrown
2004-02-07 9:24 ` Andrew Morton
2004-02-08 4:37 ` J. Bruce Fields
2004-02-08 5:46 ` Andrew Morton
2004-02-08 5:59 ` J. Bruce Fields
2004-02-08 20:30 ` J. Bruce Fields
2004-02-08 20:38 ` [PATCH] kNFSd - 1 of 5 - Fix possible scheduling_while_atomic in cache.c J. Bruce Fields
2004-02-08 20:41 ` [PATCH] kNFSd - 2 of 5 - Allow sunrpc/svc cache init function to modify the "key" J. Bruce Fields
2004-02-08 20:43 ` [PATCH] kNFSd - 3 of 5 - ip_map_init does a kmalloc which isn't checked J. Bruce Fields
2004-02-08 20:46 ` [PATCH] kNFSd - 4 of 5 - convert NFS /proc interfaces to seq_file J. Bruce Fields
2004-02-08 20:48 ` [PATCH] kNFSd - 5 of 5 - fix build problems in nfs w/o proc_fs J. Bruce Fields
2004-02-09 17:32 ` Re: [PATCH] kNFSd - 2 of 5 - ip_map_init does a kmalloc which isn't checked Andrew Morton
2004-02-09 21:51 ` J. Bruce Fields
2004-02-09 22:10 ` Andrew Morton
2004-02-06 5:13 ` [PATCH] kNFSd - 3 of 5 - Allow sunrpc/svc cache init function to modify the "key" NeilBrown
2004-02-07 9:30 ` Andrew Morton [this message]
2004-02-06 5:13 ` [PATCH] kNFSd - 5 of 5 - fix build problems in nfs w/o proc_fs on 2.6.0-test5 NeilBrown
2004-02-06 5:13 ` [PATCH] kNFSd - 4 of 5 - convert NFS /proc interfaces to seq_file NeilBrown
2004-02-06 5:32 ` [PATCH] kNFSd - 0 of 5 - Introduction Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040207013053.781f2dd1.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=neilb@cse.unsw.edu.au \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.