Messages in this thread | | | Date | Thu, 8 Jul 2021 17:36:49 +0200 | From | Greg KH <> | Subject | Re: [PATCH] kfifo: DECLARE_KIFO_PTR(fifo, u64) does not work on arm 32 bit |
| |
On Thu, Jul 08, 2021 at 10:23:41AM -0500, Matthew Weber wrote: > From: Sean Young <sean@mess.org> > > If you try to store u64 in a kfifo (or a struct with u64 members), > then the buf member of __STRUCT_KFIFO_PTR will cause 4 bytes > padding due to alignment (note that struct __kfifo is 20 bytes > on 32 bit). > > That in turn causes the __is_kfifo_ptr() to fail, which is caught > by kfifo_alloc(), which now returns EINVAL. > > So, ensure that __is_kfifo_ptr() compares to the right structure. > > Signed-off-by: Sean Young <sean@mess.org> > Acked-by: Stefani Seibold <stefani@seibold.net> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> > Signed-off-by: Matthew Weber <matthew.weber@collins.com> > --- > > This patch originally made it into 4.16 as > 8a866fee3909c49738e1c4429a8d2b9bf27e015d but is a bug on at least 4.14 > for any 32bit system(PPC/ARM/...) using kfifo with u64 datatypes. > > Please add to linux-4.14.y for the next LTS tag. > (Below patch is a cherry-pick of the commit onto linux-4.14.y and was > verified on 32bit hardware.)
Now queued up, thanks.
greg k-h
| |