[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87d268c3mi.fsf@rustcorp.com.au>
Date: Wed, 21 Jan 2015 12:10:53 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: Andrey Tsyvarev <tsyvarev@...ras.ru>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] kernel/module.c: Free lock-classes if parse_args failed
Andrey Tsyvarev <tsyvarev@...ras.ru> writes:
> 20.01.2015 9:37, Rusty Russell пишет:
>> Andrey Tsyvarev <tsyvarev@...ras.ru> writes:
>>> parse_args call module parameters' .set handlers, which may use locks defined in the module.
>>> So, these classes should be freed in case parse_args returns error(e.g. due to incorrect parameter passed).
>> Thanks, this seems right. Applied.
>>
>> But this makes me ask: where is lockdep_free_key_range() called on the
>> module init code? It doesn't seem to be at all...
> As I understand, locks are not allowed to be defined in the module init
> section. So, no needs to call lockdep_free_key_range() for it.
> This has a sense: objects from that section are allowed to be used only
> by module->init() function. But a single function call doesn't require
> any synchronization wrt itself.
I don't know that we have any __initdata locks; it would be really
weird.
But change 'static DEFINE_MUTEX(mutex_param);' to 'static __initdata
DEFINE_MUTEX(mutex_param);' to test.
Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists