On 9/24/2021 3:33 AM, Thomas Gleixner wrote:
If this ever comes back in some form, then I pretty please want the life
time rules of this documented properly.
I'll document the life time rules for the UPID, vector and UITT next
time. I realize now that they are quite convoluted in the current
implementation.
I'll also fix the concurrency and serialization issues that you
mentioned in this patch and the next one.
+ ret = task_work_add(r_info->upid_ctx->task, &r_info->twork, true);
Care to look at the type of the third argument of task_work_add()?
Ah! I didn't realize the third argument changed a long time back.
+/*
+ * sys_uintr_create_fd - Create a uintr_fd for the registered interrupt vector.
So this creates a file descriptor for a vector which is already
allocated and then it calls do_uintr_register_vector() which allocates
the vector?
The syscall comment is misleading. Will fix it.
Vector allocation happens in userspace. The application is only expected
to register the vector.
This syscall only creates an FD abstraction for the vector that is
*being* registered.
+ */
+SYSCALL_DEFINE2(uintr_create_fd, u64, vector, unsigned int, flags)
+{
Thanks,
Sohil