Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2515650pxt; Mon, 9 Aug 2021 02:17:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnL+TVYOXosACi2ws539bF0dgM23kPufk24go28/kQHSY2H2hJoqOKLpJwYyNvZUffzYck X-Received: by 2002:a05:6e02:f51:: with SMTP id y17mr261933ilj.288.1628500667192; Mon, 09 Aug 2021 02:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628500667; cv=none; d=google.com; s=arc-20160816; b=ba/Ybvzo5tqgMHjSus3MQ76P4IBmXdHx7XY3pEeV6nx7aLsj1AalCmwSBXPniHS+sF hQFF3fxcZX0U49VPmibYPacO+W3Vbfuxv+vy6gK4lPmOXam2y/VP8ySu1QOUKLa4tpXW PMEljEyDQwxgpP8lddjGVWdubyQXgvGxGP+CocXJxio4/rthibY5Dk/U8Mj9u1bKQAv2 MsOkSwb5k19vZq5zLp4aijPt9M98XCBe1M5Y29q3Vcj1EIo+ApuNW3Ax6lL8k8jsXWEG g7uIZvrQcxiPswT7I/PdPmO5IBzTXHlulLp5FgYWXpAtRw7AAuibrRFy2wDBClc/3cAj JP0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=+dRsZNTP7hBF9O82Mp5K6R2KwdyHxlKrtq2XNd8dBbc=; b=NWdXjffvG1AaQzWF689A25RE7dzL1PZW8Ct+4pJSON1LfftT0iKgNzh1m6uyEY7uKf 6BiL7aZOxtBZpLdiinvwfgt30pkj30hM8Rb7PCOhKNBMlILbYlSpl1H3o34ap4IVefXe kyI4QsgnjP8rK3F4YPzL5zru+36P4B0poHC/FVHiS4VJ6KDYmIWWgbOZE6JhPTTMjomb fRKNeGeSafB76YpRj2qAK59uf1m5kojPdgLO+QBNW7L7PdelSXkjpJ3UeNPTftlxkLNO cfN2w8Yotkz6quTkEa4HyrC/sKI3Jlq00BhLPqg8GN/HoU1dME4RzRMRmsGVxhCDFzD6 XoTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RiSa1w2p; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si16420204ilp.101.2021.08.09.02.17.35; Mon, 09 Aug 2021 02:17:47 -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=@gmail.com header.s=20161025 header.b=RiSa1w2p; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234266AbhHIJQJ (ORCPT + 99 others); Mon, 9 Aug 2021 05:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234130AbhHIJQJ (ORCPT ); Mon, 9 Aug 2021 05:16:09 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F145C0613CF; Mon, 9 Aug 2021 02:15:49 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id n12so10375294wrr.2; Mon, 09 Aug 2021 02:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+dRsZNTP7hBF9O82Mp5K6R2KwdyHxlKrtq2XNd8dBbc=; b=RiSa1w2pj40FFrdW+a0+Svl6/iqdVncof6QGTr3hMSLQczBAQBDKg0RnemcU7YM4kx pul3VlL91ziIfrEQBO4ytVFJN1scLW5LKxV/ce9zI6U/0sU6dutgNpSO0dHlO3Od6hcL 5j6y7Mr7EBdwzYqAghuOkyRwNanT32Y6YwwFzpVBXbpxrqw1D8lDLQStLM3gWIKozfSg Ov5nxOu6I617l/4noZQMCQ4YbvRYGL3QFNRVDFLoNPTnXYi4ofLWvrwDLpkpOX8yx4tI +WxKqwgZ3tIwkr5VnRvRZJqPlnMT/W80OWm9pISThKk4RO2o04XfYxT5Mb5ooFQaH9yR C8DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+dRsZNTP7hBF9O82Mp5K6R2KwdyHxlKrtq2XNd8dBbc=; b=dsd1ZUj20rZ0f3/ozIE928biXS3l9ssyFH8EPcaPwXFRcyOhx7eZfQj9/umvoRTJvF bnGqvJ+D+IDU1aZrKtdGJOP4RrVya2c8mbJztBGEFI30+RWQ/lgjEgkbm0LBLIdydj+U fAX4G6SYzb80yHWEbt/qcKP+mda4m8va6lxCpapMqidcT8CMQ/FkNUqR4CeBGXfxgbBP R6kFFze77eiEF03ig7+p3GpfxUCczIMrF2kIOvpMQ7sedlxo3l/XgnYQfmWhU4LTwzaW scIE2FhAYMcHc94TlQI5/P1puEsXI+VuuhGot4SXsKITDegFdYvCuwjyPsH0B/6sl/vl lmAQ== X-Gm-Message-State: AOAM530aoY1QWgVIvAvJbkR4pHuRx77iNrmoSEdy9JonZ1vV7Z+bDuQ3 dyFhnV3EnsgWpWAjJnwXdOBZofy5CUo= X-Received: by 2002:a5d:428f:: with SMTP id k15mr10011455wrq.73.1628500547365; Mon, 09 Aug 2021 02:15:47 -0700 (PDT) Received: from [10.0.0.18] ([37.165.146.152]) by smtp.gmail.com with ESMTPSA id c15sm19222413wrw.93.2021.08.09.02.15.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Aug 2021 02:15:46 -0700 (PDT) Subject: Re: [PATCH net-next] net: sock: add the case if sk is NULL To: Yajun Deng , davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210806063815.21541-1-yajun.deng@linux.dev> From: Eric Dumazet Message-ID: Date: Mon, 9 Aug 2021 11:15:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210806063815.21541-1-yajun.deng@linux.dev> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/6/21 8:38 AM, Yajun Deng wrote: > Add the case if sk is NULL in sock_{put, hold}, > The caller is free to use it. > Can we please stop adding code like that all over the places ? This is wrong, fix the callers that are lazy, or fix the real bug if this is a syzbot report.