[merged] pps-locking-scheme-fix-up-for-pps_getparams.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     pps: locking scheme fix up for PPS_GETPARAMS
has been removed from the -mm tree.  Its filename was
     pps-locking-scheme-fix-up-for-pps_getparams.patch

This patch was dropped because it was merged into mainline or a subsystem tree

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@xxxxxxxx>

Userland programs may read/write PPS parameters at same time and these
operations may corrupt PPS data.

Signed-off-by: Rodolfo Giometti <giometti@xxxxxxxx>
Tested-by: Reg Clemens <clemens@xxxxxxx>
Cc: <stable@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


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@xxxxxxxx are

linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux