<div>Внёс исправления с [PATCH] и названием. Отправил в сообщество.</div><div><br /></div><div><br /></div><div>----------------</div>
                        <div>To: Nikolai Kuznetsov (niku.csmsu@yandex.ru);<br /></div>
                        <div>Cc: lvc-project@linuxtesting.org;<br /></div>
                        <div>Subject: [lvc-project] [PATCH 19/19] gfs2: Remove unnecessary sd_jdesc NULL check in gfs2_log_flush;<br /></div>
                        <div>14.04.2026, 19:09, "Fedor Pchelkin" <pchelkin@ispras.ru>:<br /></div>
                        <blockquote><p>[PATCH 19/19] означает, что это 19-ый по счёту патч в серии из 19 патчей.<br />Для одного патча нужно [PATCH].<br /><br />Также сейчас патч убирает проверку не только в одной конкретной функции,<br />потому "in gfs2_log_flush" можно убрать из названия.<br /><br />On Tue, 14. Apr 19:03, Nikolai Kuznetsov wrote:<br /></p><blockquote class="210e7a848e8fcb45wmi-quote"> Commit <span class="1f1ea193f6735cf0wmi-callto">35264909</span>e9d1 ("gfs2: Fix NULL pointer dereference in<br /> gfs2_log_flush") added an explicit NULL check for sd_jdesc<br /> to avoid a race with unmount.<br /> <br /> Note that the explicit NULL check alone was insufficient, as other<br /> functions e.g. log_distance() still dereference sd_jdesc.<br /> <br /> However, gfs2_log_flush() checks for SDF_JOURNAL_LIVE bit and bails<br /> out if it's not set. During unmount this bit is cleared in final<br /> shutdown flush which is called in gfs2_make_fs_ro().<br /> <br /> Filesystem becomes RO firstly and only then sd_jdesc is assigned<br /> NULL in gfs2_jindex_free(), so the race is not possible. The<br /> explicit check is redundant, remove it.<br /> <br /> Found by Linux Verification Center (linuxtesting.org) with SVACE.<br /> <br /> Fixes: <span class="1f1ea193f6735cf0wmi-callto">35264909</span>e9d1 ("gfs2: Fix NULL pointer dereference in gfs2_log_flush")<br /> Fixes: 74b4dbb94606 ("gfs2: prevent NULL pointer dereference during unmount")<br /> Signed-off-by: Nikolai Kuznetsov <<a href="mailto:niku.csmsu@yandex.ru">niku.csmsu@yandex.ru</a>><br /> ---<br /></blockquote><p><br />Ну, что ж, предлагаю пробовать отправлять в сообщество<br /><a href="https://portal.linuxtesting.ru/How-to-send-patches-to-kernel.html#%D0%98%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D1%8F-%D0%B0%D0%B4%D1%80%D0%B5%D1%81%D0%B0%D1%82%D0%BE%D0%B2">https://portal.linuxtesting.ru/How-to-send-patches-to-kernel.html#Идентификация-адресатов</a><br /><br />Дальше действуем по реакции с их стороны.<br /><br /></p><blockquote class="210e7a848e8fcb45wmi-quote">  fs/gfs2/log.c | 7 ++++---<br />  1 file changed, 4 insertions(+), 3 deletions(-)<br /> <br /> diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c<br /> index 78bba8cc10b8..0b91f3e0928a 100644<br /> --- a/fs/gfs2/log.c<br /> +++ b/fs/gfs2/log.c<br /> @@ -467,7 +467,7 @@ void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks)<br />  {<!-- --><br />          atomic_add(blks, &sdp->sd_log_blks_free);<br />          trace_gfs2_log_blocks(sdp, blks);<br /> -  gfs2_assert_withdraw(sdp, !sdp->sd_jdesc ||<br /> +   gfs2_assert_withdraw(sdp,<br />                          atomic_read(&sdp->sd_log_blks_free) <=<br />                          sdp->sd_jdesc->jd_blocks);<br />          if (atomic_read(&sdp->sd_log_blks_needed))<br /> @@ -1137,8 +1137,9 @@ static void __gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl,<br />          lops_before_commit(sdp, tr);<br />          if (gfs2_withdrawn(sdp))<br />                  goto out_withdraw;<br /> -    if (sdp->sd_jdesc)<br /> -            gfs2_log_submit_write(&sdp->sd_jdesc->jd_log_bio);<br /> +<br /> +      gfs2_log_submit_write(&sdp->sd_jdesc->jd_log_bio);<br /> +<br />          if (gfs2_withdrawn(sdp))<br />                  goto out_withdraw;<br />  <br /> -- <br /> 2.43.0<br /></blockquote></blockquote>