Skip to content

Commit

Permalink
iwlwifi: dbg: in sync mode don't call schedule
Browse files Browse the repository at this point in the history
Today in the code we have two options for collecting data sync/schedule,
the two options call the same function and can lead to racing in free
resources after done.

So we call only one of two sync/schedule, and in case of sync only
call sync function without also schedule to immediately run as a side
job.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220304131517.88574097ce1b.I1b42297619d638d677a2300ed9a95105c1262101@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
  • Loading branch information
Mordechay Goodstein authored and Luca Coelho committed Mar 10, 2022
1 parent bb16ffd commit f0c1633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/fw/dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2992,10 +2992,10 @@ int iwl_fw_dbg_ini_collect(struct iwl_fw_runtime *fwrt,
"WRT: Collecting data: ini trigger %d fired (delay=%dms).\n",
tp_id, (u32)(delay / USEC_PER_MSEC));

schedule_delayed_work(&fwrt->dump.wks[idx].wk, usecs_to_jiffies(delay));

if (sync)
iwl_fw_dbg_collect_sync(fwrt, idx);
else
schedule_delayed_work(&fwrt->dump.wks[idx].wk, usecs_to_jiffies(delay));

return 0;
}
Expand Down

0 comments on commit f0c1633

Please sign in to comment.