[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200329150831.GB1825@localhost>
Date: Sun, 29 Mar 2020 08:08:31 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Vladimir Oltean <olteanv@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Yangbo Lu <yangbo.lu@....com>
Subject: Re: [PATCH net-next 1/1] ptp: Avoid deadlocks in the programmable
pin code.
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
Powered by blists - more mailing lists