Obama's mistake wasn't pulling out of Iraq--we should have never even been there in the first place.
His mistake was abandoning it politically after he was elected; i.e., Bush had a working relationship with Maliki whereas Obama just kind of ignored him, wanting to be done with this whole Iraq thing. Which is not to say that Maliki would have been successful with more guidance from us, but too late now.
The reality is that we are back to 9/10, but this time with another group and we know who they are and what they want to do. Let's hope we do something about it. And that something isn't monumentally stupid like invading and occupying countries.