OpenSolaris

Printable Version Enter a New Search
Bug ID 6651635
Synopsis macro KSSL_ENQUEUE_MP() is unsafe after 6556447
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel_ssl:other
Keywords rtiq_regression
Responsible Engineer Vladimir Kotal
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_83
Fixed In snv_83
Release Fixed solaris_nevada(snv_83)
Related Bugs 6556447 , 6647517 , 6651694
Submit Date 17-January-2008
Last Update Date 13-February-2008
Description
The fix for 6556447 changed KSSL_ENQUEUE_MP() via:

#define KSSL_ENQUEUE_MP(ssl, mp)                                        \
        DTRACE_PROBE1(kssl__i__enqueue_mp, mblk_t *, mp);               \
        if ((ssl)->rec_ass_tail == NULL) {                              \
                (ssl)->rec_ass_head = (mp);                             \
                (ssl)->rec_ass_tail = (mp);                             \
        } else {                                                        \
                (ssl)->rec_ass_tail->b_cont = (mp);                     \
                (ssl)->rec_ass_tail = (mp);                             \
        }

I.e. it inserted the DTRACE_PROBE1() call.

That makes the macro unsafe to use in situations like:

	if (condition)
		KSSL_ENQUEUE_MP(ssl, mp);

because of missing '{}' around the whole block - only the DTRACE_PROBE1() would be executed under the if(), the main part of the macro were outside.

A previous example where such a sourcechange lead to panics is 6647517.
Work Around
N/A
Comments
N/A