lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <524D9798.70902@metafoo.de>
Date:	Thu, 03 Oct 2013 18:13:12 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Sangjung Woo <sangjung.woo@...sung.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging:iio: fix wrong usage of dev_set_name()

On 10/03/2013 04:57 PM, Sangjung Woo wrote:
> The second parameter of dev_set_name() is format string. In order to
> avoid any potential accidents such as segmentation fault, basic format
> parameter "%s" should be used in this case.

Since "iio_evgen" is a constant string there is really no need for this.

> 
> Signed-off-by: Sangjung Woo <sangjung.woo@...sung.com>
> ---
>  drivers/staging/iio/iio_dummy_evgen.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/iio_dummy_evgen.c b/drivers/staging/iio/iio_dummy_evgen.c
> index 132d278..2c06d16 100644
> --- a/drivers/staging/iio/iio_dummy_evgen.c
> +++ b/drivers/staging/iio/iio_dummy_evgen.c
> @@ -205,7 +205,7 @@ static __init int iio_dummy_evgen_init(void)
>  	if (ret < 0)
>  		return ret;
>  	device_initialize(&iio_evgen_dev);
> -	dev_set_name(&iio_evgen_dev, "iio_evgen");
> +	dev_set_name(&iio_evgen_dev, "%s", "iio_evgen");
>  	return device_add(&iio_evgen_dev);
>  }
>  module_init(iio_dummy_evgen_init);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ