Subject: Re: sock_ioctl sleeping while atomic warning during boot.

From: Brian Haley <[email-masked]>
Date: Thu, 20 Dec 2012 22:31:03 -0500

On 12/20/2012 10:25 PM, Eric Dumazet wrote:
> OK, thanks for the report.
> 
> We need a seqcount, not a seqlock, as RTNL already protects multiple
> writers.
> 
> Please try following fix :
> 
> 
> [PATCH] net: devnet_rename_seq should be a seqcount
> 
> Using a seqlock for devnet_rename_seq is not a good idea,
> as device_rename() can sleep.
> 
> As we hold RTNL, we dont need a protection for writers,
> and only need a seqcount so that readers can catch a change done
> by a writer.
> 
> Bug added in commit c91f6df2db4972d3 (sockopt: Change getsockopt() of
> SO_BINDTODEVICE to return an interface name)
> 
> Reported-by: Dave Jones <[email-masked]>
> Signed-off-by: Eric Dumazet <[email-masked]>
> Cc: Brian Haley <[email-masked]>

Sorry about that, thanks for the quick fix Eric.

-Brian