mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-22 03:00:30 -05:00
Merge tag 'uml-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux
Pull UML fixes from Johannes Berg: - fix FP registers in seccomp mode - prevent duplicate devices in VFIO support - don't ignore errors in UBD thread start - reduce stack use with clang 19 * tag 'uml-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: vector: Reduce stack usage in vector_eth_configure() um: Use correct data source in fpregs_legacy_set() um: vfio: Prevent duplicate device assignments um: ubd: Add missing error check in start_io_thread()
This commit is contained in:
@@ -41,7 +41,7 @@ int start_io_thread(struct os_helper_thread **td_out, int *fd_out)
|
||||
*fd_out = fds[1];
|
||||
|
||||
err = os_set_fd_block(*fd_out, 0);
|
||||
err = os_set_fd_block(kernel_fd, 0);
|
||||
err |= os_set_fd_block(kernel_fd, 0);
|
||||
if (err) {
|
||||
printk("start_io_thread - failed to set nonblocking I/O.\n");
|
||||
goto out_close;
|
||||
|
||||
@@ -1625,35 +1625,19 @@ static void vector_eth_configure(
|
||||
|
||||
device->dev = dev;
|
||||
|
||||
*vp = ((struct vector_private)
|
||||
{
|
||||
.list = LIST_HEAD_INIT(vp->list),
|
||||
.dev = dev,
|
||||
.unit = n,
|
||||
.options = get_transport_options(def),
|
||||
.rx_irq = 0,
|
||||
.tx_irq = 0,
|
||||
.parsed = def,
|
||||
.max_packet = get_mtu(def) + ETH_HEADER_OTHER,
|
||||
/* TODO - we need to calculate headroom so that ip header
|
||||
* is 16 byte aligned all the time
|
||||
*/
|
||||
.headroom = get_headroom(def),
|
||||
.form_header = NULL,
|
||||
.verify_header = NULL,
|
||||
.header_rxbuffer = NULL,
|
||||
.header_txbuffer = NULL,
|
||||
.header_size = 0,
|
||||
.rx_header_size = 0,
|
||||
.rexmit_scheduled = false,
|
||||
.opened = false,
|
||||
.transport_data = NULL,
|
||||
.in_write_poll = false,
|
||||
.coalesce = 2,
|
||||
.req_size = get_req_size(def),
|
||||
.in_error = false,
|
||||
.bpf = NULL
|
||||
});
|
||||
INIT_LIST_HEAD(&vp->list);
|
||||
vp->dev = dev;
|
||||
vp->unit = n;
|
||||
vp->options = get_transport_options(def);
|
||||
vp->parsed = def;
|
||||
vp->max_packet = get_mtu(def) + ETH_HEADER_OTHER;
|
||||
/*
|
||||
* TODO - we need to calculate headroom so that ip header
|
||||
* is 16 byte aligned all the time
|
||||
*/
|
||||
vp->headroom = get_headroom(def);
|
||||
vp->coalesce = 2;
|
||||
vp->req_size = get_req_size(def);
|
||||
|
||||
dev->features = dev->hw_features = (NETIF_F_SG | NETIF_F_FRAGLIST);
|
||||
INIT_WORK(&vp->reset_tx, vector_reset_tx);
|
||||
|
||||
@@ -570,6 +570,17 @@ static void uml_vfio_release_device(struct uml_vfio_device *dev)
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
static struct uml_vfio_device *uml_vfio_find_device(const char *device)
|
||||
{
|
||||
struct uml_vfio_device *dev;
|
||||
|
||||
list_for_each_entry(dev, ¨_vfio_devices, list) {
|
||||
if (!strcmp(dev->name, device))
|
||||
return dev;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int uml_vfio_cmdline_set(const char *device, const struct kernel_param *kp)
|
||||
{
|
||||
struct uml_vfio_device *dev;
|
||||
@@ -582,6 +593,9 @@ static int uml_vfio_cmdline_set(const char *device, const struct kernel_param *k
|
||||
uml_vfio_container.fd = fd;
|
||||
}
|
||||
|
||||
if (uml_vfio_find_device(device))
|
||||
return -EEXIST;
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -161,7 +161,7 @@ static int fpregs_legacy_set(struct task_struct *target,
|
||||
from = kbuf;
|
||||
}
|
||||
|
||||
return um_fxsr_from_i387(fxsave, &buf);
|
||||
return um_fxsr_from_i387(fxsave, from);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user