svn commit: r325841 - in head/sys: conf dev/mlx4 dev/mlx4/mlx4_core dev/mlx4/mlx4_en dev/mlx4/mlx4_ib modules/mlx4
Colin Percival
cperciva at tarsnap.com
Mon Dec 18 22:54:02 UTC 2017
On 12/18/17 00:15, Hans Petter Selasky wrote:
> On 12/18/17 05:29, Colin Percival wrote:
>> Also, it breaks some work I have in progress for instrumenting SYSINITs.
>> Would you mind moving the DEFINE_MUTEX line to occur immediately prior to
>> the set_port_type function, rather than being placed inside it?
>
> I'll have a look at this later today. Your point is valid!
On further examination, it looks like DEFINE_MUTEX is something used in Linux
kernel code, and the way it works there does allow it to be used inside a
function. Is it possible to change the linuxkpi code to make it safe? (It
looks like our mutex initialization is considerably more complicated than
what Linux does, so maybe not...?)
I have a feeling that we probably don't want to end up in a position of
"every time we import code from Linux, we need to grep for DEFINE_MUTEX
and hoist all of them out of functions".
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
More information about the svn-src-all
mailing list