Agree with @yongsheng It seems reuse the upstream code and leave the fix to upstream is a better solution.