[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221009093306.24598-1-abd.masalkhi@gmail.com>
Date: Sun, 9 Oct 2022 11:33:06 +0200
From: Abd-Alrhman Masalkhi <abd.masalkhi@...il.com>
To: viro@...iv.linux.org.uk
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: RE: A field in files_struct has been used without initialization
Hello Al Viro
> close_on_exec_init is an array, and this assignment stores the address
> of its first (and only) element into newf->fdtab.close_on_exec. So it's
> basically
> newf->fdtab.close_on_exec = &newf->close_on_exec_init[0];
>
> ->fdtab and ->close_on_exec_init are to be used only if we need no more than
> BITS_PER_LONG descriptors. It's common enough to make avoiding a separate
> allocation (and separate cacheline on following the pointer chain) worth
> the trouble
> ...
> ...
Fascinating, thank you for this very informative response. I have learned a
lot from it.
Powered by blists - more mailing lists