aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pps/pps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pps/pps.c')
-rw-r--r--drivers/pps/pps.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
index 3a546ec10d90..22a65ad4e46e 100644
--- a/drivers/pps/pps.c
+++ b/drivers/pps/pps.c
@@ -152,6 +152,14 @@ static long pps_cdev_ioctl(struct file *file,
152 pps->params.mode |= PPS_CANWAIT; 152 pps->params.mode |= PPS_CANWAIT;
153 pps->params.api_version = PPS_API_VERS; 153 pps->params.api_version = PPS_API_VERS;
154 154
155 /*
156 * Clear unused fields of pps_kparams to avoid leaking
157 * uninitialized data of the PPS_SETPARAMS caller via
158 * PPS_GETPARAMS
159 */
160 pps->params.assert_off_tu.flags = 0;
161 pps->params.clear_off_tu.flags = 0;
162
155 spin_unlock_irq(&pps->lock); 163 spin_unlock_irq(&pps->lock);
156 164
157 break; 165 break;