From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757869Ab3BFR76 (ORCPT ); Wed, 6 Feb 2013 12:59:58 -0500 Received: from mail.candelatech.com ([208.74.158.172]:53946 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755389Ab3BFR7z (ORCPT ); Wed, 6 Feb 2013 12:59:55 -0500 Message-ID: <51129A12.6020101@candelatech.com> Date: Wed, 06 Feb 2013 09:59:46 -0800 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Johannes Berg CC: Cong Ding , "John W. Linville" , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: mac80211/cfg.c: fix error using of sizeof() References: <1360167826-29265-1-git-send-email-dinggnu@gmail.com> (sfid-20130206_172354_765098_665D60D0) <1360168022.7910.22.camel@jlt4.sipsolutions.net> <511298E8.7090801@candelatech.com> In-Reply-To: <511298E8.7090801@candelatech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/06/2013 09:54 AM, Ben Greear wrote: > On 02/06/2013 08:27 AM, Johannes Berg wrote: >> On Wed, 2013-02-06 at 17:23 +0100, Cong Ding wrote: >>> Using 'sizeof' on array given as function argument returns size of a pointer >>> rather than the size of array. >> >> Oops, yeah, Stephen Hemminger pointed this out a month or so ago and I >> forgot to change it, thanks. > > This needs to be back-ported for 3.7 stable? Perhaps the code below > corresponds (from copy_mesh_setup)? > > > /* mcast rate setting in Mesh Node */ > memcpy(sdata->vif.bss_conf.mcast_rate, setup->mcast_rate, > sizeof(setup->mcast_rate)); Nevermind..I think I'm wrong about that..the sizeof probably works fine here. Sorry for the noise. Ben > > Thanks, > Ben > -- Ben Greear Candela Technologies Inc http://www.candelatech.com