public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@intel•com>
To: Miroslav Lichvar <mlichvar@redhat•com>, netdev@vger•kernel.org
Cc: Miroslav Lichvar <mlichvar@redhat•com>,
	Yangbo Lu <yangbo.lu@nxp•com>,
	Yang Yingliang <yangyingliang@huawei•com>,
	Richard Cochran <richardcochran@gmail•com>
Subject: Re: [PATCH net-next 1/5] ptp: unregister virtual clocks when unregistering physical clock.
Date: Thu, 27 Jan 2022 15:58:02 -0800	[thread overview]
Message-ID: <87czkcn33p.fsf@intel.com> (raw)
In-Reply-To: <20220127114536.1121765-2-mlichvar@redhat.com>

Miroslav Lichvar <mlichvar@redhat•com> writes:

> When unregistering a physical clock which has some virtual clocks,
> unregister the virtual clocks with it.
>
> This fixes the following oops, which can be triggered by unloading
> a driver providing a PTP clock when it has enabled virtual clocks:
>
> BUG: unable to handle page fault for address: ffffffffc04fc4d8
> Oops: 0000 [#1] PREEMPT SMP NOPTI
> RIP: 0010:ptp_vclock_read+0x31/0xb0
> Call Trace:
>  timecounter_read+0xf/0x50
>  ptp_vclock_refresh+0x2c/0x50
>  ? ptp_clock_release+0x40/0x40
>  ptp_aux_kworker+0x17/0x30
>  kthread_worker_fn+0x9b/0x240
>  ? kthread_should_park+0x30/0x30
>  kthread+0xe2/0x110
>  ? kthread_complete_and_exit+0x20/0x20
>  ret_from_fork+0x22/0x30
>
> Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion")
> Signed-off-by: Miroslav Lichvar <mlichvar@redhat•com>
> Cc: Yangbo Lu <yangbo.lu@nxp•com>
> Cc: Yang Yingliang <yangyingliang@huawei•com>
> Cc: Richard Cochran <richardcochran@gmail•com>
> ---

I am not against this change, but I think this problem was discussed
before and the suggestions were to fix it differently:

https://lore.kernel.org/all/20210807144332.szyazdfl42abwzmd@skbuf/


Cheers,
-- 
Vinicius

  reply	other threads:[~2022-01-27 23:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 11:45 [PATCH net-next 0/5] Virtual PTP clock improvements and fix Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 1/5] ptp: unregister virtual clocks when unregistering physical clock Miroslav Lichvar
2022-01-27 23:58   ` Vinicius Costa Gomes [this message]
2022-01-31 10:07     ` Miroslav Lichvar
2022-01-31 12:41       ` Vladimir Oltean
2022-01-27 11:45 ` [PATCH net-next 2/5] ptp: increase maximum adjustment of virtual clocks Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 3/5] ptp: add gettimex64() to " Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 4/5] ptp: add getcrosststamp() " Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 5/5] ptp: start virtual clocks at current system time Miroslav Lichvar
2022-01-27 22:01   ` Richard Cochran
2022-01-31 10:21     ` Miroslav Lichvar
2022-01-31 16:32       ` Richard Cochran
2022-02-01  8:42         ` Miroslav Lichvar
2022-02-01 19:10           ` Richard Cochran
2022-02-01 19:03       ` Richard Cochran
2022-02-02  9:07         ` Miroslav Lichvar
2022-01-27 22:02 ` [PATCH net-next 0/5] Virtual PTP clock improvements and fix Richard Cochran

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=87czkcn33p.fsf@intel.com \
    --to=vinicius.gomes@intel$(echo .)com \
    --cc=mlichvar@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=richardcochran@gmail$(echo .)com \
    --cc=yangbo.lu@nxp$(echo .)com \
    --cc=yangyingliang@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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