Re: close a connection in net_bh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi , guys , 
    i don't think it's a good idea to close a tcp connection in the net_bh .
    and in other way , if you got a fin packet , i think you can't delete the 
    connection directly , for the close session had't finished . 
        
    better lucky . 


----- Original Message ----- 
From: "Ronghua Zhang" <rz5b@cs.virginia.edu>
To: <kernelnewbies@nl.linux.org>
Sent: Sunday, November 24, 2002 12:37 PM
Subject: close a connection in net_bh


> Hi,
>   I want net_bh to close the connection once it receives FIN from the
> other side of the connection, I know that tcp_close() can close an
> existing connection. But the thing is if there are undelivered data in
> socket's queue, tcp_close() will call tcp_send_active_reset() to send out
> a RST, tcp_send_active_reset() need call alloc_skb() with flag __GFP_WAIT.
> Normally, tcp_close() is called in user context, and everything is OK.
> However, if I call tcp_close() in net_bh, alloc_skb() won't allow
> __GFP_WAIT flag being set when it's called inside bottom half or interupt.
> 
> My current solution is manually remove all the undelivered data before
> calling tcp_close(). Is there any other solution? thanks
> 
> rz
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux