From: viro@parcelfarce.linux.theplanet.co.uk
To: Matthew Harrell <mharrell-dated-1054589229.f149f8@bittwiddlers.com>
Cc: Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: ppp problems in 2.5.69-bk14 - devfs related?
Date: Wed, 28 May 2003 22:40:47 +0100 [thread overview]
Message-ID: <20030528214047.GE14138@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030528212708.GA11432@bittwiddlers.com>
On Wed, May 28, 2003 at 05:27:08PM -0400, Matthew Harrell wrote:
>
> My oops output is just marginally different under 2.5.70-bk2.
> Unfortunately, I don't seem to have a /proc/ksyms so I don't know what
> to point ksymoops to. I can make this one happen over and over by
> just running pppd. It does not kill the system but it does make it
> rather unuseable.
Fsck knows why devfs_mk_cdev() fails, but what follows that is obvious -
int __init ppp_init(void)
{
int err;
printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n");
err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops);
if (!err) {
err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0),
S_IFCHR|S_IRUSR|S_IWUSR, "ppp");
}
if (err)
printk(KERN_ERR "failed to register PPP device (%d)\n", err);
return err;
}
clearly leaves device registered after failed insmod. open() afterwards
happily finds the device and dies on attempt to do anything with it
(the module is not there, pointers go to hell knows where).
I'd suggest to change that to
err = devfs_mk_cdev(...)
if (!err) {
err = register_chrdev(...)
if (!err)
return 0;
devfs_remove(...)
}
printk(...)
return err;
That will _not_ solve the devfs problem, whatever it is, but it will make sure
that any errors are handled correctly.
next prev parent reply other threads:[~2003-05-28 21:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 0:52 ppp problems in 2.5.69-bk14 Brett
2003-05-28 12:55 ` Matthew Harrell
2003-05-28 21:27 ` ppp problems in 2.5.69-bk14 - devfs related? Matthew Harrell
2003-05-28 21:40 ` viro [this message]
2003-05-29 16:38 ` Matthew Harrell
2003-06-04 22:26 ` ppp problems in 2.5.69-bk14 Matthew Harrell
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=20030528214047.GE14138@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mharrell-dated-1054589229.f149f8@bittwiddlers.com \
/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
all inboxes | Powered by JetHome®