All of lore.kernel.org
 help / color / mirror / Atom feed
* bug in xc_gntshr_munmap?
@ 2013-04-26 11:07 Marek Marczykowski
  2013-04-26 13:34 ` Ian Campbell
  0 siblings, 1 reply; 15+ messages in thread
From: Marek Marczykowski @ 2013-04-26 11:07 UTC (permalink / raw)
  To: xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 851 bytes --]

Hi,

Header says:
/*
 * Unmaps the @count pages starting at @start_address, which were mapped by a
 * call to xc_gntshr_share_*. Never logs.
 */
int xc_gntshr_munmap(xc_gntshr *xcg, void *start_address, uint32_t count);

But implementation calls:
static int linux_gntshr_munmap(xc_gntshr *xcg, xc_osdep_handle h,
                               void *start_address, uint32_t count)
{
    return munmap(start_address, count);
}

munmap(2) expect second argument to be size of mapped area (in bytes), not
pages count.

Users of xc_gntshr_munmap (the only one I'm aware of is libxenvchan) already
uses that broken semantic.

Is it going to be fixed (I can send trivial patch for both libxc and
libxenvchan), or the comment in header should be updated?

-- 
Best Regards / Pozdrawiam,
Marek Marczykowski
Invisible Things Lab


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 553 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-04-30 14:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 11:07 bug in xc_gntshr_munmap? Marek Marczykowski
2013-04-26 13:34 ` Ian Campbell
2013-04-26 13:41   ` Marek Marczykowski
2013-04-26 12:40     ` [PATCH] libxc: fix xc_gntshr_munmap semantic Marek Marczykowski
2013-04-26 14:01       ` Marek Marczykowski
2013-04-26 14:44       ` Ian Campbell
2013-04-26 15:15         ` Daniel De Graaf
2013-04-26 15:26           ` Ian Campbell
2013-04-26 16:17             ` Daniel De Graaf
2013-04-30 10:39               ` Ian Campbell
2013-04-30 13:21                 ` Daniel De Graaf
2013-04-30 14:00                   ` Ian Campbell
2013-04-30 14:19                     ` Daniel De Graaf
2013-04-30 14:29                       ` Ian Campbell
2013-04-26 13:49     ` bug in xc_gntshr_munmap? Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.