I'm sure it's been a standing request/offer from the U.S. and ROK to China for probably more than a decade now that if China were to take them over we'd be cool with it.
We've probably also been floating overtures that if we preemptively took out the DPRK's nuclear capability, and Kim, that we'd let China have a new puppet state in exchange for not interfering, because they want the buffer so badly.
Meanwhile Kim and the DPRK are probably desperately threatening the PRC with whatever he can, refugee flood, flood of illegal narcotics, counterfeit Yuan bills, all of the above... whatever, if they don't keep backing him. And a chunk of China has been in range of even their earlier nuclear capabilities as much as the ROK is.
China has certainly been willing to mix it up with other Communist countries if they thought it was in their interests. They had that nasty little skirmish/border war/invasion of Vietnam in '79, in retaliation for them invading Cambodia and overturning the Khmer Rouge. Although times are a bit different, that was when China still had had some semblance of a Maoist ideological orientation, and they saw Vietnam's involvement in Cambodia as an attempt at Soviet meddling/hegemony in SE Asia.
Didn't work, seeing as Vietnam occupied Cambodia up until '89. Total non sequitur, but crap has to be pretty bad for a Communist Vietnamese occupation to be a significant improvement in your political situation.