mirror of https://github.com/torvalds/linux.git
In various places in the kernel, we modify the fwnode "flags" member
by doing either:
fwnode->flags |= SOME_FLAG;
fwnode->flags &= ~SOME_FLAG;
This type of modification is not thread-safe. If two threads are both
mucking with the flags at the same time then one can clobber the
other.
While flags are often modified while under the "fwnode_link_lock",
this is not universally true.
Create some accessor functions for setting, clearing, and testing the
FWNODE flags and move all users to these accessor functions. New
accessor functions use set_bit() and clear_bit(), which are
thread-safe.
Cc: stable@vger.kernel.org
Fixes:
|
||
|---|---|---|
| .. | ||
| unittest-data | ||
| .kunitconfig | ||
| Kconfig | ||
| Makefile | ||
| address.c | ||
| base.c | ||
| cpu.c | ||
| device.c | ||
| dynamic.c | ||
| empty_root.dts | ||
| fdt.c | ||
| fdt_address.c | ||
| irq.c | ||
| kexec.c | ||
| kobj.c | ||
| kunit_overlay_test.dtso | ||
| module.c | ||
| of_kunit_helpers.c | ||
| of_numa.c | ||
| of_private.h | ||
| of_reserved_mem.c | ||
| of_test.c | ||
| overlay.c | ||
| overlay_test.c | ||
| pdt.c | ||
| platform.c | ||
| property.c | ||
| resolver.c | ||
| unittest.c | ||