Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4819331ybe; Mon, 9 Sep 2019 15:21:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQa/vy5yQeiFfLB1lUqtttmTi86GC7OdPGUfkPyaJFMLpWQRzWGE8eMdjE472qpCWE2IjK X-Received: by 2002:a17:906:4dc3:: with SMTP id f3mr22101115ejw.38.1568067705198; Mon, 09 Sep 2019 15:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568067705; cv=none; d=google.com; s=arc-20160816; b=dCWOOrmqvgnb80kWSQasQQ5uJ9m6YS/W63wdYioswpYz5JvF+hMJ0uWiIf54myZKyV BGskjMC8vbgtuacO6GAJZjF2o1vKZNkR3DofQj3DTrJogiPcwro77D4eAL91IxV/Ptsk aiAkpUsTJksK1TXo4I+w0TxHh+Qt3LAUAxJRpb8fX8qBvxeh3L1mcYvQOSRlZNC5apXj /3jadjt54xOWfzy3cWqNgOdNLEu59V//cMA3Zg+Ux9bk0pM/Y6MKFDbED9SQ/ysv1EwF Im7JnNz9c/QBWs5iKYLYhf+mYOFW+GPTi2obiUg7GDBUmCckYrBPaXlVklTalhZ/oTcG 2d9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=a6wvOg7fIlbqK8IjGTT61M8qMgTdSFY/62MhioXnnvk=; b=Zt6HhZPmPxc5doG8ATscELMp3w2v8dr6HW+901CwUwfh37He7QewpJ8l+BmRgCyNau qlie5hCfVGCXSHAq/cYpyK9nlKLIjuqgW8+cmDi1dTmPP0DxhwmVxTrO2gQkpPC9hL6p UnB4iVdYOrE4Taq6r3T25d+bWNQUxI6joVaoLfGd7r9kIoroxWUcU4fxj9lKyj7svd1B xA+BJ/w6NzZxicW51Hy3yNqzf1b9vfs+SWmeI/otWUHA7spytq5JDn9soB5NP/WjTQ8w lW2oOzKrTrhCIxib3YXTnm25f8+kgQmPdZX8dynbyK694qOxRoEZEKNaPV29DaFAMSzU k+SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I76+uX3U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id t22si8431469ejx.202.2019.09.09.15.21.20; Mon, 09 Sep 2019 15:21:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I76+uX3U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2390020AbfIIJsk (ORCPT + 99 others); Mon, 9 Sep 2019 05:48:40 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39459 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728780AbfIIJsj (ORCPT ); Mon, 9 Sep 2019 05:48:39 -0400 Received: by mail-wr1-f67.google.com with SMTP id t16so13076787wra.6; Mon, 09 Sep 2019 02:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a6wvOg7fIlbqK8IjGTT61M8qMgTdSFY/62MhioXnnvk=; b=I76+uX3UaaeFwRMicmaNEb73kibZ6MxG0CH6BvDGug79V8TLbh/dt2onXnp5gLuzuW nrDO9YCdI9dENNNCETlsenpUisyPp36o7mYOMfHIP6h6cDXATjtorpFVFJGDoSi58FAQ kWwUBsILrBxDL4xOUJsvIiEQOGhvWMtPft0ybEzWyi1ZTnSyqntUKBwR2M3CT7yMEBX+ KP40E8SEUuNIky6x6IPV22WhAkRc2h/w6Tk7ORY1js2VJfT2pDbVucFseIdzVHBjt+Lz ChMHs1EboyLkoCtiH/tjUabxPO09HPby8+gX26ZZ+FL99ljrqPNon3Hobb7C0o4SMmSo wXvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a6wvOg7fIlbqK8IjGTT61M8qMgTdSFY/62MhioXnnvk=; b=BWq/xIdjMzPbrYx9OAZWpkoI+EcoXaAUuCTG9ntOU6TyL97K0X8wkQSeTeHy5712Ce QSFDb8ueX7YsQYPIIi5PD7IMLrth775dbmHerE6cjpEu4OGjDKv9lfRrY5H5Xqe0CHEA sKwEPBbwEXCB1dtGFAFEvBtkgelin6KsFXH2KCgpLs8YT46dBpftoCBhfgXWe6WJh23X 3VP7JhRWixRppbf0dt9sfPovbX1dBi+/mx+3qci+myD+PsLUfLQIiu3UD1LjD4kkZTAV DkxwEku+3f+6eBpWtyxC/1mcSXIWSFsj+kU7RvXQbjdfaJdP8r5Vr+BHI8BTOTyn1HAz czlA== X-Gm-Message-State: APjAAAVGB6a126nDDDr9kwqW+4Ao+AtnTY5OXyIWSBR9OJ5phiryB06b qmRdVnDnTESpxdxTL0t/1yBUCnQdUrTWKau+valUhZHUU1Y= X-Received: by 2002:a5d:628f:: with SMTP id k15mr3643725wru.124.1568022517638; Mon, 09 Sep 2019 02:48:37 -0700 (PDT) MIME-Version: 1.0 References: <20190822195132.GA2100@bharath12345-Inspiron-5559> In-Reply-To: <20190822195132.GA2100@bharath12345-Inspiron-5559> From: Xin Long Date: Mon, 9 Sep 2019 17:48:25 +0800 Message-ID: Subject: Re: net/dst_cache.c: preemption bug in net/dst_cache.c To: Bharath Vedartham Cc: davem , Greg Kroah-Hartman , allison@lohutok.net, tglx@linutronix.de, network dev , LKML , Jon Maloy Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 23, 2019 at 3:58 PM Bharath Vedartham wrote: > > Hi all, > > I just want to bring attention to the syzbot bug [1] > > Even though syzbot claims the bug to be in net/tipc, I feel it is in > net/dst_cache.c. Please correct me if I am wrong. > > This bug is being triggered a lot of times by syzbot since the day it > was reported. Also given that this is core networking code, I felt it > was important to bring this to attention. > > It looks like preemption needs to be disabled before using this_cpu_ptr > or maybe we would be better of using a get_cpu_var and put_cpu_var combo > here. b->media->send_msg (tipc_udp_send_msg) -> tipc_udp_xmit() -> dst_cache_get() send_msg() is always called under the protection of rcu_read_lock(), which already disabled preemption. If not, there must be some unbalanced calls of disable/enable preemption elsewhere. Agree that this could be a serious issue, do you have any reproducer for this? Thanks. > > [1] https://syzkaller.appspot.com/bug?id=dc6352b92862eb79373fe03fdf9af5928753e057 > > Thank you > Bharath