Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265795AbUJHSnY (ORCPT ); Fri, 8 Oct 2004 14:43:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264113AbUJHSmB (ORCPT ); Fri, 8 Oct 2004 14:42:01 -0400 Received: from mail.kroah.org ([69.55.234.183]:7603 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S264098AbUJHShB (ORCPT ); Fri, 8 Oct 2004 14:37:01 -0400 Date: Fri, 8 Oct 2004 11:35:49 -0700 From: Greg KH To: "Richard B. Johnson" Cc: Stephen Hemminger , linus@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] protect against buggy drivers Message-ID: <20041008183549.GB4842@kroah.com> References: <1097254421.16787.27.camel@localhost.localdomain> <20041008171414.GA28001@kroah.com> <20041008175058.GA2232@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 831 Lines: 25 On Fri, Oct 08, 2004 at 02:31:27PM -0400, Richard B. Johnson wrote: > > In the meantime, can we do something like: > > --- linux-2.6.8/fs/char_dev.c.orig 2004-10-08 14:24:03.838389344 -0400 > +++ linux-2.6.8/fs/char_dev.c 2004-10-08 14:26:51.059967800 -0400 > @@ -206,7 +206,7 @@ > > cdev->owner = fops->owner; > cdev->ops = fops; > - strcpy(cdev->kobj.name, name); > + strncpy(cdev->kobj.name, name, KOBJ_NAME_LEN-1); > for (s = strchr(cdev->kobj.name, '/'); s; s = strchr(s, '/')) > *s = '!'; No, that's still wrong. Use Stephen's other patch instead. thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/