Linux 7.1.2
Greg Kroah-Hartman
maintainerI'm announcing the release of the 7.1.2 kernel.
All users of the 7.1 kernel series must upgrade.
The updated 7.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-7.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/userspace-api/ioctl/ioctl-number.rst | 1 Makefile | 2 drivers/base/memory.c | 3 drivers/char/agp/amd64-agp.c | 2 drivers/crypto/intel/qat/qat_common/adf_cfg.c | 10 drivers/crypto/intel/qat/qat_common/adf_cfg.h | 1 drivers/crypto/intel/qat/qat_common/adf_cfg_common.h | 32 - drivers/crypto/intel/qat/qat_common/adf_cfg_user.h | 38 - drivers/crypto/intel/qat/qat_common/adf_common_drv.h | 3 drivers/crypto/intel/qat/qat_common/adf_ctl_drv.c | 404 ------------------- drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c | 70 --- drivers/iio/adc/ti-ads1298.c | 7 drivers/iio/light/veml6075.c | 8 drivers/media/test-drivers/vidtv/vidtv_mux.c | 8 drivers/tty/serial/8250/8250_dw.c | 4 drivers/tty/serial/qcom_geni_serial.c | 9 drivers/tty/vt/vc_screen.c | 2 fs/fuse/dev.c | 19 fs/fuse/file.c | 8 fs/nfsd/export.c | 63 -- fs/nfsd/export.h | 7 fs/nfsd/nfsctl.c | 8 fs/smb/server/smb2pdu.c | 5 io_uring/net.c | 36 - io_uring/opdef.c | 4 25 files changed, 80 insertions(+), 674 deletions(-)
Gabriel Krisman Bertazi (1):
io_uring/net: Avoid msghdr on op_connect/op_bind async data
Georgi Djakov (1):
drivers/base/memory: set mem->altmap after successful device registration
Gil Portnoy (1):
ksmbd: reject non-VALID session in compound request branch
Giovanni Cabiddu (1):
crypto: qat - remove unused character device and IOCTLs
Greg Kroah-Hartman (1):
Linux 7.1.2
Joanne Koong (1):
fuse: re-lock request before replacing page cache folio
Miklos Szeredi (1):
virtiofs: fix UAF on submount umount
Mingyu Wang (1):
agp/amd64: Fix broken error propagation in agp_amd64_probe()
Ruslan Valiyev (1):
media: vidtv: fix NULL pointer dereference in vidtv_mux_push_si
Sam Daly (2):
iio: light: veml6075: add bounds check to veml6075_it_ms index
iio: adc: ti-ads1298: add bounds check to pga_settings index
Stepan Ionichev (1):
serial: 8250_dw: unregister 8250 port if clk_notifier_register() fails
Viken Dadhaniya (1):
serial: qcom_geni: Fix RX DMA stall when SE_DMA_RX_LEN_IN is zero
Yang Erkun (1):
Revert "NFSD: Defer sub-object cleanup in export put callbacks"
Yi Yang (1):
vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent vcs_write
Greg Kroah-Hartman
maintainerDocumentation/userspace-api/ioctl/ioctl-number.rst +0 -1
@@ -229,7 +229,6 @@ Code Seq# Include File Comments <mailto:[email protected]> 'a' all linux/atm*.h, linux/sonet.h ATM on linux <http://lrcwww.epfl.ch/> -'a' 00-0F drivers/crypto/qat/qat_common/adf_cfg_common.h conflict! qat driver 'b' 00-FF conflict! bit3 vme host bridge <mailto:[email protected]> 'b' 00-0F linux/dma-buf.h conflict!
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 7 PATCHLEVEL = 1 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Baby Opossum Posse
drivers/base/memory.c +2 -1
@@ -807,7 +807,6 @@ static int add_memory_block(unsigned long block_id, int nid, unsigned long state mem->start_section_nr = block_id * sections_per_block; mem->state = state; mem->nid = nid; - mem->altmap = altmap;INIT_LIST_HEAD (&mem->group_next);#ifndef CONFIG_NUMA
@@ -825,6 +824,8 @@ static int add_memory_block(unsigned long block_id, int nid, unsigned long stateif (ret)return ret; + mem->altmap = altmap; +if (group) { mem->group = group;list_add (&mem->group_next, &group->memory_blocks);
drivers/char/agp/amd64-agp.c +1 -1
@@ -546,7 +546,7 @@ static int agp_amd64_probe(struct pci_dev *pdev,/* Fill in the mode register */ pci_read_config_dword (pdev, bridge->capndx+PCI_AGP_STATUS , &bridge->mode); -if (cache_nbs (pdev, cap_ptr) ==-1 ) { +if (cache_nbs (pdev, cap_ptr) <0 ) {agp_put_bridge (bridge);return -ENODEV ; }
drivers/crypto/intel/qat/qat_common/adf_cfg.c +0 -10
@@ -103,16 +103,6 @@ static void adf_cfg_section_del_all(struct list_head *head);static void adf_cfg_section_del_all_except (struct list_head *head,const char *section_name); -void adf_cfg_del_all (struct adf_accel_dev *accel_dev) -{ -struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg; - -down_write (&dev_cfg_data->lock); -adf_cfg_section_del_all (&dev_cfg_data->sec_list); -up_write (&dev_cfg_data->lock); -clear_bit (ADF_STATUS_CONFIGURED , &accel_dev->status); -} -void adf_cfg_del_all_except (struct adf_accel_dev *accel_dev,const char *section_name) {
drivers/crypto/intel/qat/qat_common/adf_cfg.h +0 -1
@@ -34,7 +34,6 @@ void adf_cfg_dev_remove(struct adf_accel_dev *accel_dev);void adf_cfg_dev_dbgfs_add (struct adf_accel_dev *accel_dev);void adf_cfg_dev_dbgfs_rm (struct adf_accel_dev *accel_dev);int adf_cfg_section_add (struct adf_accel_dev *accel_dev,const char *name); -void adf_cfg_del_all (struct adf_accel_dev *accel_dev);void adf_cfg_del_all_except (struct adf_accel_dev *accel_dev,const char *section_name); int adf_cfg_add_key_value_param(struct adf_accel_dev *accel_dev,
drivers/crypto/intel/qat/qat_common/adf_cfg_common.h +0 -32
@@ -4,18 +4,11 @@#define ADF_CFG_COMMON_H_ #include <linux/types.h> -#include <linux/ioctl.h> #define ADF_CFG_MAX_STR_LEN 64#define ADF_CFG_MAX_KEY_LEN_IN_BYTES ADF_CFG_MAX_STR_LEN#define ADF_CFG_MAX_VAL_LEN_IN_BYTES ADF_CFG_MAX_STR_LEN#define ADF_CFG_MAX_SECTION_LEN_IN_BYTES ADF_CFG_MAX_STR_LEN -#define ADF_CFG_BASE_DEC 10 -#define ADF_CFG_BASE_HEX 16 -#define ADF_CFG_ALL_DEVICES 0xFE -#define ADF_CFG_NO_DEVICE 0xFF -#define ADF_CFG_AFFINITY_WHATEVER 0xFF -#define MAX_DEVICE_NAME_SIZE 32#define ADF_MAX_DEVICES (32 * 32)#define ADF_DEVS_ARRAY_SIZE BITS_TO_LONGS(ADF_MAX_DEVICES)
@@ -51,29 +44,4 @@ enum adf_device_type {DEV_420XX , DEV_6XXX, }; - -struct adf_dev_status_info { -enum adf_device_type type; -__u32 accel_id; -__u32 instance_id; -__u8 num_ae; -__u8 num_accel; -__u8 num_logical_accel; -__u8 banks_per_accel; -__u8 state; -__u8 bus; -__u8 dev; -__u8 fun; -char name[MAX_DEVICE_NAME_SIZE ]; -}; - -#define ADF_CTL_IOC_MAGIC 'a' -#define IOCTL_CONFIG_SYS_RESOURCE_PARAMETERS _IOW(ADF_CTL_IOC_MAGIC, 0, \ - struct adf_user_cfg_ctl_data) -#define IOCTL_STOP_ACCEL_DEV _IOW(ADF_CTL_IOC_MAGIC, 1, \ - struct adf_user_cfg_ctl_data) -#define IOCTL_START_ACCEL_DEV _IOW(ADF_CTL_IOC_MAGIC, 2, \ - struct adf_user_cfg_ctl_data) -#define IOCTL_STATUS_ACCEL_DEV _IOW(ADF_CTL_IOC_MAGIC, 3, __u32) -#define IOCTL_GET_NUM_DEVICES _IOW(ADF_CTL_IOC_MAGIC, 4, __s32)#endif
drivers/crypto/intel/qat/qat_common/adf_cfg_user.h deleted +0 -38
@@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) */ -/* Copyright(c) 2014 - 2020 Intel Corporation */ -#ifndef ADF_CFG_USER_H_ -#define ADF_CFG_USER_H_ - -#include "adf_cfg_common.h" -#include "adf_cfg_strings.h" - -struct adf_user_cfg_key_val { -char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES ]; -char val[ADF_CFG_MAX_VAL_LEN_IN_BYTES ]; -union { -struct adf_user_cfg_key_val *next; -__u64 padding3; - }; -enum adf_cfg_val_type type; -} __packed; - -struct adf_user_cfg_section { -char name[ADF_CFG_MAX_SECTION_LEN_IN_BYTES ]; -union { -struct adf_user_cfg_key_val *params; -__u64 padding1; - }; -union { -struct adf_user_cfg_section *next; -__u64 padding3; - }; -} __packed; - -struct adf_user_cfg_ctl_data { -union { -struct adf_user_cfg_section *config_section; -__u64 padding; - }; -__u8 device_id; -} __packed; -#endif
drivers/crypto/intel/qat/qat_common/adf_common_drv.h +0 -3
@@ -68,10 +68,7 @@ int adf_devmgr_add_dev(struct adf_accel_dev *accel_dev,void adf_devmgr_rm_dev (struct adf_accel_dev *accel_dev,struct adf_accel_dev *pf);struct list_head *adf_devmgr_get_head (void ); -struct adf_accel_dev *adf_devmgr_get_dev_by_id (u32 id);struct adf_accel_dev *adf_devmgr_pci_to_accel_dev (struct pci_dev *pci_dev); -int adf_devmgr_verify_id (u32 id); -void adf_devmgr_get_num_dev (u32 *num);int adf_devmgr_in_reset (struct adf_accel_dev *accel_dev);int adf_dev_started (struct adf_accel_dev *accel_dev);int adf_dev_restarting_notify (struct adf_accel_dev *accel_dev);
drivers/crypto/intel/qat/qat_common/adf_ctl_drv.c +1 -403
433 lines not on this page · raw message
drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c +0 -70
82 lines not on this page · raw message
drivers/iio/adc/ti-ads1298.c +6 -1
@@ -279,6 +279,7 @@ static const u8 ads1298_pga_settings[] = { 6, 1, 2, 3, 4, 8, 12 };static int ads1298_get_scale (struct ads1298_private *priv,int channel,int *val,int *val2) { +unsigned int pga_idx;int ret;unsigned int regval;u8 gain;
@@ -302,7 +303,11 @@ static int ads1298_get_scale(struct ads1298_private *priv,if (ret)return ret; - gain = ads1298_pga_settings[FIELD_GET (ADS1298_MASK_CH_PGA , regval)]; + pga_idx =FIELD_GET (ADS1298_MASK_CH_PGA , regval); +if (pga_idx >=ARRAY_SIZE (ads1298_pga_settings)) +return -EINVAL ; + + gain = ads1298_pga_settings[pga_idx]; *val /= gain;/* Full scale is VREF / gain */ *val2 =ADS1298_BITS_PER_SAMPLE -1 ;/* Signed, hence the -1 */
drivers/iio/light/veml6075.c +6 -2
@@ -100,7 +100,7 @@ static const struct iio_chan_spec veml6075_channels[] = {static int veml6075_request_measurement (struct veml6075_data *data) { -int ret, conf, int_time; +int ret, conf, int_time, int_index; ret =regmap_read (data->regmap,VEML6075_CMD_CONF , &conf);if (ret <0 )
@@ -117,7 +117,11 @@ static int veml6075_request_measurement(struct veml6075_data *data)* time for all possible configurations. Using a 1.50 factor simplifies * operations and ensures reliability under all circumstances. */ - int_time = veml6075_it_ms[FIELD_GET (VEML6075_CONF_IT , conf)]; + int_index =FIELD_GET (VEML6075_CONF_IT , conf); +if (int_index >=ARRAY_SIZE (veml6075_it_ms)) +return -EINVAL ; + + int_time = veml6075_it_ms[int_index];msleep (int_time + (int_time /2 ));/* shutdown again, data registers are still accessible */
drivers/media/test-drivers/vidtv/vidtv_mux.c +7 -1
@@ -101,7 +101,8 @@ static int vidtv_mux_pid_ctx_init(struct vidtv_mux *m)/* add a ctx for all PMT sections */ while (p) { pid =vidtv_psi_get_pat_program_pid (p); -vidtv_mux_create_pid_ctx_once (m, pid); +if (!vidtv_mux_create_pid_ctx_once (m, pid)) + goto free; p = p->next; }
@@ -170,6 +171,9 @@ static u32 vidtv_mux_push_si(struct vidtv_mux *m) nit_ctx =vidtv_mux_get_pid_ctx (m,VIDTV_NIT_PID ); eit_ctx =vidtv_mux_get_pid_ctx (m,VIDTV_EIT_PID ); +if (!pat_ctx || !sdt_ctx || !nit_ctx || !eit_ctx) +return 0 ; + pat_args.offset = m->mux_buf_offset; pat_args.continuity_counter = &pat_ctx->cc;
@@ -186,6 +190,8 @@ static u32 vidtv_mux_push_si(struct vidtv_mux *m) } pmt_ctx =vidtv_mux_get_pid_ctx (m, pmt_pid); +if (!pmt_ctx) +continue ; pmt_args.offset = m->mux_buf_offset; pmt_args.pmt = m->si.pmt_secs[i];
drivers/tty/serial/8250/8250_dw.c +3 -1
@@ -850,8 +850,10 @@ static int dw8250_probe(struct platform_device *pdev)*/ if (data->clk) { err =clk_notifier_register (data->clk, &data->clk_notifier); -if (err) +if (err) { +serial8250_unregister_port (data->data.line);return dev_err_probe (dev, err,"Failed to set the clock notifier\n" ); + }queue_work (system_dfl_wq, &data->clk_work); }
drivers/tty/serial/qcom_geni_serial.c +3 -6
@@ -905,12 +905,9 @@ static void qcom_geni_serial_handle_rx_dma(struct uart_port *uport, bool drop) port->rx_dma_addr =0 ; rx_in =readl (uport->membase +SE_DMA_RX_LEN_IN ); -if (!rx_in) { -dev_warn (uport->dev,"serial engine reports 0 RX bytes in!\n" ); -return ; - } - -if (!drop) +if (!rx_in) +dev_warn_ratelimited (uport->dev,"serial engine reports 0 RX bytes in!\n" ); +else if (!drop)handle_rx_uart (uport, rx_in); ret = geni_se_rx_dma_prep(&port->se, port->rx_buf,
drivers/tty/vt/vc_screen.c +1 -1
@@ -686,7 +686,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) } *ppos += written; ret = written; -if (written) +if (written && vc)vcs_scr_updated (vc);return ret;
fs/fuse/dev.c +5 -14
@@ -1037,6 +1037,10 @@ static int fuse_try_move_folio(struct fuse_copy_state *cs, struct folio **foliopif (WARN_ON (folio_test_mlocked (oldfolio))) goto out_fallback_unlock; + err =lock_request (cs->req); +if (err) + goto out_fallback_unlock; +replace_page_cache_folio (oldfolio, newfolio);folio_get (newfolio);
@@ -1050,20 +1054,7 @@ static int fuse_try_move_folio(struct fuse_copy_state *cs, struct folio **foliop*/ pipe_buf_release (cs->pipe, buf); - err =0 ; -spin_lock (&cs->req->waitq.lock); -if (test_bit (FR_ABORTED , &cs->req->flags)) - err = -ENOENT ; -else - *foliop = newfolio; -spin_unlock (&cs->req->waitq.lock); - -if (err) { -folio_unlock (newfolio); -folio_put (newfolio); - goto out_put_old; - } - + *foliop = newfolio;folio_unlock (oldfolio);/* Drop ref for ap->pages[] array */ folio_put (oldfolio);
fs/fuse/file.c +7 -1
@@ -380,8 +380,14 @@ void fuse_file_release(struct inode *inode, struct fuse_file *ff,* aio and closes the fd before the aio completes. Since aio takes its * own ref to the file, the IO completion has to drop the ref, which is * how the fuse server can end up closing its clients' files. +* +* Exception is virtio-fs, which is not affected by the above (server is +* on host, cannot close open files in guest). Virtio-fs needs sync +* release, because the num_waiting mechanism to wait for all requests +* before commencing with fs shutdown doesn't work if submounts are +* used. */ -fuse_file_put (ff, false); +fuse_file_put (ff, ff->fm->fc->auto_submounts); }void fuse_release_common (struct file *file,bool isdir)
fs/nfsd/export.c +9 -54
105 lines not on this page · raw message
fs/nfsd/export.h +2 -5
@@ -7,7 +7,6 @@#include <linux/sunrpc/cache.h> #include <linux/percpu_counter.h> -#include <linux/workqueue.h> #include <uapi/linux/nfsd/export.h> #include <linux/nfs4.h>
@@ -76,7 +75,7 @@ struct svc_export {u32 ex_layout_types;struct nfsd4_deviceid_map *ex_devid_map;struct cache_detail *cd; -struct rcu_work ex_rwork; +struct rcu_head ex_rcu;unsigned long ex_xprtsec_modes;struct export_stats *ex_stats; };
@@ -93,7 +92,7 @@ struct svc_expkey {u32 ek_fsid[6 ];struct path ek_path; -struct rcu_work ek_rwork; +struct rcu_head ek_rcu; };#define EX_ISSYNC (exp) (!((exp)->ex_flags & NFSEXP_ASYNC))
@@ -111,8 +110,6 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp,/* * Function declarations */ -int nfsd_export_wq_init (void ); -void nfsd_export_wq_shutdown (void );int nfsd_export_init (struct net *);void nfsd_export_shutdown (struct net *);void nfsd_export_flush (struct net *);
fs/nfsd/nfsctl.c +1 -7
@@ -2320,12 +2320,9 @@ static int __init init_nfsd(void)if (retval) goto out_free_pnfs;nfsd_lockd_init ();/* lockd->nfsd callbacks */ - retval =nfsd_export_wq_init (); -if (retval) - goto out_free_lockd; retval =register_pernet_subsys (&nfsd_net_ops);if (retval <0 ) - goto out_free_export_wq; + goto out_free_lockd; retval =register_cld_notifier ();if (retval) goto out_free_subsys;
@@ -2354,8 +2351,6 @@ static int __init init_nfsd(void)unregister_cld_notifier (); out_free_subsys:unregister_pernet_subsys (&nfsd_net_ops); -out_free_export_wq: -nfsd_export_wq_shutdown (); out_free_lockd:nfsd_lockd_shutdown ();nfsd_drc_slab_free ();
@@ -2376,7 +2371,6 @@ static void __exit exit_nfsd(void)nfsd4_destroy_laundry_wq ();unregister_cld_notifier ();unregister_pernet_subsys (&nfsd_net_ops); -nfsd_export_wq_shutdown ();nfsd_drc_slab_free ();nfsd_lockd_shutdown ();nfsd4_free_slabs ();
fs/smb/server/smb2pdu.c +5 -0
@@ -613,6 +613,11 @@ int smb2_check_user_session(struct ksmbd_work *work) sess_id, work->sess->id);return -EINVAL ; } +if (work->sess->state !=SMB2_SESSION_VALID ) { +pr_err ("compound request on a non-valid session (state %d)\n" , + work->sess->state); +return -EINVAL ; + }return 1 ; }
io_uring/net.c +18 -18
@@ -1733,7 +1733,7 @@ int io_socket(struct io_kiocb *req, unsigned int issue_flags)int io_connect_prep (struct io_kiocb *req,const struct io_uring_sqe *sqe) { struct io_connect *conn = io_kiocb_to_cmd(req, struct io_connect); -struct io_async_msghdr *io; +struct sockaddr_storage *addr;if (sqe->len || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in)return -EINVAL ;
@@ -1742,17 +1742,17 @@ int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) conn->addr_len =READ_ONCE (sqe->addr2); conn->in_progress = conn->seen_econnaborted = false; - io =io_msg_alloc_async (req); -if (unlikely (!io)) + addr =io_uring_alloc_async_data (NULL , req); +if (unlikely (!addr))return -ENOMEM ; -return move_addr_to_kernel (conn->addr, conn->addr_len, &io->addr); +return move_addr_to_kernel (conn->addr, conn->addr_len, addr); }int io_connect (struct io_kiocb *req,unsigned int issue_flags) { struct io_connect *connect = io_kiocb_to_cmd(req, struct io_connect); -struct io_async_msghdr *io = req->async_data; +struct sockaddr_storage *addr = req->async_data;unsigned file_flags;int ret;bool force_nonblock = issue_flags &IO_URING_F_NONBLOCK ;
@@ -1766,8 +1766,7 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags) file_flags = force_nonblock ?O_NONBLOCK :0 ; - ret =__sys_connect_file (req->file, &io->addr, connect->addr_len, - file_flags); + ret =__sys_connect_file (req->file, addr, connect->addr_len, file_flags);if ((ret == -EAGAIN || ret == -EINPROGRESS || ret == -ECONNABORTED ) && force_nonblock) {if (ret == -EINPROGRESS ) {
@@ -1796,7 +1795,6 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags) out:if (ret <0 )req_set_fail (req); -io_req_msg_cleanup (req, issue_flags);io_req_set_res (req, ret,0 );return IOU_COMPLETE ; }
@@ -1806,15 +1804,15 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags)* which in turn end up in mnt_want_write() which will grab the fs * percpu start write sem. This can trigger a lockdep warning. */ -static int io_bind_file_create (const struct io_async_msghdr *io,int addr_len) +static int io_bind_file_create (const struct sockaddr_storage *addr,int addr_len) {const struct sockaddr_un *sun; -if (io->addr.ss_family !=AF_UNIX ) +if (addr->ss_family !=AF_UNIX )return 0 ;if (addr_len <= offsetof(struct sockaddr_un , sun_path))return 0 ; - sun = (const struct sockaddr_un *) &io->addr; + sun = (const struct sockaddr_un *) addr;return sun->sun_path[0 ] !='\0' ; }
@@ -1822,7 +1820,7 @@ int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind);struct sockaddr __user *uaddr; -struct io_async_msghdr *io; +struct sockaddr_storage *addr;int ret;if (sqe->len || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in)
@@ -1831,21 +1829,23 @@ int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) uaddr =u64_to_user_ptr (READ_ONCE (sqe->addr)); bind->addr_len =READ_ONCE (sqe->addr2); - io =io_msg_alloc_async (req); -if (unlikely (!io)) + addr =io_uring_alloc_async_data (NULL , req); +if (unlikely (!addr))return -ENOMEM ; - ret =move_addr_to_kernel (uaddr, bind->addr_len, &io->addr); + + ret =move_addr_to_kernel (uaddr, bind->addr_len, addr);if (unlikely (ret))return ret; -if (io_bind_file_create (io, bind->addr_len)) +if (io_bind_file_create (addr, bind->addr_len)) req->flags |=REQ_F_FORCE_ASYNC ;return 0 ; } +int io_bind (struct io_kiocb *req,unsigned int issue_flags) { struct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind); -struct io_async_msghdr *io = req->async_data; +struct sockaddr_storage *addr = req->async_data;struct socket *sock;int ret;
@@ -1853,7 +1853,7 @@ int io_bind(struct io_kiocb *req, unsigned int issue_flags)if (unlikely (!sock))return -ENOTSOCK ; - ret =__sys_bind_socket (sock, &io->addr, bind->addr_len); + ret =__sys_bind_socket (sock, addr, bind->addr_len);if (ret <0 )req_set_fail (req);io_req_set_res (req, ret,0 );
io_uring/opdef.c +2 -2
@@ -203,7 +203,7 @@ const struct io_issue_def io_issue_defs[] = { .unbound_nonreg_file = 1, .pollout = 1,#if defined(CONFIG_NET ) - .async_size = sizeof(struct io_async_msghdr), + .async_size = sizeof(struct sockaddr_storage), .prep = io_connect_prep, .issue = io_connect,#else
@@ -503,7 +503,7 @@ const struct io_issue_def io_issue_defs[] = { .needs_file = 1, .prep = io_bind_prep, .issue = io_bind, - .async_size = sizeof(struct io_async_msghdr), + .async_size = sizeof(struct sockaddr_storage), #else .prep = io_eopnotsupp_prep,#endif