From: Masatake YAMATO Date: Mon, 1 Apr 2013 18:50:40 +0000 (-0400) Subject: thermal: shorten too long mcast group name X-Git-Tag: v3.4.39~20 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b9f3bf1d0fe1e9ef11d1d607906138e9f84f7616;p=karo-tx-linux.git thermal: shorten too long mcast group name [ Upstream commits 73214f5d9f33b79918b1f7babddd5c8af28dd23d and f1e79e208076ffe7bad97158275f1c572c04f5c7, the latter adds an assertion to genetlink to prevent this from happening again in the future. ] The original name is too long. Signed-off-by: Masatake YAMATO Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 796f1ff0388c..16620470455e 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -108,7 +108,7 @@ struct thermal_zone_device { /* Adding event notification support elements */ #define THERMAL_GENL_FAMILY_NAME "thermal_event" #define THERMAL_GENL_VERSION 0x01 -#define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_group" +#define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp" enum events { THERMAL_AUX0, diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 9f40441d7a7d..73d3f0c84ceb 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -142,6 +142,7 @@ int genl_register_mc_group(struct genl_family *family, int err = 0; BUG_ON(grp->name[0] == '\0'); + BUG_ON(memchr(grp->name, '\0', GENL_NAMSIZ) == NULL); genl_lock();