summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMeng Xu <mengxu.gatech@gmail.com>2017-09-19 21:49:55 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-12 11:51:21 +0200
commit93eef2172d2352d6cff07008e689cc56d841f35a (patch)
tree62a7a915dd580918adc7210fee4285f198499d97 /net
parent0dee549f79121393e13efc0c2a05a98da00f3eda (diff)
isdn/i4l: fetch the ppp_write buffer in one shot
[ Upstream commit 02388bf87f72e1d47174cd8f81c34443920eb5a0 ] In isdn_ppp_write(), the header (i.e., protobuf) of the buffer is fetched twice from userspace. The first fetch is used to peek at the protocol of the message and reset the huptimer if necessary; while the second fetch copies in the whole buffer. However, given that buf resides in userspace memory, a user process can race to change its memory content across fetches. By doing so, we can either avoid resetting the huptimer for any type of packets (by first setting proto to PPP_LCP and later change to the actual type) or force resetting the huptimer for LCP packets. This patch changes this double-fetch behavior into two single fetches decided by condition (lp->isdn_device < 0 || lp->isdn_channel <0). A more detailed discussion can be found at https://marc.info/?l=linux-kernel&m=150586376926123&w=2 Signed-off-by: Meng Xu <mengxu.gatech@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions