From: David Miller <davem@davemloft.net>
To: zwu.kernel@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
wuzhy@linux.vnet.ibm.com
Subject: Re: [PATCH v2 2/2] tun: update file current position
Date: Fri, 06 Dec 2013 12:45:00 -0500 (EST) [thread overview]
Message-ID: <20131206.124500.1976272290413710707.davem@davemloft.net> (raw)
In-Reply-To: <1386320930-11285-2-git-send-email-zwu.kernel@gmail.com>
From: Zhi Yong Wu <zwu.kernel@gmail.com>
Date: Fri, 6 Dec 2013 17:08:50 +0800
> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>
> Signed-off-by: Zhi Yong Wu <wuzhy@linux.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.
next prev parent reply other threads:[~2013-12-06 17:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 9:08 [PATCH v2 1/2] macvtap: update file current position Zhi Yong Wu
2013-12-06 9:08 ` [PATCH v2 2/2] tun: " Zhi Yong Wu
2013-12-06 17:45 ` David Miller [this message]
2013-12-06 20:32 ` Zhi Yong Wu
2013-12-06 20:36 ` David Miller
2013-12-07 2:28 ` Vlad Yasevich
2013-12-06 17:43 ` [PATCH v2 1/2] macvtap: " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131206.124500.1976272290413710707.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wuzhy@linux.vnet.ibm.com \
--cc=zwu.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).