Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix locking issues #135

Merged
merged 4 commits into from
Oct 20, 2020
Merged

fix locking issues #135

merged 4 commits into from
Oct 20, 2020

Conversation

haitaohuang
Copy link
Contributor

No description provided.

Fix the issue further discussed in:

1. https://lore.kernel.org/linux-sgx/op.0rwbv916wjvjmi@mqcpg7oapc828.gar.corp.intel.com/
2. https://lore.kernel.org/linux-sgx/20201003195440.GD20115@casper.infradead.org/

Reported-by: Haitao Huang <haitao.huang@linux.intel.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Jethro Beekman <jethro@fortanix.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
mmput_async is required to avoid deadlock, but it is not exported for direct use in some older kernels.

Use kallsyms_lookup_name to resolve mmput_async for kernels below 5.4
Note: The mainline kernel does not export it, but newer distro kernels like Ubuntu kernel 5.4 do.
Note: The mainline kernel 5.7 and up do not export kallsyms_lookup_name, so this method can't be used for those kernels.

Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant