Brice Goglin wrote:
Preventing the driver from doing this would probably be the
right solution here... If the driver called get_user_pages,
it is its responsibility to release the pages.
The driver does release the pages, but only when asked to do so. If the process dies,
then the driver automatically cleans up, but otherwise how is the driver to know that the
memory is no longer needed?
Perhaps you mean that the driver should release the pages before it exits. Unfortunately,
that defeats the purpose of calling get_user_pages() in the first place. The driver needs
to pin the application's buffers so that the subsequent DMA operations work. This driver
supports an RDMA adapter that transfer network data directly to the application's buffers.
You're probably now thinking, "Well, why doesn't the driver just allocate the buffers on
behalf of the app?" There are two reasons why we can't do that. One, the app may need
have gigabytes of memory for the RDMA operations. Two, the APIs we need to support allow
the app to allocate memory any way it sees fit.
--
Timur Tabi
Staff Software Engineer
[email protected]
One thing a Southern boy will never say is,
"I don't think duct tape will fix it."
-- Ed Smylie, NASA engineer for Apollo 13
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]