OpenSolaris

Printable Version Enter a New Search
Bug ID 6637687
Synopsis Recursive mutex_enter() in SCTP's sockfs close function
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:tcp-ip
Keywords
Responsible Engineer Kacheong Poon
Reported Against
Duplicate Of
Introduced In solaris_10
Commit to Fix snv_99
Fixed In snv_99
Release Fixed solaris_nevada(snv_99)
Related Bugs 5014658
Submit Date 5-December-2007
Last Update Date 24-September-2008
Description
In the SCTP's sockfs close function (socksctpv_close in uts/common/fs/sockfs/socksctpvnops.c) in the current on10 gate, there is recursive mutex_enter() call in case so->so_count != 0 as shown below:

static int
socksctpv_close(struct vnode *vp, int flag, int count, offset_t offset,
    struct cred *cr)
{
	[...]
	mutex_enter(&so->so_lock);
	so_lock_single(so);	/* Set SOLOCKED */
	ASSERT(so->so_count > 0);
	so->so_count--;			/* one fewer open reference */

	dprint(2, ("socksctpv_close: %p so_count %d\n", so, so->so_count));

	if (so->so_count == 0) {
	[...]
	}
	mutex_enter(&so->so_lock);				<---- RECURSIVE MUTEX_ENTER
	so_unlock_single(so, SOLOCKED);
	mutex_exit(&so->so_lock);

	return (0);
}
Work Around
N/A
Comments
N/A