[PATCH master] fs: guard against unset dentry in get_fsdevice_by_dentry

Sascha Hauer s.hauer at pengutronix.de
Wed Apr 15 05:08:12 PDT 2026


On Wed, 15 Apr 2026 12:39:54 +0200, Ahmad Fatoum wrote:
> dentry exists embedded within struct path and may not be initialized at
> all places we call get_fsdevice_by_dentry().
> 
> Allow handling this gracefully by having the function return NULL
> instead of dereferencing potential NULL pointers.
> 
> This issue has been detected in combination with the
> "fs: fix relative path resolution when CWD is on a TFTP mount" patch
> sitting in next, where the MLO runs into the NULL pointer dereference.
> It has not been observed in other  configurations.
> 
> [...]

Applied, thanks!

[1/1] fs: guard against unset dentry in get_fsdevice_by_dentry
      https://git.pengutronix.de/cgit/barebox/commit/?id=ff129a9c4049 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list