Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752213Ab3CJLuO (ORCPT ); Sun, 10 Mar 2013 07:50:14 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:52972 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751778Ab3CJLuM (ORCPT ); Sun, 10 Mar 2013 07:50:12 -0400 Date: Sun, 10 Mar 2013 04:50:06 -0700 From: Tejun Heo To: Ming Lei Cc: Tommi Rantala , Greg KH , Jens Axboe , Andrew Morton , Guo Chao , "Eric W. Biederman" , LKML , Dave Jones Subject: Re: kernel BUG at fs/sysfs/group.c:65! Message-ID: <20130310115006.GA24522@htj.dyndns.org> References: <20130308204113.GA15334@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1265 Lines: 32 (cc'ing Jens) Hello, On Sun, Mar 10, 2013 at 04:53:11PM +0800, Ming Lei wrote: > On Sun, Mar 10, 2013 at 12:36 AM, Tommi Rantala wrote: > > [ 40.089036] [] sysfs_get_dirent+0x39/0x80 > > [ 40.089036] [] sysfs_remove_group+0x29/0x100 > > [ 40.089036] [] blk_trace_remove_sysfs+0x14/0x20 > > [ 40.089036] [] blk_unregister_queue+0x5e/0x90 > > [ 40.089036] [] del_gendisk+0x107/0x250 > > [ 40.089036] [] loop_remove+0x18/0x40 > > Then the crash is triggered in device release path, which should have > been avoided in device add path. > > If we want to fix the problem completely, add_disk() must handle failure > path correctly and return error code on failures, which may involve big > work, since add_disk() are called by 50+ drivers. Yeah, add_disk() has been broken like that since forever. We really need to fix it properly. Any volunteers? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/