-/* The free page list lock protected variables prepend the lock. */
-static unsigned long sgx_nr_free_pages;
+atomic_long_t sgx_nr_free_pages = ATOMIC_LONG_INIT(0);
You accidentally lost the "static" here. This is still only accessed within this
one source file.
Otherwise:
Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>