diff options
| author | Jakub Kicinski <[email protected]> | 2021-04-17 17:42:54 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2021-04-17 18:08:07 +0000 |
| commit | 8203c7ce4ef2840929d38b447b4ccd384727f92b (patch) | |
| tree | 07b4079057e035a4063788f120665f5e42967e8e /mm/internal.h | |
| parent | Merge branch 'mptcp-fixes-and-tracepoints' (diff) | |
| parent | Merge tag 'net-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
| download | kernel-8203c7ce4ef2840929d38b447b4ccd384727f92b.tar.gz kernel-8203c7ce4ef2840929d38b447b4ccd384727f92b.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
- keep the ZC code, drop the code related to reinit
net/bridge/netfilter/ebtables.c
- fix build after move to net_generic
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'mm/internal.h')
| -rw-r--r-- | mm/internal.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h index 1432feec62df..cb3c5e0a7799 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -97,6 +97,26 @@ static inline void set_page_refcounted(struct page *page) set_page_count(page, 1); } +/* + * When kernel touch the user page, the user page may be have been marked + * poison but still mapped in user space, if without this page, the kernel + * can guarantee the data integrity and operation success, the kernel is + * better to check the posion status and avoid touching it, be good not to + * panic, coredump for process fatal signal is a sample case matching this + * scenario. Or if kernel can't guarantee the data integrity, it's better + * not to call this function, let kernel touch the poison page and get to + * panic. + */ +static inline bool is_page_poisoned(struct page *page) +{ + if (PageHWPoison(page)) + return true; + else if (PageHuge(page) && PageHWPoison(compound_head(page))) + return true; + + return false; +} + extern unsigned long highest_memmap_pfn; /* |
