Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757189AbYJMKja (ORCPT ); Mon, 13 Oct 2008 06:39:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752827AbYJMKjV (ORCPT ); Mon, 13 Oct 2008 06:39:21 -0400 Received: from queueout04-winn.ispmail.ntl.com ([81.103.221.58]:56385 "EHLO queueout04-winn.ispmail.ntl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804AbYJMKjU (ORCPT ); Mon, 13 Oct 2008 06:39:20 -0400 X-Greylist: delayed 685 seconds by postgrey-1.27 at vger.kernel.org; Mon, 13 Oct 2008 06:39:19 EDT From: Philip Martin To: Greg KH Cc: Nix , linux-kernel@vger.kernel.org, Peter Osterlund Subject: Re: pktcdvd -> sysfs warning with 2.6.27 References: <87vdvyngni.fsf@hades.wkstn.nix> <20081012181700.GA21072@kroah.com> Date: Mon, 13 Oct 2008 11:27:50 +0100 In-Reply-To: <20081012181700.GA21072@kroah.com> (Greg KH's message of "Sun, 12 Oct 2008 11:17:00 -0700") Message-ID: <87myh8dc2h.fsf@debian2.home.lan> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Cloudmark-Analysis: v=1.0 c=1 a=1z5u3U6xEFEA:10 a=5D0bYxygq7UA:10 a=Yqdj2FtDgMk1lYbZ6z0A:9 a=VdonHCuphntEWxxCv6AA:7 a=s6BfnSn7KQkj72CeYmaEVJ0pyhkA:4 a=mJMriH8CDpcA:10 a=SKpDKCWXRSQA:10 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5040 Lines: 111 Greg KH writes: > On Sun, Oct 12, 2008 at 01:26:25PM +0100, Nix wrote: >> At the very end of my startup scripts, I say >> >> pktsetup cdrw /dev/cdrw >> >> to get the stuff in /etc/pktcdvd set up right. >> >> As of 2.6.27 this has started complaining: >> >> pktcdvd: writer pktcdvd0 mapped to hde >> ------------[ cut here ]------------ >> WARNING: at fs/sysfs/dir.c:463 sysfs_add_one+0x2f/0x3b() >> sysfs: duplicate filename '254:0' can not be created >> Modules linked in: >> Pid: 1306, comm: pktsetup Not tainted 2.6.27-dirty #1 >> [] warn_slowpath+0x50/0x71 >> [] ? ida_get_new_above+0xdc/0x17d >> [] ? idr_get_empty_slot+0x142/0x1f3 >> [] ? ida_get_new_above+0xdc/0x17d >> [] ? sysfs_ilookup_test+0x0/0x16 >> [] ? sysfs_find_dirent+0x1b/0x2c >> [] sysfs_add_one+0x2f/0x3b >> [] sysfs_do_create_link+0xb1/0x106 >> [] sysfs_create_link+0xf/0x14 >> [] device_add+0x134/0x455 >> [] device_register+0x17/0x1a >> [] device_create_vargs+0x80/0xa3 >> [] device_create+0x20/0x24 >> [] pkt_setup_dev+0x2ed/0x429 >> [] pkt_ctl_ioctl+0x86/0x18c >> [] vfs_ioctl+0x55/0x6e >> [] ? block_truncate_page+0xa9/0x1e0 >> [] do_vfs_ioctl+0x236/0x249 >> [] sys_ioctl+0x31/0x4d >> [] sysenter_do_call+0x12/0x25 >> [] ? block_truncate_page+0xa9/0x1e0 >> ======================= >> ---[ end trace 1cdd10ab78ee5bc6 ]--- >> >> For the life of me I can't see where pkt_sysfs_dev_new() is being called >> more than once: indeed, from the trace above GCC has inlined it into >> pkt_setup_dev() as a static function called from only one place... > > Perhaps some other kernel code is registering with that same major/minor > number, making it already present in sysfs. Where does that sysfs file > link to before you load your driver? I've just got a similar message from 2.6.27 but involving vcs1. I didn't get this with 2.6.26.6 and I've booted 2.6.27 a few times and only seen it once: WARNING: at fs/sysfs/dir.c:463 sysfs_add_one+0x33/0x3a() sysfs: duplicate filename 'vcs1' can not be created Modules linked in: xt_tcpudp nfs nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs ppdev lp ac battery xt_state ipt_MASQUERADE ipv6 ipt_LOG iptable_mangle iptable_ filter iptable_nat ip_tables nf_nat x_tables nf_conntrack_ipv4 nf_conntrack tun dm_crypt crypto_blkcipher coretemp it87 hwmon_vid loop snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_timer sg iTCO_wdt snd serio_raw i2c_i801 sr_mod i2c_c ore parport_pc soundcore psmouse intel_agp parport button pcspkr snd_page_alloc cdrom evdev ext3 jbd mbcache dm_mirror dm_log dm_snapshot dm_mod usbhid hid sd_m od ata_piix libata r8169 ehci_hcd uhci_hcd thermal processor fan thermal_sys Pid: 3841, comm: getty Not tainted 2.6.27 #1 Call Trace: [] warn_slowpath+0xb4/0xdc [] source_load+0x2a/0x58 [] __next_cpu+0x19/0x26 [] string+0x34/0x93 [] vsnprintf+0x31c/0x5be [] idr_get_empty_slot+0x164/0x243 [] ida_get_new_above+0xf6/0x182 [] find_inode+0x28/0x6d [] sysfs_ilookup_test+0x0/0xf [] sysfs_find_dirent+0x1b/0x2f [] sysfs_add_one+0x33/0x3a [] create_dir+0x4f/0x7c [] sysfs_create_dir+0x35/0x4a [] kobject_get+0x12/0x17 [] kobject_add_internal+0xcf/0x18a [] kobject_add+0x74/0x7c [] journal_stop+0x176/0x182 [jbd] [] ext3_ordered_write_end+0xfc/0x112 [ext3] [] kobject_get+0x12/0x17 [] get_device+0x17/0x1f [] device_add+0x9e/0x5cc [] kobject_init_internal+0x12/0x2c [] kobject_init+0x41/0x69 [] device_create_vargs+0x98/0xc4 [] device_create+0x3a/0x42 [] __wake_up+0x38/0x4f [] tty_ldisc_setup+0x63/0x6a [] init_dev+0x390/0x4a9 [] vc_allocate+0x10/0x13f [] vcs_make_sysfs+0x2d/0x5b [] con_open+0x93/0xa0 [] tty_open+0x1ae/0x32d [] chrdev_open+0x131/0x15b [] chrdev_open+0x0/0x15b [] __dentry_open+0x13c/0x246 [] do_filp_open+0x38a/0x6d3 [] need_resched+0x1e/0x28 [] alloc_fd+0xb5/0xf9 [] do_sys_open+0x48/0xcc [] system_call_fastpath+0x16/0x1b -- 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/