netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>, Yangbo Lu <yangbo.lu@nxp.com>
Subject: Re: [PATCH net-next 1/1] ptp: Avoid deadlocks in the programmable pin code.
Date: Sun, 29 Mar 2020 08:08:31 -0700	[thread overview]
Message-ID: <20200329150831.GB1825@localhost> (raw)
In-Reply-To: <CA+h21hoXhGLE9vsTAqgv8+1UCa_yXsJ5OTGKTR5dOAj_RNFF1w@mail.gmail.com>

On Sun, Mar 29, 2020 at 03:56:18PM +0300, Vladimir Oltean wrote:
> > @@ -175,7 +175,10 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
> >                 }
> >                 req.type = PTP_CLK_REQ_EXTTS;
> >                 enable = req.extts.flags & PTP_ENABLE_FEATURE ? 1 : 0;
> > +               if (mutex_lock_interruptible(&ptp->pincfg_mux))
> > +                       return -ERESTARTSYS;
> 
> Is there any reason why you're not just propagating the return value
> of mutex_lock_interruptible?

Yes, this return code lets the system call be able to be restarted
after interruption by a signal.

Thanks,
Richard

  reply	other threads:[~2020-03-29 15:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29  1:35 [PATCH net-next 1/1] ptp: Avoid deadlocks in the programmable pin code Richard Cochran
2020-03-29 12:56 ` Vladimir Oltean
2020-03-29 15:08   ` Richard Cochran [this message]
2020-03-30 18:10 ` 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=20200329150831.GB1825@localhost \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=yangbo.lu@nxp.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).