Sunderland midfielder Sebastian Larsson has signed a contract extension which will keep him with the club until 2017.