Wrap the set attributes function in interrupt disable/restore, oops.