/* * Details of the "wire" protocol between Xen Store Daemon and client * library or guest kernel. * Copyright (C) 2005 Rusty Russell IBM Corporation */ #ifndef _XS_WIRE_H #define _XS_WIRE_H enum xsd_sockmsg_type { XS_DEBUG, XS_DIRECTORY, XS_READ, XS_GET_PERMS, XS_WATCH, XS_UNWATCH, XS_TRANSACTION_START, XS_TRANSACTION_END, XS_INTRODUCE, XS_RELEASE, XS_GET_DOMAIN_PATH, XS_WRITE, XS_MKDIR, XS_RM, XS_SET_PERMS, XS_WATCH_EVENT, XS_ERROR, XS_IS_DOMAIN_INTRODUCED, XS_RESUME, XS_SET_TARGET, XS_RESTRICT, XS_RESET_WATCHES, }; #define XS_WRITE_NONE "NONE" #define XS_WRITE_CREATE "CREATE" #define XS_WRITE_CREATE_EXCL "CREATE|EXCL" /* We hand errors as strings, for portability. */ struct xsd_errors { int errnum; const char *errstring; }; #define XSD_ERROR(x) { x, #x } static struct xsd_errors xsd_errors[] __attribute__((unused)) = { XSD_ERROR(EINVAL), XSD_ERROR(EACCES), XSD_ERROR(EEXIST), XSD_ERROR(EISDIR), XSD_ERROR(ENOENT), XSD_ERROR(ENOMEM), XSD_ERROR(ENOSPC), XSD_ERROR(EIO), XSD_ERROR(ENOTEMPTY), XSD_ERROR(ENOSYS), XSD_ERROR(EROFS), XSD_ERROR(EBUSY), XSD_ERROR(EAGAIN), XSD_ERROR(EISCONN) }; struct xsd_sockmsg { uint32_t type; /* XS_??? */ uint32_t req_id;/* Request identifier, echoed in daemon's response. */ uint32_t tx_id; /* Transaction id (0 if not related to a transaction). */ uint32_t len; /* Length of data following this. */ /* Generally followed by nul-terminated string(s). */ }; enum xs_watch_type { XS_WATCH_PATH = 0, XS_WATCH_TOKEN }; /* Inter-domain shared memory communications. */ #define XENSTORE_RING_SIZE 1024 typedef uint32_t XENSTORE_RING_IDX; #define MASK_XENSTORE_IDX(idx) ((idx) & (XENSTORE_RING_SIZE-1)) struct xenstore_domain_interface { char req[XENSTORE_RING_SIZE]; /* Requests to xenstore daemon. */ char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch events. */ XENSTORE_RING_IDX req_cons, req_prod; XENSTORE_RING_IDX rsp_cons, rsp_prod; }; /* Violating this is very bad. See docs/misc/xenstore.txt. */ #define XENSTORE_PAYLOAD_MAX 4096 #endif /* _XS_WIRE_H */ 48c4829d51c0bc677f968e'/>
path: root/include/net
diff options
context:
space:
mode:
authorDavid Windsor <dwindsor@gmail.com>2017-01-23 22:24:29 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2017-02-02 14:31:57 +0100
commit90c1aff702d449a1a248c4829d51c0bc677f968e (patch)
tree95949a5240fb0a29d5dd16ec9df93730d8452b31 /include/net
parenta9e419dc7be6997409dca6d1b9daf3cc7046902f (diff)
ipvs: free ip_vs_dest structs when refcnt=0
Currently, the ip_vs_dest cache frees ip_vs_dest objects when their reference count becomes < 0. Aside from not being semantically sound, this is problematic for the new type refcount_t, which will be introduced shortly in a separate patch. refcount_t is the new kernel type for holding reference counts, and provides overflow protection and a constrained interface relative to atomic_t (the type currently being used for kernel reference counts). Per Julian Anastasov: "The problem is that dest_trash currently holds deleted dests (unlinked from RCU lists) with refcnt=0." Changing dest_trash to hold dest with refcnt=1 will allow us to free ip_vs_dest structs when their refcnt=0, in ip_vs_dest_put_and_free(). Signed-off-by: David Windsor <dwindsor@gmail.com> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_vs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h