Re: [cocci] Increasing usage of spinlock guards (with SmPL)?

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

 



>> @replacement@
>> expression e;
>> @@
>> -raw_spin_lock
>> +guard(raw_spinlock_irq)
>>               (&e);
>>  ... when != e
>>      when any
>> -raw_spin_unlock(&e);
>
> What exactly is the problem?

There are several development challenges remaining to make the application of similar
SmPL script variants really safe.
https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/spinlock.h#L537

The discussed guards combine two actions.
The shown transformation pattern depends on the deletion of the first action identifier.
This identifier should also be usable to determine a corresponding guard parameter
and the companion action.

Action pairs can eventually be stored in special data structures
so that a mapping can be automatically performed (on demand).

See also:
Working with variables for case match identification by SmPL disjunctions
2019-02-19
https://github.com/coccinelle/coccinelle/issues/159


Regards,
Markus





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux