rod for one's back

(idiomatic) The means of one's own punishment or downfall.

Example: 1866, Henry Kingsley, "Silcote of Silcotes", MacMillan's Magazine, Vol. 14, Sept., p. 324:
  "Silcote, you are making a rod for your back in your treatment of that child. She'll live to break your heart for you."
1997 Oct. 4, John Williams, "Blair Maps Out Party's Long March," The Mirror (UK):
  Nobody is more wary of Tony Blair's record ratings and the illusion of the Prime Minister's omnipotence than Tony Blair himself. "He thinks his approval ratings are a rod for his back," says one adviser.
2009 Feb. 2, Dita De Boni, "Keeping Mum: Sparing the Rod?," New Zealand Herald:
  I can't get over how you parents let your children run riot over you. There must be some discipline in this surely, otherwise you will make a rod for your back when they get older.