upstream commit 089cfb05ec350505ee84a99d567474c5bdc0505e