ima: replace iint spinblock with rwlock/read_lock