From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261796AbTJRSJv (ORCPT ); Sat, 18 Oct 2003 14:09:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261807AbTJRSJv (ORCPT ); Sat, 18 Oct 2003 14:09:51 -0400 Received: from web40912.mail.yahoo.com ([66.218.78.209]:23370 "HELO web40912.mail.yahoo.com") by vger.kernel.org with SMTP id S261796AbTJRSHm (ORCPT ); Sat, 18 Oct 2003 14:07:42 -0400 Message-ID: <20031018180741.69117.qmail@web40912.mail.yahoo.com> Date: Sat, 18 Oct 2003 11:07:41 -0700 (PDT) From: Bradley Chapman Subject: This bug appears under 2.6.0-test8 as well (was: 2.6.0-test7-mm1) To: Ben Collins Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net In-Reply-To: <20031018132741.GV866@phunnypharm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Mr. Collins, --- Ben Collins wrote: > > > > I was looking briefly at this too, and as you say, the problem is that > > some things have to happen in interrupt, others happen in process > > context. I've attached a patch that implements one way to fix it: > > double book-keeping - we maintain two lists of the highlevel drivers, > > one protected by a semaphore another protected by the rw spinlock. The > > lists are identical, except between the two list_add_tail()'s (and the > > two list_del()'s), but that doesn't allow any harmful race conditions. > > > > A more radical approach would be to split the highlevel interface into > > two interfaces add_host() + remove_host() in a hpsb_host_notification > > interface and the rest in another interface. The driver would have to > > register both interfaces if it needs them. Some drivers only use > > add_host() and remove_host(), so they could register only the > > hpsb_host_notification interface. > > Actually I'm leaning toward getting rid of our internal locking and > reference counting and relying heavily on the device model's reference > counting and such. Take some of the work load off of our code. > > Each host already has a device associated with it, so it just requires a > revamp of some internals. JFYI, this bug also appears under 2.6.0-test8: ohci1394: $Rev: 1045 $ Ben Collins ohci1394_0: OHCI-1394 1.1 (PCI): IRQ=[10] MMIO=[e8207000-e82077ff] Max Packet=[2048] Debug: sleeping function called from invalid context at mm/slab.c:1857 in_atomic():1, irqs_disabled():0 Call Trace: [] __might_sleep+0xa0/0xc1 [] __kmalloc+0x204/0x216 [] hpsb_create_hostinfo+0x6b/0xe8 [ieee1394] [] nodemgr_add_host+0x23/0x1d2 [ieee1394] [] sprintf+0x1f/0x23 [] highlevel_add_host+0x6b/0x6f [ieee1394] [] hpsb_add_host+0x6d/0x95 [ieee1394] [] ohci1394_pci_probe+0x512/0x620 [ohci1394] [] ohci_irq_handler+0x0/0x1129 [ohci1394] [] pci_device_probe_static+0x52/0x63 [] __pci_device_probe+0x3b/0x4e [] pci_device_probe+0x2c/0x4a [] bus_match+0x3f/0x6a [] driver_attach+0x56/0x80 [] bus_add_driver+0x9f/0xb1 [] driver_register+0x8c/0x90 [] pci_register_driver+0x8c/0xab [] ohci1394_init+0x13/0x3d [ohci1394] [] sys_init_module+0x213/0x3e6 [] sys_read+0x42/0x63 [] sysenter_past_esp+0x52/0x71 ieee1394: Host added: ID:BUS[0-00:1023] GUID[00e0b8060000db10] Since I don't use the OHCI1394 drivers yet, I can't really offer any assistance, except to test patches that make the debug message go away. Brad ===== Brad Chapman Permanent e-mail: kakadu_croc@yahoo.com __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com