diff --git a/vmmon-only/include/x86msr.h b/vmmon-only/include/x86msr.h index cfd2ef6..126991a 100644 --- a/vmmon-only/include/x86msr.h +++ b/vmmon-only/include/x86msr.h @@ -68,7 +68,7 @@ typedef struct MSRReply { typedef struct MSRQuery { uint32 msrNum; // IN uint32 numLogicalCPUs; // IN/OUT - MSRReply logicalCPUs[0]; // OUT + MSRReply logicalCPUs[]; // OUT } MSRQuery; #pragma pack(pop) diff --git a/vmnet-only/vmnetInt.h b/vmnet-only/vmnetInt.h index b49c399..f8fbc75 100644 --- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;