netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org,
	Stephen Hemminger <shemminger@linux-foundation.org>,
	mfuzzey@mailclub.net,
	"bugme-daemon\@kernel-bugs\.osdl\.org"
	<bugme-daemon@bugzilla.kernel.org>
Subject: Re: Fw: [Bugme-new] [Bug 7952] New: slattach only works every other time
Date: Mon, 12 Feb 2007 09:36:09 +0100	[thread overview]
Message-ID: <20070212083609.GA1946@ff.dom.local> (raw)
In-Reply-To: <20070206135754.0a0415b9.akpm@linux-foundation.org>

On 06-02-2007 22:57, Andrew Morton wrote:
...
> First time slattach is run to set up a SLIP line all is ok.
> If slattach process is then killed and restarted it fails with message:
> SLIP_set_disc(1): File exists
> Problem still occurs in 2.6.20rc6 kernel
> 
> dmesg shows:
> object_add failed for sl0 with -EEXIST, don't try to register things 
> with the same name in the same directory.
>  [<c01b7b54>] kobject_add+0x147/0x16d
>  [<c0211209>] class_device_add+0x9d/0x3b3
>  [<c022829d>] register_netdevice+0x21a/0x2d0
>  [<c8903213>] slip_open+0x3a1/0x4e2 [slip]
>  [<c01fc709>] tty_ioctl+0x922/0xbac
... 
> Steps to reproduce:
> (requires a serial port but nothing needs to be attached to it):
> # slattach -L -vd -p slip -s 115200 /dev/ttyS0
...
> slip started on /dev/ttyS0 interface sl0
> 
> Above is OK, now kill process with CTRL-C
> 
> slattach: tty_set_speed: 0
> # slattach -L -vd -p slip -s 115200 /dev/ttyS0
...
> SLIP_set_disc(1): File exists
...
> I believe this is called by this changeset :
> http://www2.kernel.org/git/?p=linux/kernel/git/stable/linux-2.6.17.y.git;a=commit;h=b17a7c179dd3ce7d04373fddf660eda21efc9db9

I think Martin is probably right here.

It would be useful to check if time has anything to do
with this and wait longer (e.g. >= 1 min.) before the
second slattach.

Anyway, even if there is some other reason, the above
trace shows (IMHO) some inconsistency in register/
unregister_netdevice: if class_device_add is reached
it means the name is valid (so was unregistered) and
EEXIST from netdev_register_sysfs is wrong about the
state of this device. So maybe there should be some
warning plus some delayed action instead of register
cancelled?

Regards,
Jarek P. 

  reply	other threads:[~2007-02-12  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 21:57 Fw: [Bugme-new] [Bug 7952] New: slattach only works every other time Andrew Morton
2007-02-12  8:36 ` Jarek Poplawski [this message]
2007-02-12 17:45   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070212083609.GA1946@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=mfuzzey@mailclub.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).