All of lore.kernel.org
 help / color / mirror / Atom feed
* + pps-locking-scheme-fix-up-for-pps_getparams.patch added to -mm tree
@ 2009-11-03  1:54 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-11-03  1:54 UTC (permalink / raw)
  To: mm-commits; +Cc: giometti, clemens, stable


The patch titled
     pps: locking scheme fix up for PPS_GETPARAMS
has been added to the -mm tree.  Its filename is
     pps-locking-scheme-fix-up-for-pps_getparams.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: pps: locking scheme fix up for PPS_GETPARAMS
From: Rodolfo Giometti <giometti@linux.it>

-ENOCHANGELOG

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Tested-by: Reg Clemens <clemens@dwf.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


diff -puN drivers/pps/pps.c~pps-locking-scheme-fix-up-for-pps_getparams drivers/pps/pps.c
--- a/drivers/pps/pps.c~pps-locking-scheme-fix-up-for-pps_getparams
+++ a/drivers/pps/pps.c
@@ -71,9 +71,14 @@ static long pps_cdev_ioctl(struct 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, &params, sizeof(struct pps_kparams));
 		if (err)
 			return -EFAULT;
 
_

Patches currently in -mm which might be from giometti@linux.it are

linux-next.patch
pps-locking-scheme-fix-up-for-pps_getparams.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-03  1:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03  1:54 + pps-locking-scheme-fix-up-for-pps_getparams.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.