inline kernel cleanup