When updating the priv->writelen value the ppos given to proc_write() should be used instead of file->f_pos. This might lead to a wrong writelen value when pwrite() is used. Signed-off-by: Jan Blunck <jblunck@xxxxxxx> --- drivers/net/wireless/airo.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index abf896a..ae7dea8 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -4659,7 +4659,7 @@ static ssize_t proc_write( struct file *file, if (copy_from_user(priv->wbuffer + pos, buffer, len)) return -EFAULT; if ( pos + len > priv->writelen ) - priv->writelen = len + file->f_pos; + priv->writelen = pos + len; *offset = pos + len; return len; } -- 1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html