lkml.org 
[lkml]   [2004]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 0/4] Cleanup file_count usage
Ravikiran G Thirumalai writes:

> 2. Read to f_count at drivers/net/ppp_generic.c:
> The PPPIOCDETACH ioctl is failed if the device fd is duped and
> being polled by another process -- which is determined by a read
> to f_count. The comments in the code indicate that the PPPIOCDETACH
> ioctl should be junked and userland can use a workaround
> by closing the fd and reopening /dev/ppp. I can make a patch to junk
> PPPIOCDETACH, but is it okay to break binary compatibility? Paul?

I would very much rather not break binary compatibility. People using
ppp-2.4.2 or ppp-2.4.3 won't be affected by this change, but ppp-2.4.2
was released in January this year and I wouldn't be surprised if
some people are still using ppp-2.4.1 (or even ppp-2.4.0), which would
be affected.

I suggest that as a temporary compromise, we keep PPPIOCDETACH but
make it zero file->private_data without freeing the ppp structure that
it points to. That will cause a memory leak but will avoid the
possibility of using that memory after it is freed (in the case where
the descriptor has been dup'd and another process is doing a poll on
it).

We should make the kernel whinge loudly when anyone uses PPPIOCDETACH,
too. If/when 2.7.0 comes along we can remove it.

Paul.
-
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/

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