lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Nov 2009 17:40:38 +0100
From:	Jan Blunck <jblunck@...e.de>
To:	linux-fsdevel@...r.kernel.org,
	Christoph Hellwig <hch@...radead.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	Linux-Kernel Mailinglist <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>, jkacur@...hat.com,
	Arnd Bergmann <arnd@...db.de>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Jamie Lokier <jamie@...reable.org>,
	Jan Blunck <jblunck@...e.de>,
	"John W. Linville" <linville@...driver.com>
Subject: [PATCH 08/15] airo: Use ppos instead of file->f_pos

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@...e.de>
---
 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ