Prev: [44/98] x86-64: Clear a 64-bit FS/GS base on fork if selector is nonzero
Next: [53/98] ALSA: snd-meastro3: Add amp_gpio quirk for Compaq EVO N600C
From: Greg KH on 10 May 2010 19:10 2.6.32-stable review patch. If anyone has any objections, please let us know. ------------------ From: Joel Becker <joel.becker(a)oracle.com> commit a36d515c7a2dfacebcf41729f6812dbc424ebcf0 upstream. When asked for a partial read of the LVB in a dlmfs file, we can accidentally calculate a negative count. Reported-by: Dan Carpenter <error27(a)gmail.com> Signed-off-by: Joel Becker <joel.becker(a)oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- fs/ocfs2/dlm/dlmfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c @@ -205,7 +205,7 @@ static ssize_t dlmfs_file_read(struct fi if ((count + *ppos) > i_size_read(inode)) readlen = i_size_read(inode) - *ppos; else - readlen = count - *ppos; + readlen = count; lvb_buf = kmalloc(readlen, GFP_NOFS); if (!lvb_buf) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |