Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mengxu.gatech@gmail.com
Cc: isdn@linux-pingi.de, johannes.berg@intel.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	meng.xu@gatech.edu, sanidhya@gatech.edu, taesoo@gatech.edu
Subject: Re: [PATCH] isdn/i4l: fetch the ppp_write buffer in one shot
Date: Wed, 20 Sep 2017 16:01:55 -0700 (PDT)	[thread overview]
Message-ID: <20170920.160155.1154864064570909831.davem@davemloft.net> (raw)
In-Reply-To: <1505872195-46627-1-git-send-email-mengxu.gatech@gmail.com>

From: Meng Xu <mengxu.gatech@gmail.com>
Date: Tue, 19 Sep 2017 21:49:55 -0400

> 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>

Applied, thank you.

      reply	other threads:[~2017-09-20 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20  1:49 [PATCH] isdn/i4l: fetch the ppp_write buffer in one shot Meng Xu
2017-09-20 23:01 ` David Miller [this message]

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=20170920.160155.1154864064570909831.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=isdn@linux-pingi.de \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meng.xu@gatech.edu \
    --cc=mengxu.gatech@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sanidhya@gatech.edu \
    --cc=taesoo@gatech.edu \
    /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