Lines Matching refs:tk

328 static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags)  in kill_proc()  argument
330 struct task_struct *t = tk->tsk; in kill_proc()
331 short addr_lsb = tk->size_shift; in kill_proc()
339 (void __user *)tk->addr, addr_lsb); in kill_proc()
349 ret = send_sig_mceerr(BUS_MCEERR_AO, (void __user *)tk->addr, in kill_proc()
435 struct to_kill *tk; in __add_to_kill() local
437 tk = kmalloc(sizeof(struct to_kill), GFP_ATOMIC); in __add_to_kill()
438 if (!tk) { in __add_to_kill()
443 tk->addr = ksm_addr ? ksm_addr : page_address_in_vma(p, vma); in __add_to_kill()
446 tk->addr = vma_pgoff_address(fsdax_pgoff, 1, vma); in __add_to_kill()
447 tk->size_shift = dev_pagemap_mapping_shift(vma, tk->addr); in __add_to_kill()
449 tk->size_shift = page_shift(compound_head(p)); in __add_to_kill()
461 if (tk->addr == -EFAULT) { in __add_to_kill()
464 } else if (tk->size_shift == 0) { in __add_to_kill()
465 kfree(tk); in __add_to_kill()
470 tk->tsk = tsk; in __add_to_kill()
471 list_add_tail(&tk->nd, to_kill); in __add_to_kill()
485 struct to_kill *tk, *next; in task_in_to_kill_list() local
487 list_for_each_entry_safe(tk, next, to_kill, nd) { in task_in_to_kill_list()
488 if (tk->tsk == tsk) in task_in_to_kill_list()
513 struct to_kill *tk, *next; in kill_procs() local
515 list_for_each_entry_safe(tk, next, to_kill, nd) { in kill_procs()
522 if (fail || tk->addr == -EFAULT) { in kill_procs()
524 pfn, tk->tsk->comm, tk->tsk->pid); in kill_procs()
526 tk->tsk, PIDTYPE_PID); in kill_procs()
535 else if (kill_proc(tk, pfn, flags) < 0) in kill_procs()
537 pfn, tk->tsk->comm, tk->tsk->pid); in kill_procs()
539 list_del(&tk->nd); in kill_procs()
540 put_task_struct(tk->tsk); in kill_procs()
541 kfree(tk); in kill_procs()
720 struct to_kill tk; member
725 static void set_to_kill(struct to_kill *tk, unsigned long addr, short shift) in set_to_kill() argument
727 tk->addr = addr; in set_to_kill()
728 tk->size_shift = shift; in set_to_kill()
732 unsigned long poisoned_pfn, struct to_kill *tk) in check_hwpoisoned_entry() argument
748 set_to_kill(tk, addr, shift); in check_hwpoisoned_entry()
765 set_to_kill(&hwp->tk, hwpoison_vaddr, PAGE_SHIFT); in check_hwpoisoned_pmd_entry()
800 hwp->pfn, &hwp->tk); in hwpoison_pte_range()
820 hwp->pfn, &hwp->tk); in hwpoison_hugetlb_range()
852 priv.tk.tsk = p; in kill_accessing_process()
860 if (ret == 1 && priv.tk.addr) in kill_accessing_process()
861 kill_proc(&priv.tk, pfn, flags); in kill_accessing_process()
1693 struct to_kill *tk; in unmap_and_kill() local
1696 list_for_each_entry(tk, to_kill, nd) in unmap_and_kill()
1697 if (tk->size_shift) in unmap_and_kill()
1698 size = max(size, 1UL << tk->size_shift); in unmap_and_kill()