Re: problem in do_tcp_sendpages

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

 



Hi David,
Thanks a lot for the inputs.
Is there any way to ensure that page reference count get decremented
properly before you free pages.
Currenly i allocate a data page and use sendpage to pass the data to
network layer and later on i free the page.
It seems to me that on returning from sendpage the page reference
count is not getting decremented.
So when i try to free the page the page does not get freed resulting
in a kind of memory leak.
Please let me know if my undrstanding is not correct.
kSanjay



Just before freeing the page wh
On 12/22/05, David S. Miller <davem@xxxxxxxxxxxxx> wrote:
> From: Sanjay Kumar <coolsanjay@xxxxxxxxx>
> Date: Thu, 22 Dec 2005 13:32:56 +0900
>
> > On looking at the linux source code for kernel 2.6.14 i found out that
> > in the following code a call is being made to "get_page" which
> > increments the page reference count, but there is no corresponding
> > "put_page" or other function which decrement the page count.
>
> It gets decremented when the SKB is freed via kfree_skb().
> See net/core/skbuff.c:skb_release_data(), invoked by kfree_skbmem(),
> invoked by __kfree_skb(), invoked by kfree_skb().
>

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