The Skeleton Key

Caroline Ellis (Kate Hudson) is a New Orleans Hospice Aide who takes the position as caregiver at an isolated plantation house in the bayous of southern Louisiana. The lady of the house, Violet Devereaux (Gena Rowlands), looks after her husband Benjamin Devereaux (John Hurt), who has had a stroke. With some prompting from the family's estate lawyer, Luke Marshall (Peter Sarsgaard), Caroline accepts the position.
Caroline, using a skeleton key that Violet gave her, makes her way to the attic (where Ben had his stroke) and finds a secret room. She discovers dolls, a book of spells, potion jars, and various other magical paraphernalia. Violet reveals to Caroline that the room belonged to two house servants who were employed there 90 years prior. The couple, Mama Cecile (Jeryl Prescott) and Papa Justify (Ron McCall) were renowned practitioners of Hoodoo and were lynched for practicing spells with children. Violet also tells Caroline that they do not keep mirrors in the house because they see the reflection of the servants in them.
Caroline then believes that since Ben believes Hoodoo caused his stroke, she can use Hoodoo, or more specifically Ben's belief in it to reverse the effects. Taking advice from her friend Jill (Joy Bryant), she goes to a local laundromat, known to have a hidden Hoodoo shop, to acquire a defense for Ben. A practitioner teaches her a ritual with items to use to cleanse Ben's illness; when Caroline practices the ritual, Ben regains some of his ability to speak, and begs Caroline to get him away from Violet.
Caroline tells Luke about her suspicions towards Violet, but he rebuffs her idea. They travel to a gas station that Caroline previously noted was lined with brick dust, which she was told is a defense against Hoodoo. A blind woman tells her of the Conjure of Sacrifice, a spell of immortality, in which the caster sacrifices someone and gains the remaining years of their life. Caroline increasingly believes that Ben is in danger, but Luke belittles her fear.
Caroline uses brick dust to confirm her suspicions of Violet and drugs her to keep her out of the way. She tries to escape with Ben, but they find the gates locked. She flees the house by boat and seeks help from Luke, only to discover he is part of the conspiracy with Violet. Luke knocks her out and takes her back to the house. Caroline escapes and scatters brick dust, trapping Luke but Violet manages to enter. Caroline pushes her down the stairs and breaks her legs. Fleeing to the attic, she sets up what she believes is a protective circle, but is informed by Violet that she has simply trapped herself inside, as Violet had planned. Violet confirms that hoodoo cannot work unless one believes, and that she doubts Caroline's protestation that she does not believe. Violet then pushes a mirror at Caroline, which reflects one of the children, then Violet, and lastly Mama Cecile. The two fall unconscious and switch bodies as a recording of the Conjure plays.
Upon waking up, "Caroline" gives "Violet" a liquid that causes a pseudo-stroke so that she can't reveal the truth about Mama Cecile and Papa Justify. When Caroline's friend Jill arrives at the plantation, Luke informs her that Ben and Violet left the house to Caroline, thus allowing Mama Cecile and Papa Justify to continue occupying the house. The film ends with Caroline and Luke looking at each other helplessly, trapped in the dying bodies of Violet and Ben.

Question: who trapped caroline?
Answer: Violet