aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/sc/ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 00:05:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 00:05:52 -0400
commitf6cec0ae58c17522a7bc4e2f39dae19f199ab534 (patch)
tree496cf6f53b0c75d9ae57bd0e411c5d2f6cea5cbb /drivers/isdn/sc/ioctl.c
parent0fcf12d510b6d1b1b090a090c62009310eca4be4 (diff)
parentc4e9b56e24422e71424b24eee27c2b134a191d7b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (59 commits) igbvf.txt: Add igbvf Documentation igb.txt: Add igb documentation e100/e1000*/igb*/ixgb*: Add missing read memory barrier ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG netxen: protect tx timeout recovery by rtnl lock isdn: gigaset: use after free isdn: gigaset: add missing unlock solos-pci: Fix race condition in tasklet RX handling pkt_sched: Fix sch_sfq vs tcf_bind_filter oops net: disable preemption before call smp_processor_id() tcp: no md5sig option size check bug iwlwifi: fix locking assertions iwlwifi: fix TX tracer isdn: fix information leak net: Fix napi_gro_frags vs netpoll path usbnet: remove noisy and hardly useful printk rtl8180: avoid potential NULL deref in rtl8180_beacon_work ath9k: Remove myself from the MAINTAINERS list libertas: scan before assocation if no BSSID was given libertas: fix association with some APs by using extended rates ...
Diffstat (limited to 'drivers/isdn/sc/ioctl.c')
-rw-r--r--drivers/isdn/sc/ioctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c
index 43c5dc3516e5..4cfdbe08ffd1 100644
--- a/drivers/isdn/sc/ioctl.c
+++ b/drivers/isdn/sc/ioctl.c
@@ -174,7 +174,7 @@ int sc_ioctl(int card, scs_ioctl *data)
174 pr_debug("%s: SCIOGETSPID: ioctl received\n", 174 pr_debug("%s: SCIOGETSPID: ioctl received\n",
175 sc_adapter[card]->devicename); 175 sc_adapter[card]->devicename);
176 176
177 spid = kmalloc(SCIOC_SPIDSIZE, GFP_KERNEL); 177 spid = kzalloc(SCIOC_SPIDSIZE, GFP_KERNEL);
178 if (!spid) { 178 if (!spid) {
179 kfree(rcvmsg); 179 kfree(rcvmsg);
180 return -ENOMEM; 180 return -ENOMEM;
@@ -194,7 +194,7 @@ int sc_ioctl(int card, scs_ioctl *data)
194 kfree(rcvmsg); 194 kfree(rcvmsg);
195 return status; 195 return status;
196 } 196 }
197 strcpy(spid, rcvmsg->msg_data.byte_array); 197 strlcpy(spid, rcvmsg->msg_data.byte_array, SCIOC_SPIDSIZE);
198 198
199 /* 199 /*
200 * Package the switch type and send to user space 200 * Package the switch type and send to user space
@@ -266,12 +266,12 @@ int sc_ioctl(int card, scs_ioctl *data)
266 return status; 266 return status;
267 } 267 }
268 268
269 dn = kmalloc(SCIOC_DNSIZE, GFP_KERNEL); 269 dn = kzalloc(SCIOC_DNSIZE, GFP_KERNEL);
270 if (!dn) { 270 if (!dn) {
271 kfree(rcvmsg); 271 kfree(rcvmsg);
272 return -ENOMEM; 272 return -ENOMEM;
273 } 273 }
274 strcpy(dn, rcvmsg->msg_data.byte_array); 274 strlcpy(dn, rcvmsg->msg_data.byte_array, SCIOC_DNSIZE);
275 kfree(rcvmsg); 275 kfree(rcvmsg);
276 276
277 /* 277 /*
@@ -337,7 +337,7 @@ int sc_ioctl(int card, scs_ioctl *data)
337 pr_debug("%s: SCIOSTAT: ioctl received\n", 337 pr_debug("%s: SCIOSTAT: ioctl received\n",
338 sc_adapter[card]->devicename); 338 sc_adapter[card]->devicename);
339 339
340 bi = kmalloc (sizeof(boardInfo), GFP_KERNEL); 340 bi = kzalloc(sizeof(boardInfo), GFP_KERNEL);
341 if (!bi) { 341 if (!bi) {
342 kfree(rcvmsg); 342 kfree(rcvmsg);
343 return -ENOMEM; 343 return -ENOMEM;