Re: Problem with debugfs

From: Greg KH
Date: Mon Sep 20 2010 - 23:43:36 EST


On Tue, Sep 21, 2010 at 10:21:12AM +0800, liguozhu@xxxxxxxxxx wrote:
> Hi, there,
>
> I do not know who is the maintainer for debugfs now.

Did it change? It's always been me. I guess I never created a
MAINTAINERS entry, is it really needed?

> But I think there is problem with its API: It uses filp->priv->mutex
> to protect the read/write (to the file) for the value of its
> attribute, but the mutex is not exported to the API user. Therefore,
> there is no way to protect its value when you directly use the value
> in your module.

What is the problem here, could the value change somehow and you not
like that, or perhaps you read the wrong value from userspace?

Have an example of the issue somewhere?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/