Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:61339 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556Ab1BNKDh convert rfc822-to-8bit (ORCPT ); Mon, 14 Feb 2011 05:03:37 -0500 Received: by qwa26 with SMTP id 26so2966246qwa.19 for ; Mon, 14 Feb 2011 02:03:36 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20110207195301.GB2430@thinkpad-t410> References: <20110131214515.GC6368@thinkpad-t410> <20110207041007.GA14242@thinkpad-t410> <20110207195301.GB2430@thinkpad-t410> Date: Mon, 14 Feb 2011 11:03:36 +0100 Message-ID: Subject: Re: Missing skb_pad() return value checks in rt2x00 driver From: Ivo Van Doorn To: Seth Forshee Cc: Wolfgang Kufner , Gertjan van Wingerde , "John W. Linville" , linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi, Well this patch managed to slip through my list. :S > From 4a8b3969775cd233750a1b74b1d4f5fc065932bf Mon Sep 17 00:00:00 2001 > From: Seth Forshee > Date: Mon, 7 Feb 2011 13:50:33 -0600 > Subject: [PATCH] rt2x00: Check for errors from skb_pad() calls > > Commit 739fd94 ("rt2x00: Pad beacon to multiple of 32 bits") > added calls to skb_pad() without checking the return value, > which could cause problems if any of those calls does happen > to fail. Add checks to prevent this from happening. Thanks for the updated patch. I only have one small request. > + ? ? ? if (padding_len && skb_pad(entry->skb, padding_len)) { > + ? ? ? ? ? ? ? dev_err(rt2x00dev->dev, "Failure padding beacon, aborting\n"); Please change to: ERROR(rt2x00dev, "Failure padding beacon, aborting\n"); same for the other changed drivers in this patch. Thanks, Ivo