Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756584AbYCCK5y (ORCPT ); Mon, 3 Mar 2008 05:57:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755096AbYCCK5c (ORCPT ); Mon, 3 Mar 2008 05:57:32 -0500 Received: from mail.tnp-online.de ([212.80.247.147]:58268 "EHLO fallback.gigamail.to" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbYCCK5a (ORCPT ); Mon, 3 Mar 2008 05:57:30 -0500 X-Original-To: linux-kernel@vger.kernel.org From: Arne Redlich To: Roland Dreier Cc: ofa-general , lkml , erezz@voltaire.com Subject: [PATCH 0/2] IB/iSER bugfixes Date: Mon, 03 Mar 2008 11:35:48 +0100 Message-ID: <87ejasxfgb.fsf@confield.dd.xiranet.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-xiranet-MailScanner-OpenProtect-Information: Please contact the ISP for more information X-xiranet-MailScanner-OpenProtect: Found to be clean X-xiranet-MailScanner-OpenProtect-MCPCheck: X-xiranet-MailScanner-OpenProtect-From: arne.redlich@xiranet.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 947 Lines: 25 Hi, While reading through the iSER code I noticed two rather nasty issues: 1. The iteration through the list of "iser_device"s during device lookup/creation is broken - it might result in an infinite loop if more than 1 HCA is used with iSER. Use list_for_each_entry() instead of the custom, flawed list iteration code. 2. "iser_device" allocation failure is "handled" with a BUG_ON() right before dereferencing the NULL-pointer. This is really scary, so here's my idea of a fix. Someone with a deeper understanding of the code should have a look at it since I'm not sure it does The Right Thing. Both patches are merely compile tested, and patch #2 needs to be applied on top of #1. Cheers, Arne -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/