Commit 51d36de8 authored by Li Lingfeng's avatar Li Lingfeng Committed by Jialin Zhang
Browse files

fix kabi broken due to import of 5.15-stable io_uring

Offering: HULK
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6BTWC



-------------------

Commit 5125c6de8709("[Backport] io_uring: import 5.15-stable io_uring")
changes some structs, so we need to fix kabi broken problem.

Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarWang Weiyang <wangweiyang2@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 3f5e2ba9
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -5,6 +5,37 @@
#include <linux/sched.h>
#include <linux/xarray.h>

struct io_identity {
	struct files_struct		*files;
	struct mm_struct		*mm;
#ifdef CONFIG_BLK_CGROUP
	struct cgroup_subsys_state	*blkcg_css;
#endif
	const struct cred		*creds;
	struct nsproxy			*nsproxy;
	struct fs_struct		*fs;
	unsigned long			fsize;
#ifdef CONFIG_AUDIT
	kuid_t				loginuid;
	unsigned int			sessionid;
#endif
	refcount_t			count;
};

#ifdef __GENKSYMS__
struct io_uring_task {
	/* submission side */
	struct xarray			xa;
	struct wait_queue_head		wait;
	struct file			*last;
	struct percpu_counter		inflight;
	struct io_identity		 __identity;
	struct io_identity		*identity;
	atomic_t			in_idle;
	bool				sqpoll;
};
#endif

#if defined(CONFIG_IO_URING)
struct sock *io_uring_get_socket(struct file *file);
void __io_uring_cancel(bool cancel_all);
+1 −4
Original line number Diff line number Diff line
@@ -925,9 +925,6 @@ struct task_struct {
	/* CLONE_CHILD_CLEARTID: */
	int __user			*clear_child_tid;

	/* PF_IO_WORKER */
	void				*pf_io_worker;

	u64				utime;
	u64				stime;
#ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
@@ -1424,7 +1421,7 @@ struct task_struct {
#else
	KABI_RESERVE(6)
#endif
	KABI_RESERVE(7)
	KABI_USE(7, void *pf_io_worker)
	KABI_RESERVE(8)
	KABI_RESERVE(9)
	KABI_RESERVE(10)
+1 −1
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ asmlinkage long sys_io_uring_setup(u32 entries,
				struct io_uring_params __user *p);
asmlinkage long sys_io_uring_enter(unsigned int fd, u32 to_submit,
				u32 min_complete, u32 flags,
				const void __user *argp, size_t argsz);
				const sigset_t __user *sig, size_t sigsz);
asmlinkage long sys_io_uring_register(unsigned int fd, unsigned int op,
				void __user *arg, unsigned int nr_args);

+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
#define INTERNAL_IO_WQ_H

#include <linux/refcount.h>

#include <linux/io_uring.h>
struct io_wq;

enum {
+6 −2
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@ struct io_ring_ctx {
	};
};

#ifndef __GENKSYMS__
struct io_uring_task {
	/* submission side */
	int			cached_refs;
@@ -477,6 +478,7 @@ struct io_uring_task {
	struct callback_head	task_work;
	bool			task_running;
};
#endif

/*
 * First field must be the file pointer in all the
@@ -9850,13 +9852,15 @@ static int io_get_ext_arg(unsigned flags, const void __user *argp, size_t *argsz
}

SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
		u32, min_complete, u32, flags, const void __user *, argp,
		size_t, argsz)
		u32, min_complete, u32, flags, const sigset_t __user *, sig,
		size_t, sigsz)
{
	struct io_ring_ctx *ctx;
	int submitted = 0;
	struct fd f;
	long ret;
	const void __user *argp = (const void __user *) sig;
	size_t argsz = sigsz;

	io_run_task_work();