lkml.org 
[lkml]   [1997]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH-V3!][2.1.71] BSD revoke() syscall
On Wed, 10 Dec 1997, Theodore Y. Ts'o wrote:

> Now, however, when I revoke() a tty, I get the famous old "tty->count !=
> #fd's".
>
> Oh, I see. We need the following change in tty_io.c as well, which
> should be safe (although I haven't tested it yet):
>
> (pseudo-patch follows)
>
> tty_io.c, arround line 1127:
>
> + filp->private_data = 0;
> /* check whether both sides are closing ... */
> if (!tty_closing || (o_tty && !o_tty_closing))
> return;
> - filp->private_data = 0;

OK. Have done that, and it doesn't _seem_ to kill anything.
(That is - I can revoke ttys just fine now.)

I do have vague inklings that there might be a leak somewhere
between these things:

static int revoked_release(struct inode * inode, struct file * filp)
{
filp->f_op = NULL;
return 0;
}

static void do_revoke(struct inode * inode, struct file * filp)
{
/* Close the file */
if(filp->f_op->release)
(*filp->f_op->release)(inode, filp);

/* The file_ops to do what we want... */
filp->f_op = &revokedf_ops;
}

Are they likely to lose things?

Matthew.


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:1.690 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site