On Wed, Jan 18, 2017 at 21:23 +0300, Dinar Talypov wrote:
> +void
> +xen_inform_host(struct xen_softc *sc)
> +{
> +     char *os_name;
> +     
> +     /* Fake PV drivers version */
> +     xs_setnum(sc, "attr/PVAddons", "MajorVersion", 6);
> +     xs_setnum(sc, "attr/PVAddons", "MinorVersion", 2);
> +     xs_setnum(sc, "attr/PVAddons", "MicroVersion", 0);
> +     xs_setnum(sc, "attr/PVAddons", "BuildVersion", 76888);
> +     xs_setnum(sc, "attr/PVAddons", "Installed", 1);
> +
> +     /* Set OS version */
> +     snprintf(os_name, sizeof((char *)ostype) + sizeof((char *)osrelease),
> +                     "%s %s", ostype, osrelease);

and btw, here you're corrupting kernel memory since os_name is
an uninitialized pointer :-)

Reply via email to