All of lore.kernel.org
 help / color / mirror / Atom feed
* Does struct qstr->name should be terminated ?
@ 2004-03-23 10:56 Jerome de Vivie
  2004-03-24  9:09 ` Jan Hudec
  0 siblings, 1 reply; 5+ messages in thread
From: Jerome de Vivie @ 2004-03-23 10:56 UTC (permalink / raw)
  To: linux-fsdevel


I've work with "struct qstr" for a while without bothering with the last 
caracter: qstr->name[qstr->len]. I get oops from my module but after 
investigation, i found lines in fs/namei.c that are using this caracter:

In do_rename:
         /* unless the source is a directory trailing slashes give 
-ENOTDIR */
         if (!S_ISDIR(old_dentry->d_inode->i_mode)) {
                 error = -ENOTDIR;
                 if (oldnd.last.name[oldnd.last.len])
                         goto exit4;
                 if (newnd.last.name[newnd.last.len])
                         goto exit4;
         }

So, do i need to initialize this caracter when allocating new qstr ? Is 
this caracter is used in other place in the VFS ?

regards,

j.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-25  0:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-23 10:56 Does struct qstr->name should be terminated ? Jerome de Vivie
2004-03-24  9:09 ` Jan Hudec
2004-03-24 13:05   ` Matthew Wilcox
2004-03-24 17:09     ` Bryan Henderson
2004-03-25  0:09       ` Jerome de Vivie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.