Crazy rotation bone problem im rigging a leg using Inverse Kinematics, i put on the controller bone in the feet and the pole bone in the knee, but when i move the leg to much to the top the upper leg bone goes crazy and twist the whole leg, the only bone moving like crazy is the upper one, how can i fix that? 
i put some pictures and the Blender File if it helps

https://www.mediafire.com/?viz059q15ofn5dd
The knee is pointing towards the pole target as set in the IK constraint. You need to lift the pole target higher than the knee when you raise the foot.