Yogesh, Nice to see your email. > > > +/* Release a spinlock */ > > > +int hwspinlock_unlock(struct hwspinlock *handle) > > > +{ > > > + if (WARN_ON(handle == NULL)) > > > + return -EINVAL; > > > + > > > + /* Release it by writing 0 to it */ > > > + writel(0, handle->lock_reg); > > [[Yogesh Marathe]] Releasing the spinlock without knowing who owns it is > risky. There should be a check for ownership and if authenticated user has > called this api only then it should be released otherwise permission > denied error should be returned. -- I think if there is another Kernel client that is trying to release that is not owned by it then that Kernel client itself is buggy and needs to be fixed. Please share your thoughts on how we can ensure that we can add some protection. > > > > + > > > + pm_runtime_put(&handle->pdev->dev); > > > + > > > + return 0; Thank you, Best regards, Hari -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html