Received: by 10.213.65.68 with SMTP id h4csp495238imn; Tue, 13 Mar 2018 10:50:48 -0700 (PDT) X-Google-Smtp-Source: AG47ELsmAnnmGN9nxpVOjDST+bQq+CrBxPbSk7897ho7I36Q09AttMETzuhfJN1KCZQ14hrYrs9a X-Received: by 10.99.140.8 with SMTP id m8mr1203675pgd.320.1520963448784; Tue, 13 Mar 2018 10:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520963448; cv=none; d=google.com; s=arc-20160816; b=d4pIJM9FMhSWw4wI/nqxK10ku8jV2M7a5n6U6mYM3URXuzZs3Bjph6za2+Ds0n+WZZ i80xDxXG0BTYZhLzpNEZJS7WGfNqAyda4aYMz2jfEwOrM6rwU5clI8hv6VqlD+WBacAY eNE2J4L1QEhr3Tlv1nmrpr0j/zTZAixJ+P39lVHHzUAR4CwUuQWNwuzLOocT445RADVG k5+h0JW5T468rP09Jpf27JOh8KWZP+Tm5j0ZTDR6fqTv1PwEr3hUzvWRrTsVg8XONtVl ycL0SiqAw70aUNGzPfRvE7UztGil6S7n3yr1fQOb5ud8JusA3nkwBC4A7yZ7cZQRqUQg 7NaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=BkXK24cWGdYQWo0ziqdGOB5utIL7ktwlI9TAW4XSN3E=; b=g4HzluLbXFm1yBwQdn2BvYaWwFtqDCr/PYavGsSjIIxaOCuNcnwvAZgfk+4LBpTm65 +WwDuI0LYBtmhM/v1wC57SPqO6mU9rqo0AEd9j9R+zvqQGka5RvtpmZjo2Ur2Fy9efju M7MDy3eG8kUZZ5yJhT63oI1iHF7r3OEoEuN7c2rhkc8r0mf8fbP9edAjKGfFt/+Bbwda XVeA2oNPvGPeUdbIctQZG2RDbpTwk2POpS7cVU/HiNVlevZ70teFcB5DAJR9/6vsBab6 EK4ym5w0Ujjwy+OdCBbQywP538UCmQ6wvusD+Z1pjoT7cC5m1GC9jcj7tofIZ/PCtCB1 iOjQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si417007pgu.590.2018.03.13.10.50.34; Tue, 13 Mar 2018 10:50:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932122AbeCMRsm (ORCPT + 99 others); Tue, 13 Mar 2018 13:48:42 -0400 Received: from vegas.theobroma-systems.com ([144.76.126.164]:51308 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932257AbeCMRsj (ORCPT ); Tue, 13 Mar 2018 13:48:39 -0400 X-Greylist: delayed 770 seconds by postgrey-1.27 at vger.kernel.org; Tue, 13 Mar 2018 13:48:39 EDT Received: from [86.59.122.178] (port=54281 helo=ju27.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1evo2P-00013A-8a; Tue, 13 Mar 2018 18:48:37 +0100 Subject: Re: [PATCH v2 0/1] Open questions To: "Dr. Philipp Tomsich" Cc: Martin Elshuber , Wolfgang Grandegger , Marc Kleine-Budde , linux-can@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180313173520.21257-1-jakob.unterwurzacher@theobroma-systems.com> <06378497-1ACE-4333-810F-4E3E4706CCD5@theobroma-systems.com> From: Jakob Unterwurzacher Message-ID: Date: Tue, 13 Mar 2018 18:48:36 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <06378497-1ACE-4333-810F-4E3E4706CCD5@theobroma-systems.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.03.18 18:42, Dr. Philipp Tomsich wrote: > >> On 13 Mar 2018, at 18:40, Jakob Unterwurzacher wrote: >> >>>> + /* get the urb context */ >>>> + if (WARN_ON(!context)) >>>> + return; >>> >>> Can this happen? >> >> Not unless there is a bug in the code. But we want to get a message >> before dereferencing a pointer. > > Why not use BUG_ON(!context)? I believe BUG_ON kills the kernel - the intention was to get loud message, but we'd rather not crash the user's machine. Best regards, Jakob