Bug in IrDA

From: Pontus Fuchs (pontus.fuchs@tactel.se)
Date: Mon Jul 17 2000 - 07:18:25 EST


Hi,

Using the following code my 2.2.16 and 2.4.0test4 machines quickly runs
out of memory. I have stared at af_irda.h for a while, but my
kernel-knowledge is very limited and I can't find any obvious memleaks.

You don't need to have IrDA up and running to run this program,
compiling the kernel with IrDA-support is enough.

-------------------------
#include <sys/socket.h>
#include <irda.h>
/* If you don't have irda.h you can define AF_IRDA to 17 */

int main(int argc, char *argv[])
{
        int sock;

        while(1) {
                sock = socket(AF_IRDA, SOCK_STREAM, 0);
                if(sock < 0) {
                        perror("socket");
                        return -1;
                }
                close(sock);
        }
        return 0;
}
-------------------------

/Pontus Fuchs

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



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:09 EST