  An instability in the presence of matter in theories of gravity which include
a 1/R correction in the gravitational action has been found by Dolgov and
Kawasaki. In the present paper this instability is discussed for f(R) gravity
in general. We focus on the Palatini formalism of the theory and it is shown
that no such instability occurs in this version of f(R) gravity. The reasons
for the appearance of the instability in the metric but not in the Palatini
formalism are fully investigated.
