Commit 9cf2f84
KVM: arm64: vgic: Wrap vgic_its_create() with config_lock
vgic_its_create() changes the vgic state without holding the
config_lock, which triggers a lockdep warning in vgic_v4_init():
[ 358.667941] WARNING: CPU: 3 PID: 178 at arch/arm64/kvm/vgic/vgic-v4.c:245 vgic_v4_init+0x15c/0x7a8
...
[ 358.707410] vgic_v4_init+0x15c/0x7a8
[ 358.708550] vgic_its_create+0x37c/0x4a4
[ 358.709640] kvm_vm_ioctl+0x1518/0x2d80
[ 358.710688] __arm64_sys_ioctl+0x7ac/0x1ba8
[ 358.711960] invoke_syscall.constprop.0+0x70/0x1e0
[ 358.713245] do_el0_svc+0xe4/0x2d4
[ 358.714289] el0_svc+0x44/0x8c
[ 358.715329] el0t_64_sync_handler+0xf4/0x120
[ 358.716615] el0t_64_sync+0x190/0x194
Wrap the whole of vgic_its_create() with config_lock since, in addition
to calling vgic_v4_init(), it also modifies the global kvm->arch.vgic
state.
Fixes: f003277 ("KVM: arm64: Use config_lock to protect vgic state")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230518100914.2837292-3-jean-philippe@linaro.org1 parent 59112e9 commit 9cf2f84
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1936 | 1936 | | |
1937 | 1937 | | |
1938 | 1938 | | |
| 1939 | + | |
1939 | 1940 | | |
1940 | 1941 | | |
1941 | 1942 | | |
| |||
1945 | 1946 | | |
1946 | 1947 | | |
1947 | 1948 | | |
| 1949 | + | |
| 1950 | + | |
1948 | 1951 | | |
1949 | | - | |
| 1952 | + | |
1950 | 1953 | | |
| 1954 | + | |
1951 | 1955 | | |
1952 | 1956 | | |
1953 | 1957 | | |
| |||
1960 | 1964 | | |
1961 | 1965 | | |
1962 | 1966 | | |
1963 | | - | |
1964 | 1967 | | |
1965 | 1968 | | |
1966 | 1969 | | |
1967 | 1970 | | |
1968 | | - | |
1969 | 1971 | | |
1970 | 1972 | | |
1971 | 1973 | | |
| |||
1986 | 1988 | | |
1987 | 1989 | | |
1988 | 1990 | | |
1989 | | - | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
1990 | 1996 | | |
1991 | 1997 | | |
1992 | 1998 | | |
| |||
0 commit comments