Re: [patch-2.3.29] bugfix for pipe(2) system call.

Tigran Aivazian (tigran@sco.COM)
Thu, 25 Nov 1999 13:04:47 +0000 (GMT)


You agree with what? If I don't understand what David suggested, I don't
understand what you agree with.

If David suggested to write -1's to userspace's fd[2] that means overhead
in non-failing case which is totally unacceptable. (it's the same as doing
verify_area(), in fact it is cheaper to keep the kernel lock over
copy_to_user() and close the descriptors if failed than doing that).

If David suggested to write -1's to local kernel fd[2] then I don't see
how it makes any difference.

Regards,
Tigran.

On Thu, 25 Nov 1999, Brandon S. Allbery KF8NH wrote:

> In message <19991125085058Z155970-26989+89@vger.rutgers.edu>, David Howells
> wri
> tes:
> +-----
> | I'd say there's a lot easier way of checking your pipe problem: pre-initialis
> | e
> | both elements of the array to -1 or something. It's only two int's, so the
> | performance penalty will be minimal.
> +--->8
>
> I'd agree except that I suspect pipe() is supposed to leave the memory
> unchanged if anything goes wrong.
>
> --
> brandon s. allbery os/2,linux,solaris,perl allbery@kf8nh.apk.net
> system administrator kthkrb,heimdal,gnome,rt allbery@ece.cmu.edu
> carnegie mellon / electrical and computer engineering kf8nh
> We are Linux. Resistance is an indication that you missed the point.
>
>
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/