diff options
Diffstat (limited to 'drivers/misc/sgi-xp/xp_main.c')
-rw-r--r-- | drivers/misc/sgi-xp/xp_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/misc/sgi-xp/xp_main.c b/drivers/misc/sgi-xp/xp_main.c index f86ad3af26b7..66a1d19e08ad 100644 --- a/drivers/misc/sgi-xp/xp_main.c +++ b/drivers/misc/sgi-xp/xp_main.c | |||
@@ -154,6 +154,9 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, | |||
154 | DBUG_ON(func == NULL); | 154 | DBUG_ON(func == NULL); |
155 | DBUG_ON(assigned_limit == 0 || idle_limit > assigned_limit); | 155 | DBUG_ON(assigned_limit == 0 || idle_limit > assigned_limit); |
156 | 156 | ||
157 | if (XPC_MSG_SIZE(payload_size) > XPC_MSG_MAX_SIZE) | ||
158 | return xpPayloadTooBig; | ||
159 | |||
157 | registration = &xpc_registrations[ch_number]; | 160 | registration = &xpc_registrations[ch_number]; |
158 | 161 | ||
159 | if (mutex_lock_interruptible(®istration->mutex) != 0) | 162 | if (mutex_lock_interruptible(®istration->mutex) != 0) |
@@ -166,7 +169,7 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, | |||
166 | } | 169 | } |
167 | 170 | ||
168 | /* register the channel for connection */ | 171 | /* register the channel for connection */ |
169 | registration->msg_size = XPC_MSG_SIZE(payload_size); | 172 | registration->entry_size = XPC_MSG_SIZE(payload_size); |
170 | registration->nentries = nentries; | 173 | registration->nentries = nentries; |
171 | registration->assigned_limit = assigned_limit; | 174 | registration->assigned_limit = assigned_limit; |
172 | registration->idle_limit = idle_limit; | 175 | registration->idle_limit = idle_limit; |
@@ -220,7 +223,7 @@ xpc_disconnect(int ch_number) | |||
220 | registration->func = NULL; | 223 | registration->func = NULL; |
221 | registration->key = NULL; | 224 | registration->key = NULL; |
222 | registration->nentries = 0; | 225 | registration->nentries = 0; |
223 | registration->msg_size = 0; | 226 | registration->entry_size = 0; |
224 | registration->assigned_limit = 0; | 227 | registration->assigned_limit = 0; |
225 | registration->idle_limit = 0; | 228 | registration->idle_limit = 0; |
226 | 229 | ||