From: Andrew Morton <akpm@linux-foundation.org>
To: Rodolfo Giometti <giometti@linux.it>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pps: locking scheme fix up for PPS_GETPARAMS.
Date: Mon, 2 Nov 2009 17:54:09 -0800 [thread overview]
Message-ID: <20091102175409.3fad4d64.akpm@linux-foundation.org> (raw)
In-Reply-To: <1257005003-9889-1-git-send-email-giometti@linux.it>
On Sat, 31 Oct 2009 17:03:23 +0100
Rodolfo Giometti <giometti@linux.it> wrote:
> Signed-off-by: Rodolfo Giometti <giometti@linux.it>
> Tested-by: Reg Clemens <clemens@dwf.com>
Please don't send unchangelogged patches.
>
> diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
> index fea17e7..ca5183b 100644
> --- a/drivers/pps/pps.c
> +++ b/drivers/pps/pps.c
> @@ -71,9 +71,14 @@ static long pps_cdev_ioctl(struct file *file,
> case PPS_GETPARAMS:
> pr_debug("PPS_GETPARAMS: source %d\n", pps->id);
>
> - /* Return current parameters */
> - err = copy_to_user(uarg, &pps->params,
> - sizeof(struct pps_kparams));
> + spin_lock_irq(&pps->lock);
> +
> + /* Get the current parameters */
> + params = pps->params;
> +
> + spin_unlock_irq(&pps->lock);
> +
> + err = copy_to_user(uarg, ¶ms, sizeof(struct pps_kparams));
> if (err)
> return -EFAULT;
>
OK, I can see what the patch does and I can guess what sort of
situations would trigger it. But that's really not good enough.
Put yourself in the position of someone who is hitting a PPS bug and
wants to work out if your patch might fix it. Because the patch fails
to describe the user-visible symptoms (ie: the bug) then that person is
in the dark.
Also, someone (ie: me) needs to decide if this fix is to be backported
into earlier kernels. With no description of the end-user impact, how
can I possibly do that?
next prev parent reply other threads:[~2009-11-03 1:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-31 16:03 [PATCH] pps: locking scheme fix up for PPS_GETPARAMS Rodolfo Giometti
2009-11-03 1:54 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-11-06 10:49 Rodolfo Giometti
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=20091102175409.3fad4d64.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=giometti@linux.it \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox