Re: [GIT PULL] io_uring fixes for 6.0-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 12, 2022 at 04:19:06PM -0600, Jens Axboe wrote:
> On 8/12/22 4:11 PM, Jens Axboe wrote:
> > For that one suggestion, I suspect this will fix your issue. It's
> > obviously not a thing of beauty...
> 
> While it did fix compile, it's also wrong obviously as io_rw needs to be
> in that union... Thanks Keith, again!

I'd prefer if we can get away with forcing struct kiocb to not grow. The below
should have the randomization move the smallest two fields together so we don't
introduce more padding than necessary:

---
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5113f65c786f..ef7b277cb7f3 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -347,8 +347,10 @@ struct kiocb {
 	loff_t			ki_pos;
 	void (*ki_complete)(struct kiocb *iocb, long ret);
 	void			*private;
-	int			ki_flags;
-	u16			ki_ioprio; /* See linux/ioprio.h */
+	struct {
+		int			ki_flags;
+		u16			ki_ioprio; /* See linux/ioprio.h */
+	};
 	struct wait_page_queue	*ki_waitq; /* for async buffered IO */
 	randomized_struct_fields_end
 };
--



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux