bus: don't accept KDBUS_CMD_BUS_MAKE with more than one KDBUS_ITEM_BLOOM_PARAMETER
authorTom Gundersen <teg@jklm.no>
Mon, 29 Sep 2014 21:30:34 +0000 (23:30 +0200)
committerTom Gundersen <teg@jklm.no>
Mon, 29 Sep 2014 21:56:07 +0000 (23:56 +0200)
In the same way we handle KDBUS_ITEM_MAKE_NAME.

Signed-off-by: Tom Gundersen <teg@jklm.no>
bus.c

diff --git a/bus.c b/bus.c
index 2606b75939142cdfc5788a98d038d789ac861fed..351595313aa275def87d0ac4e54879a86b3a7a83 100644 (file)
--- a/bus.c
+++ b/bus.c
@@ -361,6 +361,9 @@ int kdbus_bus_make_user(const struct kdbus_cmd_make *make,
                        break;
 
                case KDBUS_ITEM_BLOOM_PARAMETER:
+                       if (bl)
+                               return -EEXIST;
+
                        bl = &item->bloom_parameter;
                        break;
                }