Subject: Re: [PATCH net-next 1/1] ptp: Avoid deadlocks in the programmable pin code.

From: Richard Cochran <[email-masked]>
Date: Sun, 29 Mar 2020 08:08:31 -0700

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