Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1219079

Re: [PATCH] device property: Don't overwrite addr when failing in device_get_mac_address

From Jeremy Linton <jeremy.linton@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] device property: Don't overwrite addr when failing in device_get_mac_address
Date 2015-09-04 16:10 +0200
Message-ID <q4ZQJ-4kF-15@gated-at.bofh.it> (permalink)
References <q4LNL-YJ-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/03/2015 05:59 PM, Julien Grall wrote:
> The function device_get_mac_address is trying different property names
> in order to get the mac address. To check the return value, the variable
> addr (which contain the buffer pass by the caller) will be re-used. This
> means that if the previous property is not found, the next property will
> be read using a NULL buffer.

Thanks for catching that! I checked the OF version to see if it has the 
same problem, but of course it doesn't because I added the logic to pass 
the buffer into the routine.

Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>



--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] device property: Don't overwrite addr when failing in device_get_mac_address Julien Grall <julien.grall@citrix.com> - 2015-09-04 01:10 +0200
  Re: [PATCH] device property: Don't overwrite addr when failing in  device_get_mac_address Jeremy Linton <jeremy.linton@arm.com> - 2015-09-04 16:10 +0200

csiph-web