File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 156
156
* },
157
157
* .ops = my_custom_ops,
158
158
* };
159
+ *
160
+ * Please note that such custom ops approach is valid, but it is hard to implement
161
+ * it right without global locks per-device to protect from auxiliary_drv removal
162
+ * during call to that ops. In addition, this implementation lacks proper module
163
+ * dependency, which causes to load/unload races between auxiliary parent and devices
164
+ * modules.
165
+ *
166
+ * The most easiest way to provide these ops reliably without needing to
167
+ * have a lock is to EXPORT_SYMBOL*() them and rely on already existing
168
+ * modules infrastructure for validity and correct dependencies chains.
159
169
*/
160
170
161
171
static const struct auxiliary_device_id * auxiliary_match_id (const struct auxiliary_device_id * id ,
You can’t perform that action at this time.
0 commit comments