[Drbd-dev] Re: connector: Bugfix for cn_call_callback()

Evgeniy Polyakov johnpol at 2ka.mipt.ru
Wed Mar 7 12:59:14 CET 2007

On Wed, Mar 07, 2007 at 12:26:12PM +0100, Philipp Reisner (philipp.reisner at linbit.com) wrote:
> Hi Evgeniy,

Hi Philipp.

> When one stresses the connector code, with sending many messages
> from userspace to kernel, one could get in the "unlikely()"
> part in cn_call_callback().
> There a new __cbq gets allocated, and a NULL pointer got assigned
> to the callback by dereferencing __cbq. This is the bug. The right
> thing is the dereference the original __cbq. Therefore the bugfix
> is to use a new variable for the newly allocated __cbq. 
> This is tested, and it fixes the issue.

Yes, your patch is correct.

> Signed-off-by: Philipp Reisner <philipp.reisner at linbit.com>
> Signed-off-by: Lars Ellenberg <lars.ellenberg at linbit.com>

I will push it, thanks a lot.

	Evgeniy Polyakov

More information about the drbd-dev mailing list