Exploit databaseDownload repository ZIP
GH-a4473dcd9930d1ae4c0775adc06b1cfb
satheesh575555/linux-4.19.72_cve-2022-36946
Sources for CVE-2022-36946
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files120
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- bpf/
- cgroup/
- configs/
- debug/
- dma/
- events/
- gcov/
- irq/
- livepatch/
- locking/
- power/
- printk/
- rcu/
- sched/
- time/
- trace/
- .gitignore
- Kconfig.freezer
- Kconfig.hz
- Kconfig.locks
- Kconfig.preempt
- Makefile
- acct.c
- async.c
- audit.c
- audit.h
- audit_fsnotify.c
- audit_tree.c
- audit_watch.c
- auditfilter.c
- auditsc.c
- backtracetest.c
- bounds.c
- capability.c
- compat.c
- configs.c
- context_tracking.c
- cpu.c
- cpu_pm.c
- crash_core.c
- crash_dump.c
- cred.c
- delayacct.c
- dma.c
- elfcore.c
- exec_domain.c
- exit.c
- extable.c
- fail_function.c
- fork.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
kernel/user-return-notifier.c
C · 1,338 bytes
#include <linux/user-return-notifier.h>
#include <linux/percpu.h>
#include <linux/sched.h>
#include <linux/export.h>
static DEFINE_PER_CPU(struct hlist_head, return_notifier_list);
/*
* Request a notification when the current cpu returns to userspace. Must be
* called in atomic context. The notifier will also be called in atomic
* context.
*/
void user_return_notifier_register(struct user_return_notifier *urn)
{
set_tsk_thread_flag(current, TIF_USER_RETURN_NOTIFY);
hlist_add_head(&urn->link, this_cpu_ptr(&return_notifier_list));
}
EXPORT_SYMBOL_GPL(user_return_notifier_register);
/*
* Removes a registered user return notifier. Must be called from atomic
* context, and from the same cpu registration occurred in.
*/
void user_return_notifier_unregister(struct user_return_notifier *urn)
{
hlist_del(&urn->link);
if (hlist_empty(this_cpu_ptr(&return_notifier_list)))
clear_tsk_thread_flag(current, TIF_USER_RETURN_NOTIFY);
}
EXPORT_SYMBOL_GPL(user_return_notifier_unregister);
/* Calls registered user return notifiers */
void fire_user_return_notifiers(void)
{
struct user_return_notifier *urn;
struct hlist_node *tmp2;
struct hlist_head *head;
head = &get_cpu_var(return_notifier_list);
hlist_for_each_entry_safe(urn, tmp2, head, link)
urn->on_user_return(urn);
put_cpu_var(return_notifier_list);
}