OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c3b48d
)
staging: dgap: Add check for MAXBOARDS in .probe (dgap_init_one)
author
Mark Hounschell
<markh@compro.net>
Fri, 25 Apr 2014 17:10:20 +0000
(13:10 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 16 May 2014 19:18:24 +0000
(12:18 -0700)
Insure we don't allow configuring more than MAXBOARDS (32).
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c
patch
|
blob
|
history
diff --git
a/drivers/staging/dgap/dgap.c
b/drivers/staging/dgap/dgap.c
index
b834c83
..
f597432
100644
(file)
--- a/
drivers/staging/dgap/dgap.c
+++ b/
drivers/staging/dgap/dgap.c
@@
-572,6
+572,9
@@
static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int rc;
+ if (dgap_NumBoards >= MAXBOARDS)
+ return -EPERM;
+
/* wake up and enable device */
rc = pci_enable_device(pdev);