--- y/include/linux/sched.h +++ s/include/linux/sched.h @@ -933,6 +933,9 @@ struct task_struct { /* Recursion prevention for eventfd_signal() */ unsigned in_eventfd_signal:1; #endif +#ifdef CONFIG_FAULT_INJECTION + unsigned fi_no_dump:1; +#endif unsigned long atomic_flags; /* Flags requiring atomic access. */ --- y/lib/fault-inject.c +++ x/lib/fault-inject.c @@ -41,6 +41,8 @@ EXPORT_SYMBOL_GPL(setup_fault_attr); static void fail_dump(struct fault_attr *attr) { + if (current->fi_no_dump) + return; if (attr->verbose > 0 && __ratelimit(&attr->ratelimit_state)) { printk(KERN_NOTICE "FAULT_INJECTION: forcing a failure.\n" "name %pd, interval %lu, probability %lu, " --- y/drivers/tty/pty.c +++ p/drivers/tty/pty.c @@ -117,10 +117,17 @@ static int pty_write(struct tty_struct * return 0; if (c > 0) { +#ifdef CONFIG_FAULT_INJECTION + current->fi_no_dump = 1; +#endif spin_lock_irqsave(&to->port->lock, flags); /* Stuff the data into the input queue of the other end */ c = tty_insert_flip_string(to->port, buf, c); spin_unlock_irqrestore(&to->port->lock, flags); + +#ifdef CONFIG_FAULT_INJECTION + current->fi_no_dump = 0; +#endif /* And shovel */ if (c) tty_flip_buffer_push(to->port); --- y/include/linux/pagemap.h +++ p/include/linux/pagemap.h @@ -1085,6 +1085,8 @@ static inline struct page *readahead_pag { struct folio *folio = __readahead_folio(ractl); + if (!folio) + return NULL; return &folio->page; } --- y/net/unix/af_unix.c +++ a/net/unix/af_unix.c @@ -970,15 +970,15 @@ static int unix_autobind(struct socket * goto out; err = -ENOMEM; - addr = kzalloc(sizeof(*addr) + sizeof(short) + 16, GFP_KERNEL); + addr = kzalloc(sizeof(*addr) + 16 + offsetof(struct sockaddr_un, sun_path), GFP_KERNEL); if (!addr) goto out; + addr->len = offsetof(struct sockaddr_un, sun_path) + 6; addr->name->sun_family = AF_UNIX; refcount_set(&addr->refcnt, 1); retry: - addr->len = sprintf(addr->name->sun_path+1, "%05x", ordernum) + 1 + sizeof(short); addr->hash = unix_hash_fold(csum_partial(addr->name, addr->len, 0)); addr->hash ^= sk->sk_type;