Re: [cocci] [v2 1/2] coccinelle: locks: add missing_mutex_init.cocci script

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

 




在 2022/9/21 4:24, Markus Elfring 写道:
+@r3@
+identifier s, fld;
+position p != {r2.p};
Why do you think that such a SmPL constraint would be required?


+@@
+
+struct s {
+  ...
+  struct mutex fld@p;
+  ...
+};
Why would the source code search repetition matter here?
He is searching for a structure that is different from the ones matched previously.
How many mutexes (or spin locks) should be initialised before further data
processing can be safely performed with corresponding structures?

In my opinion, every mutexes and spin locks needs to be initialised before use.

Best regards,
Yuan Can




[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