This is a complementary patch to
8670db7 ("BUG/MAJOR: hlua: improper lock
usage with hlua_ctx_resume()") for hlua_filter_new().
Indeed, the HLUA_E_ERRMSG case still relies on the lua stack but didn't
take the lock to do so.
This should be backported up to 2.6.
filter->ctx = flt_ctx;
break;
case HLUA_E_ERRMSG:
+ hlua_lock(s->hlua);
SEND_ERR(s->be, "Lua filter '%s' : %s.\n", conf->reg->name, hlua_tostring_safe(s->hlua->T, -1));
+ hlua_unlock(s->hlua);
ret = -1;
goto end;
case HLUA_E_ETMOUT: