#include #include #include #include #include #include "xenfs.h" #include "../xenbus/xenbus_comms.h" static ssize_t xsd_read(struct file *file, char __user *buf, size_t size, loff_t *off) { const char *str = (const char *)file->private_data; return simple_read_from_buffer(buf, size, off, str, strlen(str)); } static int xsd_release(struct inode *inode, struct file *file) { kfree(file->private_data); return 0; } static int xsd_kva_open(struct inode *inode, struct file *file) { file->private_data = (void *)kasprintf(GFP_KERNEL, "0x%p", xen_store_interface); if (!file->private_data) return -ENOMEM; return 0; } static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma) { size_t size = vma->vm_end - vma->vm_start; if ((size > PAGE_SIZE) || (vma->vm_pgoff != 0)) return -EINVAL; if (remap_pfn_range(vma, vma->vm_start, virt_to_pfn(xen_store_interface), size, vma->vm_page_prot)) return -EAGAIN; return 0; } const struct file_operations xsd_kva_file_ops = { .open = xsd_kva_open, .mmap = xsd_kva_mmap, .read = xsd_read, .release = xsd_release, }; static int xsd_port_open(struct inode *inode, struct file *file) { file->private_data = (void *)kasprintf(GFP_KERNEL, "%d", xen_store_evtchn); if (!file->private_data) return -ENOMEM; return 0; } const struct file_operations xsd_port_file_ops = { .open = xsd_port_open, .read = xsd_read, .release = xsd_release, }; ble>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-10 09:23:19 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-10 09:23:19 -0800
commitcd6628953e4216b65e7d91ab70ff8e5b65c9fde9 (patch)
tree2edd235752b9a668649f8a071159340128495e30 /net/9p/Kconfig
parent810ac7b7558d7830e72d8dbf34b851fce39e08b0 (diff)
parentd33695fbfab73a4a6550fa5c2d0bacc68d7c5901 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Limit the number of can filters to avoid > MAX_ORDER allocations. Fix from Marc Kleine-Budde. 2) Limit GSO max size in netvsc driver to avoid problems with NVGRE configurations. From Stephen Hemminger. 3) Return proper error when memory allocation fails in ser_gigaset_init(), from Dan Carpenter. 4) Missing linkage undo in error paths of ipvlan_link_new(), from Gao Feng. 5) Missing necessayr SET_NETDEV_DEV in lantiq and cpmac drivers, from Florian Fainelli. 6) Handle probe deferral properly in smsc911x driver. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: mlx5: Fix Kconfig help text net: smsc911x: back out silently on probe deferrals ibmveth: set correct gso_size and gso_type net: ethernet: cpmac: Call SET_NETDEV_DEV() net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() vhost-vsock: fix orphan connection reset cxgb4/cxgb4vf: Assign netdev->dev_port with port ID driver: ipvlan: Unlink the upper dev when ipvlan_link_new failed ser_gigaset: return -ENOMEM on error instead of success NET: usb: cdc_mbim: add quirk for supporting Telit LE922A can: peak: fix bad memory access and free sequence phy: Don't increment MDIO bus refcount unless it's a different owner netvsc: reduce maximum GSO size drivers: net: cpsw-phy-sel: Clear RGMII_IDMODE on "rgmii" links can: raw: raw_setsockopt: limit number of can_filter that can be set
Diffstat (limited to 'net/9p/Kconfig')