lkml.org 
[lkml]   [2008]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/04] s390: bus_id -> dev_set_name() changes
On Wed, Jul 02, 2008 at 08:48:11AM -0700, Greg KH wrote:
> From: Cornelia Huck <cornelia.huck@de.ibm.com>
>
> Convert most s390 users setting bus_id to dev_set_name().
> css and ccw busses are deferred since they need some special
> treatment.
>
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> Cc: Kay Sievers <kay.sievers@vrfy.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
> drivers/s390/block/dcssblk.c | 2 +-
> drivers/s390/char/vmlogrdr.c | 3 +--
> drivers/s390/cio/ccwgroup.c | 3 +--
> drivers/s390/cio/chp.c | 3 +--
> drivers/s390/cio/css.c | 4 ++--
> drivers/s390/crypto/ap_bus.c | 4 ++--
> drivers/s390/net/netiucv.c | 2 +-
> drivers/s390/s390_rdev.c | 2 +-
> drivers/s390/scsi/zfcp_aux.c | 23 ++++++++---------------
> 9 files changed, 18 insertions(+), 28 deletions(-)
>
> --- a/drivers/s390/block/dcssblk.c
> +++ b/drivers/s390/block/dcssblk.c
> @@ -349,7 +349,7 @@ dcssblk_add_store(struct device *dev, st
> }
>
> strcpy(dev_info->segment_name, local_buf);
> - strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE);
> + dev_set_name(&dev_info->dev, local_buf);

As I see it, dev_set_name accepts printf like string, so this
dev_set_name is quite dangerous (since local_buf is formed
by the module param), no?

--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2


\
 
 \ /
  Last update: 2008-07-03 00:17    [W:0.059 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site