jerpelea opened a new pull request, #21193:
URL: https://github.com/apache/nuttx/pull/21193

   ## Summary
   
   Two bugs in the parsing of the v9fs mount options, one commit each. A first 
commit fixes nxstyle errors that are already in both files, because CI checks 
every file that a change touches; it is whitespace only.
   
       v9fs_client_init() steps over each option with options += length + 1, to 
skip the comma after it. The last option has no comma, so the step goes past 
the terminating NUL, and the loop parses the memory after the string as more 
options. If that memory has a trans= or uname=, it replaces the option given.
       virtio_9p_create() copies the tag up to the next comma and includes the 
comma. So a tag that is not the last option never matches the mount tag of the 
device.
   
   I found the first bug with CONFIG_INIT_MOUNT and 
CONFIG_INIT_MOUNT_FSTYPE="v9fs". The option string is in .rodata, the parser 
runs into the literal "trans=" that comes after it, and the boot mount fails 
with -ENOENT.
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to