From patchwork Thu Jan 16 13:34:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pontus Fuchs X-Patchwork-Id: 3498571 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 95560C02DC for ; Thu, 16 Jan 2014 13:34:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 928B920172 for ; Thu, 16 Jan 2014 13:34:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7506E20163 for ; Thu, 16 Jan 2014 13:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752346AbaAPNex (ORCPT ); Thu, 16 Jan 2014 08:34:53 -0500 Received: from mail-lb0-f171.google.com ([209.85.217.171]:37053 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbaAPNew (ORCPT ); Thu, 16 Jan 2014 08:34:52 -0500 Received: by mail-lb0-f171.google.com with SMTP id c11so1927422lbj.30 for ; Thu, 16 Jan 2014 05:34:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=1EJ1sf1IuJExW514TTJI5F9q2ccnrllWNCozP5Y1jxM=; b=sVBAOPAWxvOOH4J1LUksgXfe3d+RT5US85YeZlwM+q5YorgJEHYdUZuZklH1TMohRm JKxN/tGqjrh6jd1fmPWbNuN73ijpBA29zEag5wB8ZRh9Zrzh+gtE9TX8sQWR4QgUbIGW rQMz1lIcwN042QfBGImB78/tU/RbWaLbeeXUDzJBi8NUFc75vIy7xLIx5Q6oLJ+OugWI 2wvEfK75j8jjKYs2IPGPWTPfcIVKz5061X/vJKNxOTgVz/Xuf6TolsaJu/rCtIzVBIWH nRP/NX8IigIyDMO7+Od7eLiM9dr6cP7g3Coert3eZ5phqR40j5DB8AyaMKw8CCFVtvCk IBFw== X-Received: by 10.152.180.35 with SMTP id dl3mr170359lac.66.1389879291024; Thu, 16 Jan 2014 05:34:51 -0800 (PST) Received: from localhost.localdomain (host-90-238-9-100.mobileonline.telia.com. [90.238.9.100]) by mx.google.com with ESMTPSA id qe4sm2172312lbb.8.2014.01.16.05.34.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jan 2014 05:34:50 -0800 (PST) From: Pontus Fuchs To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH] nl80211: Reset split_start on error path when split dump is not used Date: Thu, 16 Jan 2014 14:34:39 +0100 Message-Id: <1389879279-20832-1-git-send-email-pontus.fuchs@gmail.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the netlink skb is exhausted split_start is left set. In the subsequent retry, with a larger buffer, the dump is continued from the failing point instead of from the beginning. This was causing my rt28xx based USB dongle to now show up when running "iw list" with an old iw version without split dump support. Signed-off-by: Pontus Fuchs --- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) Supersedes "nl80211: Don't touch split_start when split dump is not used" diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index d0afd82..ba6d438 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -1631,6 +1631,8 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev, return genlmsg_end(msg, hdr); nla_put_failure: + if (!state->split) + state->split_start = 0; genlmsg_cancel(msg, hdr); return -EMSGSIZE; }