There should be no danger with an Adaptall adapter for K mount. I think there are but two adapters for adaptall - one with the PKA and PK (though i think the PKA is pricey). Get the one appropriate for your lens and pocketbook.
For the m42 screwmount:
https://www.pentaxforums.com/forums/pentax-lens-articles/3800-can-i-use-m42-s...unt-d-slr.html
On the Km you'll have to enter the menu: C > 3 > 19. Using aperture ring.
Change that setting to 2 to allow use of the aperture ring. This will have no effect on anything except manual aperture lenses. After doing that you can use the lens in manual mode. The light meter is triggered by the "AV" button. You can also use the Av mode, but you'll have to either short the topmost contact with some metal, or set +2 EV to compensate for the underexposure.
[edit] And yes, you'll have to be in manual on the lens so you operate the aperture. But the light meter will work no problem except for the underexposure I mentioned in Av mode.