# git rev-parse -q --verify ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e^{commit} ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e already have revision, skipping fetch # git checkout -q -f -B kisskb ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e # git clean -qxdf # < git log -1 # commit ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e # Author: Thomas Weißschuh # Date: Mon Feb 20 06:46:12 2023 +0000 # # vc_screen: don't clobber return value in vcs_read # # Commit 226fae124b2d ("vc_screen: move load of struct vc_data pointer in # vcs_read() to avoid UAF") moved the call to vcs_vc() into the loop. # # While doing this it also moved the unconditional assignment of # # ret = -ENXIO; # # This unconditional assignment was valid outside the loop but within it # it clobbers the actual value of ret. # # To avoid this only assign "ret = -ENXIO" when actually needed. # # [ Also, the 'goto unlock_out" needs to be just a "break", so that it # does the right thing when it exits on later iterations when partial # success has happened - Linus ] # # Reported-by: Storm Dragon # Link: https://lore.kernel.org/lkml/Y%2FKS6vdql2pIsCiI@hotmail.com/ # Fixes: 226fae124b2d ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF") # Signed-off-by: Thomas Weißschuh # Link: https://lore.kernel.org/lkml/64981d94-d00c-4b31-9063-43ad0a384bde@t-8ch.de/ # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e # < make -s -j 120 ARCH=mips O=/kisskb/build/linus_64r2_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- 64r2_defconfig ./.config.64r2_defconfig:96:warning: override: CPU_BIG_ENDIAN changes choice state .config:95:warning: override: CPU_BIG_ENDIAN changes choice state # < make -s -j 120 ARCH=mips O=/kisskb/build/linus_64r2_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- help # make -s -j 120 ARCH=mips O=/kisskb/build/linus_64r2_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- olddefconfig # make -s -j 120 ARCH=mips O=/kisskb/build/linus_64r2_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- Completed OK # rm -rf /kisskb/build/linus_64r2_defconfig_mips-gcc8 # Build took: 0:01:17.926262