Revision 70fb3e41a97a5fecc0aedc9a429479d702c3ab66 authored by Ben Gardon on 15 March 2021, 23:38:00 UTC, committed by Paolo Bonzini on 16 March 2021, 18:14:59 UTC
The pt passed into handle_removed_tdp_mmu_page does not need RCU protection, as it is not at any risk of being freed by another thread at that point. However, the implicit cast from tdp_sptep_t to u64 * dropped the __rcu annotation without a proper rcu_derefrence. Fix this by passing the pt as a tdp_ptep_t and then rcu_dereferencing it in the function. Suggested-by: Sean Christopherson <seanjc@google.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ben Gardon <bgardon@google.com> Message-Id: <20210315233803.2706477-2-bgardon@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 1e28eed
syscalltbl.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
#
# Generate a syscall table header.
#
# Each line of the syscall table should have the following format:
#
# NR ABI NAME [NATIVE] [COMPAT]
#
# NR syscall number
# ABI ABI name
# NAME syscall name
# NATIVE native entry point (optional)
# COMPAT compat entry point (optional)
set -e
usage() {
echo >&2 "usage: $0 [--abis ABIS] INFILE OUTFILE" >&2
echo >&2
echo >&2 " INFILE input syscall table"
echo >&2 " OUTFILE output header file"
echo >&2
echo >&2 "options:"
echo >&2 " --abis ABIS ABI(s) to handle (By default, all lines are handled)"
exit 1
}
# default unless specified by options
abis=
while [ $# -gt 0 ]
do
case $1 in
--abis)
abis=$(echo "($2)" | tr ',' '|')
shift 2;;
-*)
echo "$1: unknown option" >&2
usage;;
*)
break;;
esac
done
if [ $# -ne 2 ]; then
usage
fi
infile="$1"
outfile="$2"
nxt=0
grep -E "^[0-9]+[[:space:]]+$abis" "$infile" | sort -n | {
while read nr abi name native compat ; do
while [ $nxt -lt $nr ]; do
echo "__SYSCALL($nxt, sys_ni_syscall)"
nxt=$((nxt + 1))
done
if [ -n "$compat" ]; then
echo "__SYSCALL_WITH_COMPAT($nr, $native, $compat)"
elif [ -n "$native" ]; then
echo "__SYSCALL($nr, $native)"
else
echo "__SYSCALL($nr, sys_ni_syscall)"
fi
nxt=$((nr + 1))
done
} > "$outfile"
Computing file changes ...