From 261be66951d33bc34fcd730fe86326fbf5e7f266 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Thu, 4 Jan 2018 12:04:56 +0100 Subject: [PATCH] pspat: fix check on initialization --- net/pspat/mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/pspat/mailbox.c b/net/pspat/mailbox.c index 5f75e9c64fe23c..c48d0aa12b40b1 100644 --- a/net/pspat/mailbox.c +++ b/net/pspat/mailbox.c @@ -30,7 +30,7 @@ pspat_mb_init(struct pspat_mailbox *m, const char *name, unsigned long entries_per_line; if (!is_power_of_2(entries) || !is_power_of_2(line_size) || - entries <= 2 * line_size || line_size < sizeof(uintptr_t)) + entries * sizeof(uintptr_t) <= 2 * line_size || line_size < sizeof(uintptr_t)) return -EINVAL; strncpy(m->name, name, PSPAT_MB_NAMSZ);