[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131206.124500.1976272290413710707.davem@davemloft.net>
Date: Fri, 06 Dec 2013 12:45:00 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: zwu.kernel@...il.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
wuzhy@...ux.vnet.ibm.com
Subject: Re: [PATCH v2 2/2] tun: update file current position
From: Zhi Yong Wu <zwu.kernel@...il.com>
Date: Fri, 6 Dec 2013 17:08:50 +0800
> From: Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
>
> Signed-off-by: Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
Also applied and queued up for -stable, thanks.
I noticed in these two cases that that min_t() adjustment of 'ret'
seems strange. I can't understand why it's needed.
If, for example, tun_do_read() really did read more than 'len'
bytes:
1) That would write past the end of the buffer.
2) Writing a different value to the ->ki_pos would mean
that ->ki_pos is now inaccurate.
Unless someone can explain why the min_t() is needed, we should remove
it.
--
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