From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbdKEWEo (ORCPT ); Sun, 5 Nov 2017 17:04:44 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:54710 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750769AbdKEWEm (ORCPT ); Sun, 5 Nov 2017 17:04:42 -0500 X-Google-Smtp-Source: ABhQp+SXkJvgqC0z/4y/8dfheIMzICWykdkS/E1MSWM+oMshsfQZIlCUIrpYtdkdRLTc0Hi0fb2aSw== Date: Sun, 5 Nov 2017 14:04:39 -0800 From: Eric Biggers To: Greg KH Cc: syzbot , jslaby@suse.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: kernel panic: n_tty: init_tty Message-ID: <20171105220439.GA11631@zzz.localdomain> References: <94eb2c0630b4161a5e055d38a2e3@google.com> <20171105103434.GC1487@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171105103434.GC1487@kroah.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 05, 2017 at 11:34:34AM +0100, Greg KH wrote: > On Sun, Nov 05, 2017 at 01:05:02AM -0800, syzbot wrote: > > Hello, > > > > syzkaller hit the following crash on > > b5ac3beb5a9f0ef0ea64cd85faf94c0dc4de0e42 > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > > compiler: gcc (GCC) 7.1.1 20170620 > > .config is attached > > Raw console output is attached. > > And again, this would be nicer to provide something that I could > reproduce this with... > > thanks, > > greg k-h > I just saw the same crash running syzkaller. It was preceded by a fault injection in tty_ldisc_get() here: ld = kmalloc(sizeof(struct tty_ldisc), GFP_KERNEL); if (ld == NULL) { put_ldops(ldops); return ERR_PTR(-ENOMEM); } So then it panics at: if (IS_ERR(ld)) panic("n_tty: init_tty"); It seems that syzkaller needs to do a better job reproducing and reporting bugs that are only reproducible with fault injection. But either way, this is a bug; panic() is not an acceptable way of handling kmalloc failure. Eric