Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp3168740ybh; Sat, 25 Jul 2020 13:25:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2B6Ahn5lxqb/lqbXq1WL12leHIKh93ou6EQsOmZawZeJimowvHjxlERCPj6nJFR9xOYuV X-Received: by 2002:a17:906:6bda:: with SMTP id t26mr429272ejs.214.1595708757899; Sat, 25 Jul 2020 13:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595708757; cv=none; d=google.com; s=arc-20160816; b=s7Mo8Ex+M6S4XIUCoNb8uzlvxB87rgIRt+RuRpsJPRuJzl1vsd/GVxNUnva4rHMJtd Fgq9h+urAOuCSmWH4kfpIDsVQGHX1844ep7vyi/WbnWRs7sOtDjgbUKBSLUKdo1gByz/ wAGkpCoEyVHJTarjobFarky8zsCEYpOvhySdUAdAM29nED7tZO2qCNvw7Ujm/eICatF7 ZaON8L7DtJw/Iu0Qf5NdG50w3WXlSI03gi6W/xdRWUsSawJjXIPSNVpwJGz5ty3c3pRt T1i6PRWgV4vnU/NIswYOCtZ54CE+jJi/J3blef8YuTDL+rQQHewUTUafh208QIhWTkzX UdOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=I0Th57xgtfkchmcZxsB458zve0k9vknOwyUMP9v2Iqc=; b=SmtKG28i89ryQzSO7jPMAPYa+9eefDaRl71UofaRxyh44VCW1e6jAEhKMhuuCaJJn0 KfYuoyFFuU2qwIpOfNTPHlaSkF4DwFJFRBVc8SyuDsWXWu7po4inT6vYLSdFja9xbHQY rJBgMKv7utM6Pntp8SjytvUgfXj5X9a2kEhNXPV0TNzT1rBoDmSlNC1DpdEoiyRe5xAK W7b++dwKHkEKrQdEsdwG+DbctNTYmKNGfsgPWOil23VhiVMOiGWRXN/ZLg4YE9PeVz+m FMMvtJzHALY40oLLJQ9yEYnLlYRhaPdFniDeDjN1GAdSUYRQT7JGC6kq3oMWlq3G5pGV RB0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=FWKrZOV3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si2632685ejd.637.2020.07.25.13.25.34; Sat, 25 Jul 2020 13:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=FWKrZOV3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgGYUXU (ORCPT + 99 others); Sat, 25 Jul 2020 16:23:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727818AbgGYUXT (ORCPT ); Sat, 25 Jul 2020 16:23:19 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50367C08C5C1 for ; Sat, 25 Jul 2020 13:23:19 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id h28so9394615edz.0 for ; Sat, 25 Jul 2020 13:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=I0Th57xgtfkchmcZxsB458zve0k9vknOwyUMP9v2Iqc=; b=FWKrZOV3H27CAjvjAJeDsyKQLA5xNfO3yYIziGjYBC73EPCiootSOYerRqnltG7Fm6 7hJpcxxZN/xEVegMZtcFlhGL598qkPpSBtyawL5CNBgLgQy7+oZ1AxBnNN41OXwtnUAh h0JU/5HSVmkCNFmgzAxRJ+P9AsJ+79WWGW92I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=I0Th57xgtfkchmcZxsB458zve0k9vknOwyUMP9v2Iqc=; b=JqfvsWvIVhcGojNe2RlQW/vvNvn4aXsVGBmTBdTAPgQUYvV+DL2TSqCkGb6qxGHrZX pVTgHjIoxeh8hQAqgsGrYaJB4Jy8F6gCDmoOQesezui9rDAm6jUoqdaK2f9FZwFIXRwD 4Z9GukGy8RSJB417n9nPGZczzr3sUCNMYtUwiNLAe6QOS5Gomb6R5pUFc/cHnI4LM7v2 g29A1p8esT8wTLoZGX3m+gRszk4JdjBWyhByx1aozAuXmaqgJoAGBOK9uAqgpjwc/5Rw BEWCATawgE4S7liq8K0KCBCYaqtyHVw9Aa+QOmO+J6Tqq2rHu05axH2g3PPjK4WgbGJ/ LAPQ== X-Gm-Message-State: AOAM530bTFpe8oKnSDwlJ3TAzB5+/wWovXMD0qLfNLeY8qRLYUSLx8Yh zPYBY/dqTpdck+JpeuRbJbCkOA== X-Received: by 2002:a50:cf43:: with SMTP id d3mr15290801edk.40.1595708597833; Sat, 25 Jul 2020 13:23:17 -0700 (PDT) Received: from localhost ([2620:10d:c093:400::5:5be3]) by smtp.gmail.com with ESMTPSA id rs5sm3399321ejb.44.2020.07.25.13.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2020 13:23:17 -0700 (PDT) Date: Sat, 25 Jul 2020 21:23:16 +0100 From: Chris Down To: Gaurav Singh Cc: Shuah Khan , Tejun Heo , Michal =?iso-8859-1?Q?Koutn=FD?= , Roman Gushchin , Andrew Morton , Christian Brauner , "open list:KERNEL SELFTEST FRAMEWORK" , open list Subject: Re: [PATCH] [cgroup/testing] cg_read_strcmp: Fix null pointer dereference Message-ID: <20200725202316.GA349701@chrisdown.name> References: <20200725181506.20199-1-gaurav1086@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200725181506.20199-1-gaurav1086@gmail.com> User-Agent: Mutt/1.14.6 (2020-07-11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gaurav Singh writes: >Passing NULL in strcmp will cause a segmentation fault. >Fix this by returning -1 if expected is NULL pointer. Did you actually encounter this while running the tests?