All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next v2 1/2] ptp: correctly disable flags on old ioctls
Date: Wed, 25 Sep 2019 20:43:44 -0700	[thread overview]
Message-ID: <20190926034344.GA21883@localhost> (raw)
In-Reply-To: <20190926022820.7900-2-jacob.e.keller@intel.com>

On Wed, Sep 25, 2019 at 07:28:19PM -0700, Jacob Keller wrote:
> diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
> index 9c18476d8d10..67d0199840fd 100644
> --- a/drivers/ptp/ptp_chardev.c
> +++ b/drivers/ptp/ptp_chardev.c
> @@ -155,7 +155,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
>  			err = -EINVAL;
>  			break;
>  		} else if (cmd == PTP_EXTTS_REQUEST) {
> -			req.extts.flags &= ~PTP_EXTTS_VALID_FLAGS;
> +			req.extts.flags &= PTP_EXTTS_V1_VALID_FLAGS;

Duh, the bit wise negation was not the intention.  Thanks for catching
this, and introducing the "V1" set of flags makes sense.

@davem Please merge this patch as a bug fix.

Acked-by: Richard Cochran <richardcochran@gmail.com>

WARNING: multiple messages have this Message-ID (diff)
From: Richard Cochran <richardcochran@gmail.com>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: netdev@vger.kernel.org,
	Intel Wired LAN <intel-wired-lan@lists.osuosl.org>,
	Jeffrey Kirsher <jeffrey.t.kirsher@intel.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	"David S . Miller" <davem@davemloft.net>,
	Christopher Hall <christopher.s.hall@intel.com>
Subject: Re: [net-next v2 1/2] ptp: correctly disable flags on old ioctls
Date: Wed, 25 Sep 2019 20:43:44 -0700	[thread overview]
Message-ID: <20190926034344.GA21883@localhost> (raw)
In-Reply-To: <20190926022820.7900-2-jacob.e.keller@intel.com>

On Wed, Sep 25, 2019 at 07:28:19PM -0700, Jacob Keller wrote:
> diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
> index 9c18476d8d10..67d0199840fd 100644
> --- a/drivers/ptp/ptp_chardev.c
> +++ b/drivers/ptp/ptp_chardev.c
> @@ -155,7 +155,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
>  			err = -EINVAL;
>  			break;
>  		} else if (cmd == PTP_EXTTS_REQUEST) {
> -			req.extts.flags &= ~PTP_EXTTS_VALID_FLAGS;
> +			req.extts.flags &= PTP_EXTTS_V1_VALID_FLAGS;

Duh, the bit wise negation was not the intention.  Thanks for catching
this, and introducing the "V1" set of flags makes sense.

@davem Please merge this patch as a bug fix.

Acked-by: Richard Cochran <richardcochran@gmail.com>

  reply	other threads:[~2019-09-26  3:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26  2:28 [Intel-wired-lan] [net-next v2 0/2] new PTP ioctl fixes Jacob Keller
2019-09-26  2:28 ` Jacob Keller
2019-09-26  2:28 ` [Intel-wired-lan] [net-next v2 1/2] ptp: correctly disable flags on old ioctls Jacob Keller
2019-09-26  2:28   ` Jacob Keller
2019-09-26  3:43   ` Richard Cochran [this message]
2019-09-26  3:43     ` Richard Cochran
2019-09-27 18:25   ` [Intel-wired-lan] " David Miller
2019-09-27 18:25     ` David Miller
2019-09-26  2:28 ` [Intel-wired-lan] [net-next v2 2/2] net: reject ptp requests with unsupported flags Jacob Keller
2019-09-26  2:28   ` Jacob Keller
2019-09-26  4:02   ` [Intel-wired-lan] " Richard Cochran
2019-09-26  4:02     ` Richard Cochran
2019-09-26 17:41     ` [Intel-wired-lan] " Keller, Jacob E
2019-09-26 17:41       ` Keller, Jacob E
2019-09-26 17:42     ` [Intel-wired-lan] " Keller, Jacob E
2019-09-26 17:42       ` Keller, Jacob E

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=20190926034344.GA21883@localhost \
    --to=richardcochran@gmail.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.