Similar to the issue with MClientMetrics, beacons should also not be handled
via fast dispatch because it's necessary to acquire Beacon::mutex. This is a
big no-no as it may block one of the Messenger threads leading to improbable
deadlocks or DoS.
Instead, use the normal dispatch where acquiring locks is okay to do.
Fixes: 7fc04be9332704946ba6f0e95cfcd1afc34fc0fe
See-also: linux.git/
f7c2f4f6ce16fb58f7d024f3e1b40023c4b43ff9
Fixes: https://tracker.ceph.com/issues/65658
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
});
}
-bool Beacon::ms_can_fast_dispatch2(const cref_t<Message>& m) const
-{
- return m->get_type() == MSG_MDS_BEACON;
-}
-
-void Beacon::ms_fast_dispatch2(const ref_t<Message>& m)
-{
- bool handled = ms_dispatch2(m);
- ceph_assert(handled);
-}
-
bool Beacon::ms_dispatch2(const ref_t<Message>& m)
{
dout(25) << __func__ << ": processing " << m << dendl;
void init(const MDSMap &mdsmap);
void shutdown();
- bool ms_can_fast_dispatch_any() const override { return true; }
- bool ms_can_fast_dispatch2(const cref_t<Message>& m) const override;
- void ms_fast_dispatch2(const ref_t<Message>& m) override;
bool ms_dispatch2(const ref_t<Message> &m) override;
void ms_handle_connect(Connection *c) override {}
bool ms_handle_reset(Connection *c) override {return false;}