Re: [PATCH 2/5] Construct one fakephp slot per pci slot

2007-11-15 Thread Alex Chiang
* Rolf Eike Beer <[EMAIL PROTECTED]>: > Am Mittwoch, 14. November 2007 schrieb Alex Chiang: > > * Matthew Wilcox <[EMAIL PROTECTED]>: > > > On Wed, Nov 14, 2007 at 12:37:29PM -0700, Alex Chiang > > > > Register one slot per slot, rather than one slot per > > > > function. Change the name of the sl

Re: [PATCH 2/5] Construct one fakephp slot per pci slot

2007-11-15 Thread Rolf Eike Beer
Am Mittwoch, 14. November 2007 schrieb Alex Chiang: > * Matthew Wilcox <[EMAIL PROTECTED]>: > > On Wed, Nov 14, 2007 at 12:37:29PM -0700, Alex Chiang wrote: > > > Register one slot per slot, rather than one slot per function. > > > Change the name of the slot to fake%d instead of the pci address. >

Re: [PATCH 2/5] Construct one fakephp slot per pci slot

2007-11-14 Thread Alex Chiang
* Matthew Wilcox <[EMAIL PROTECTED]>: > On Wed, Nov 14, 2007 at 12:37:29PM -0700, Alex Chiang wrote: > > Register one slot per slot, rather than one slot per function. > > Change the name of the slot to fake%d instead of the pci address. > > > +#define SLOT_NAME_SIZE KOBJ_NAME_LEN > > Defined, th

Re: [PATCH 2/5] Construct one fakephp slot per pci slot

2007-11-14 Thread Alex Chiang
* Matthew Wilcox <[EMAIL PROTECTED]>: > On Wed, Nov 14, 2007 at 12:37:29PM -0700, Alex Chiang wrote: > > Register one slot per slot, rather than one slot per function. > > Change the name of the slot to fake%d instead of the pci address. > > > +#define SLOT_NAME_SIZE KOBJ_NAME_LEN > > Defined, th

Re: [PATCH 2/5] Construct one fakephp slot per pci slot

2007-11-14 Thread Matthew Wilcox
On Wed, Nov 14, 2007 at 12:37:29PM -0700, Alex Chiang wrote: > Register one slot per slot, rather than one slot per function. > Change the name of the slot to fake%d instead of the pci address. > +#define SLOT_NAME_SIZE KOBJ_NAME_LEN Defined, then never used ... how about s/KOBJ_NAME_LEN/8/, then

Re: [PATCH 2/5] Construct one fakephp slot per pci slot

2007-11-13 Thread Matthew Wilcox
On Tue, Nov 13, 2007 at 01:48:15PM -0600, Linas Vepstas wrote: > On Mon, Nov 12, 2007 at 05:13:36PM -0700, Alex Chiang wrote: > > + slot->name = kmalloc(8, GFP_KERNEL); > > + sprintf(slot->name, "fake%d", count++); > > Please use snprintf to avoid buffer overruns! Or, since kmalloc can return

Re: [PATCH 2/5] Construct one fakephp slot per pci slot

2007-11-13 Thread Linas Vepstas
On Mon, Nov 12, 2007 at 05:13:36PM -0700, Alex Chiang wrote: > + slot->name = kmalloc(8, GFP_KERNEL); > + sprintf(slot->name, "fake%d", count++); Please use snprintf to avoid buffer overruns! --linas - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of