Lines Matching refs:tk
328 static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags)
330 struct task_struct *t = tk->tsk;
331 short addr_lsb = tk->size_shift;
339 (void __user *)tk->addr, addr_lsb);
349 ret = send_sig_mceerr(BUS_MCEERR_AO, (void __user *)tk->addr,
435 struct to_kill *tk;
437 tk = kmalloc(sizeof(struct to_kill), GFP_ATOMIC);
438 if (!tk) {
443 tk->addr = ksm_addr ? ksm_addr : page_address_in_vma(p, vma);
446 tk->addr = vma_pgoff_address(fsdax_pgoff, 1, vma);
447 tk->size_shift = dev_pagemap_mapping_shift(vma, tk->addr);
449 tk->size_shift = page_shift(compound_head(p));
452 * Send SIGKILL if "tk->addr == -EFAULT". Also, as
453 * "tk->size_shift" is always non-zero for !is_zone_device_page(),
454 * so "tk->size_shift == 0" effectively checks no mapping on
461 if (tk->addr == -EFAULT) {
464 } else if (tk->size_shift == 0) {
465 kfree(tk);
470 tk->tsk = tsk;
471 list_add_tail(&tk->nd, to_kill);
485 struct to_kill *tk, *next;
487 list_for_each_entry_safe(tk, next, to_kill, nd) {
488 if (tk->tsk == tsk)
513 struct to_kill *tk, *next;
515 list_for_each_entry_safe(tk, next, to_kill, nd) {
522 if (fail || tk->addr == -EFAULT) {
524 pfn, tk->tsk->comm, tk->tsk->pid);
526 tk->tsk, PIDTYPE_PID);
535 else if (kill_proc(tk, pfn, flags) < 0)
537 pfn, tk->tsk->comm, tk->tsk->pid);
539 list_del(&tk->nd);
540 put_task_struct(tk->tsk);
541 kfree(tk);
720 struct to_kill tk;
725 static void set_to_kill(struct to_kill *tk, unsigned long addr, short shift)
727 tk->addr = addr;
728 tk->size_shift = shift;
732 unsigned long poisoned_pfn, struct to_kill *tk)
748 set_to_kill(tk, addr, shift);
765 set_to_kill(&hwp->tk, hwpoison_vaddr, PAGE_SHIFT);
800 hwp->pfn, &hwp->tk);
820 hwp->pfn, &hwp->tk);
852 priv.tk.tsk = p;
860 if (ret == 1 && priv.tk.addr)
861 kill_proc(&priv.tk, pfn, flags);
1693 struct to_kill *tk;
1696 list_for_each_entry(tk, to_kill, nd)
1697 if (tk->size_shift)
1698 size = max(size, 1UL << tk->size_shift);