Re: Possible Bug in gnet_start_copy_compat for the file,gen_stats.c

From: David Miller
Date: Thu Feb 19 2015 - 15:35:05 EST


From: nick <xerofoify@xxxxxxxxx>
Date: Thu, 12 Feb 2015 21:33:16 -0500

> I am wondering after running sparse on the latest mainline tree why
> we are not unlocking the spinlock_bh,lock when calling the function,
> gnet_stats_start_copy_compat at the end of this function's
> body. Unless someone can explain to me why there is a very good
> reason for not unlocking the spinlock_bh,lock at the end of this
> function I will send in a patch fixing this. I am assuming this is a
> bug due to us infinitely looping in the spinlock_bh and deadlocking
> unless we exit this lock external to the call to the
> function,gnet_start_copy_compat.

This function is used to start a dump, and the caller needs the lock
to be held during the dump operation.

The lock is released by the caller by invoking gnet_stats_finish_copy().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/