From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934503Ab0EURHb (ORCPT ); Fri, 21 May 2010 13:07:31 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:52053 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755374Ab0EURHY (ORCPT ); Fri, 21 May 2010 13:07:24 -0400 Date: Fri, 21 May 2010 10:04:35 -0700 (PDT) From: Linus Torvalds To: James Bottomley cc: David Miller , linux-kernel , netdev@vger.kernel.org, linux-scsi Subject: Re: bug fix patch lost: git problem or just incorrect merge? In-Reply-To: Message-ID: References: <1274456515.9022.14.camel@mulgrave.site> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 May 2010, Linus Torvalds wrote: > > > Either way, of course, we need the patch back ... > > I'll fix it up. Hmm. Pushed that out as appended, since that is the correct resolve. HOWEVER - the code still doesn't actually make any sense. It does if (sk_sleep(sock->sk)) { and that sk_sleep() today is an inline function that just does return &sk->sk_wq->wait; and testing the result of an address-of operation for NULL is almost certainly totally non-sensical. Sure, it _might_ work (maybe 'wait' is the first element in the 'sk_wq' data structure, and sk_wq is NULL), but that kind of code is always total and utterl crap regardless. So I pushed it out because I had done the resolve already, and it's no worse than it was before, but it's still a steaming buggy pile of shit. It being iscsi, I can't bring myself to care. But somebody who does, should really look at it. The most likely resolution is to remove the test entirely, since I don't think it's ever valid to have a socket that doesn't have a sk_wq (there's a _lot_ of unconditional use of sk_sleep()). Linus