mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Greg KH <greg@kroah.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: [PATCH] prevent oops from read of proc entry for tty drivers
Date: Tue, 25 Nov 2003 11:26:25 -0800	[thread overview]
Message-ID: <20031125112625.4c2b40f0.shemminger@osdl.org> (raw)
In-Reply-To: <20031125004716.GA28135@kroah.com>

There are /proc handles there setup by proc_tty_register_driver, but there is
no module ownership association, so anything that reads after module unload
will blow.  Fix is to propagate owner of tty_driver to proc entry.

diff -Nru a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
--- a/fs/proc/proc_tty.c	Tue Nov 25 11:18:53 2003
+++ b/fs/proc/proc_tty.c	Tue Nov 25 11:18:53 2003
@@ -198,6 +198,7 @@
 		return;
 	ent->read_proc = driver->read_proc;
 	ent->write_proc = driver->write_proc;
+	ent->owner = driver->owner;
 	ent->data = driver;
 
 	driver->proc_entry = ent;

           reply	other threads:[~2003-11-25 19:25 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20031125004716.GA28135@kroah.com>]

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=20031125112625.4c2b40f0.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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®