From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADA71C4360C for ; Sat, 12 Oct 2019 17:21:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4326E2087E for ; Sat, 12 Oct 2019 17:21:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=duncanthrax.net header.i=@duncanthrax.net header.b="Ij1zwyaC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729583AbfJLRVC (ORCPT ); Sat, 12 Oct 2019 13:21:02 -0400 Received: from smtp.duncanthrax.net ([89.31.1.170]:38196 "EHLO smtp.duncanthrax.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbfJLRVB (ORCPT ); Sat, 12 Oct 2019 13:21:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=duncanthrax.net; s=dkim; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=UfXVJgl3M8MWL2edg+efyKWcd9i2rDggtEJ51Z/1Twk=; b=Ij1zwyaCJv1sYuxWEE3Y2FUydB 4qKitFdByEvV7QDkepdQjEC0uyDSZvE4zVcQSz45WSG+nqqKWp4jY909Rm3p462/pPjveAKMFMcpH u5CrJrvchwNrs3yv/239if5jgtqrtwO4M1duiTeGC8xwcivvHc/UFV2FvMyrWpCmxhGY=; Received: from hsi-kbw-046-005-233-221.hsi8.kabel-badenwuerttemberg.de ([46.5.233.221] helo=t470p.stackframe.org) by smtp.eurescom.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1iJL4b-000115-5q; Sat, 12 Oct 2019 19:20:57 +0200 Date: Sat, 12 Oct 2019 19:20:55 +0200 From: Sven Schnelle To: Markus Elfring Cc: netdev@vger.kernel.org, linux-parisc@vger.kernel.org, "David S. Miller" , Yang Wei , LKML , kernel-janitors@vger.kernel.org, Aditya Pakki , Kangjie Lu , Navid Emamdoost , Stephen McCamant Subject: Re: net: tulip: de2104x: Checking a kmemdup() call in de21041_get_srom_info() Message-ID: <20191012172055.GA22569@t470p.stackframe.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 12, 2019 at 07:03:09PM +0200, Markus Elfring wrote: > Hello, > > I tried another script for the semantic patch language out. > This source code analysis approach points out that the implementation > of the function “de21041_get_srom_info” contains still an unchecked call > of the function “kmemdup”. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/dec/tulip/de2104x.c?id=1c0cc5f1ae5ee5a6913704c0d75a6e99604ee30a#n1940 > https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/net/ethernet/dec/tulip/de2104x.c#L1940 > > How do you think about to improve it? If i have not missed a place, the only user is de_get_eeprom(), which checks whether de->ee_data is valid. So i think although not obvious, there's no problem here. Regards Sven