Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 29 Jul 2002 09:37:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 29 Jul 2002 09:37:09 -0400 Received: from hera.cwi.nl ([192.16.191.8]:36508 "EHLO hera.cwi.nl") by vger.kernel.org with ESMTP id ; Mon, 29 Jul 2002 09:37:08 -0400 From: Andries.Brouwer@cwi.nl Date: Mon, 29 Jul 2002 15:39:52 +0200 (MEST) Message-Id: To: linux-kernel@vger.kernel.org, torvalds@transmeta.com, viro@math.psu.edu Subject: bug in the present partition code Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 29 Al, A BUG_ON at device.h:215 is triggered by scsi_unregister_host -> sd_detach -> driverfs_remove_partitions -> device_remove _file because driverfs_remove_partitions is called for a device where driverfs_create_partitions was not called for. (A device without media - no partitions have ever been seen.) There are various ways to fix - I'll leave it to you to pick some appropriate one. Andries [I find that code becomes ugly when one includes a struct in another struct. Lots of assignments ptr = &(p->start_of_struct); The advantage of having things separate is that one can use NULL to mean "uninitialized", while &(p->start_of_struct) is never NULL. So, I wouldn't mind adding a * and an r in the struct device hd_driverfs_dev; /* support driverfs hiearchy */ in struct hd_struct. But you may have other preferences.] - 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/