Tess,
In part it depends on how much or how little the original photo was transformed during the process of painting. If it’s sufficiently “transformative”, it’s not a problem.
Also, as Bob mentioned, competition is a factor. Is a one-off oil painting of a rock star going to hurt the market for the original photo, hampering the photographer’s opportunity to profit from it? Probably not.
Wikipedia has a good article about art appropriation and copyright Link.
P.S. - R.I.P. David Bowie…