>From Malahal <[email protected]>:
Malahal has uploaded this change for review. (
https://review.gerrithub.io/387574
Change subject: Fix freeing the owner twice!
......................................................................
Fix freeing the owner twice!
nfs_client_id_expire() while going through "owner" lists, it places a
refcount on the "owner", but the owner might be in the process of
getting freed! This resurrection of owner (refcount from zero to one)
leads to nfs_client_id_expire and the other thread freeing up the owner!
Example backtrace:
0 0x00007f228548a428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
1 0x00007f228548c02a in __GI_abort () at abort.c:89
2 0x00007f22854cc7ea in __libc_message (do_abort=do_abort@entry=2,
fmt=fmt@entry=0x7f22855e5e98 "*** Error in `%s': %s: 0x%s ***\n") at
../sysdeps/posix/libc_fatal.c:175
3 0x00007f22854d537a in malloc_printerr (ar_ptr=<optimized out>,
ptr=<optimized out>, str=0x7f22855e5f60 "double free or corruption (fasttop)",
action=3) at malloc.c:5006
4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at
malloc.c:3867
5 0x00007f22854d953c in __GI___libc_free (mem=<optimized out>) at malloc.c:2968
6 0x0000561a1f465f33 in gsh_free (p=0x7f1f70112240) at
/home/rkomandu/nfs-ganesha/src/include/abstract_mem.h:271
7 0x0000561a1f467282 in free_state_owner (owner=0x7f1f70112050) at
/home/rkomandu/nfs-ganesha/src/SAL/state_misc.c:841
8 0x0000561a1f467804 in dec_state_owner_ref (owner=0x7f1f70112050) at
/home/rkomandu/nfs-ganesha/src/SAL/state_misc.c:969
9 0x0000561a1f46ec9e in nfs_client_id_expire (clientid=0x7f1f701101f0,
make_stale=false) at /home/rkomandu/nfs-ganesha/src/SAL/nfs4_clientid.c:1071
10 0x0000561a1f42f56b in nfs4_op_setclientid_confirm (op=0x7f1e265257c0,
data=0x7f227bffddc0, resp=0x7f21e8037050) at
/home/rkomandu/nfs-ganesha/src/Protocols/NFS/nfs4_op_setclientid_confirm.c:365
Change-Id: I34e9675260125d4f11c6fdc2bc899f1df673793a
Signed-off-by: Malahal Naineni <[email protected]>
---
M src/SAL/nfs4_clientid.c
M src/SAL/state_misc.c
M src/include/sal_functions.h
3 files changed, 91 insertions(+), 3 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha
refs/changes/74/387574/1
--
To view, visit https://review.gerrithub.io/387574
To unsubscribe, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34e9675260125d4f11c6fdc2bc899f1df673793a
Gerrit-Change-Number: 387574
Gerrit-PatchSet: 1
Gerrit-Owner: Malahal <[email protected]>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel