FelipeMdeO commented on code in PR #19596:
URL: https://github.com/apache/nuttx/pull/19596#discussion_r3700215161


##########
drivers/sensors/sensor.c:
##########
@@ -1204,6 +1303,19 @@ static int sensor_poll(FAR struct file *filep,
 
 errout:
   nxrmutex_unlock(&upper->lock);
+
+#ifdef CONFIG_SCHED_LPWORK
+  /* Cancel outside the lock: the worker takes it, so cancelling while
+   * holding it would deadlock. fds was cleared above, so a worker that is
+   * already running will neither notify nor re-arm.
+   */
+
+  if (!setup)
+    {
+      work_cancel_sync(LPWORK, &user->work);

Review Comment:
   Ok, I will



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to