If I remember correctly River had just graduated the day she was put in the astronaut suit and forced to kill the Doctor. So...she was a Professor. In Flesh and Stone, the Doctor and River talk on the beach and the Doctor gives her a "spoiler" introducing her to Amy as Professor Song, coming as a pleasant surprise to River. We later learn she is already in prison at this point. Is this a mistake in the order of events? Or am I missing something?
River is frequently referred to as "Doctor Song" during "The Time of Angels". So I think it's safe to say that she already has her degree by then, and just hasn't gotten a post that entitles her to be called "professor."
It's also worth noting that the title of professor denotes very different levels of seniority in different countries. While pretty much anyone with a Ph.D. and an academic post might be referred to as "Professor So-and-so" in North America, only a very senior academic would get the title in most of northern Europe (including the U.K.). Given the target audience of Doctor Who, I think the second usage is probably the implied one; that is, she might already be a lecturer at some college as of "The Time of Angels", but there's still an endowed chair in her future...
When she is put into the astronaut suit, she has just received her PhD, making her Doctor River Song. She "kills" the doctor and is put in prison. Later, the doctor begins to delete his record from history, siting River saying that he "got too big." With no record of his having existed, and therefore could not have been killed, Stormcage releases River. It is after this that she pursues her position of professor.