[openib-general] [PATCH][kdapl] Small changes in dapl_hca_all oc/dapl_hca_free functions

Tom Duffy tduffy at sun.com
Mon Jun 20 09:48:20 PDT 2005


On Mon, 2005-06-20 at 20:00 +0300, Itamar Rabenstein wrote:
> Hi Tom,
> I was just copied to original code from dapl_os_strdup() to
> dapl_hca_alloc().
> so if it is a problem is it was there in the code before my patch.
> But why do you think we need strncpy and not strcpy ?
> name param is null terminated string.

It is generally not a good idea to allow an arbitrary sized string in
the kernel.  Especially when you are kmalloc()ing the size.

-tduffy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050620/3a758b59/attachment.sig>


More information about the general mailing list