It is perfectly legal. You do have to be aware that when flying for extended periods (I personally dont thing 9 hours would count) there is a catch with the rules. Recently the FAA has cited a few pilots under 91.13, Careless or reckless operation when flying for extended periods in this type of case.