summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarian Chereji <marian.chereji@freescale.com>2013-09-27 13:48:31 (GMT)
committerRivera Jose-B46482 <German.Rivera@freescale.com>2013-09-30 15:44:23 (GMT)
commit2caf0b68157701a12145db5f6d60fce1650c9389 (patch)
treeb28ff6a44bae773f429564efca311c3871ae52e5 /drivers
parent1c0997b604759faa2741e3e5e518f87edf80fed0 (diff)
downloadlinux-fsl-qoriq-2caf0b68157701a12145db5f6d60fce1650c9389.tar.xz
dpa_offload: Propagate error code when IPSec module fails to recognize ioctl command
IPSec module used to silently fail when an ioctl command was not recognized. This may cause applications to take inconsistent (uninitialized) data as granted. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Id2ec3b0894d9d80332c279c976127c1d40345c7e Reviewed-on: http://git.am.freescale.net:8181/5038 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/fsl_dpa_offload/wrp_dpa_ipsec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/fsl_dpa_offload/wrp_dpa_ipsec.c b/drivers/staging/fsl_dpa_offload/wrp_dpa_ipsec.c
index 0d3ff7e..7b51e97 100644
--- a/drivers/staging/fsl_dpa_offload/wrp_dpa_ipsec.c
+++ b/drivers/staging/fsl_dpa_offload/wrp_dpa_ipsec.c
@@ -1335,7 +1335,8 @@ free:
break;
}
default:
- pr_err("Invalid DPA IPsec ioctl\n");
+ pr_err("Invalid DPA IPsec ioctl (0x%x)\n", cmd);
+ ret = -EINVAL;
break;
}
@@ -1503,7 +1504,8 @@ free:
break;
}
default:
- pr_err("Invalid DPA IPsec ioctl\n");
+ pr_err("Invalid DPA IPsec ioctl (0x%x)\n", cmd);
+ ret = -EINVAL;
break;
}