Received: by 10.213.65.68 with SMTP id h4csp495054imn; Tue, 13 Mar 2018 10:50:27 -0700 (PDT) X-Google-Smtp-Source: AG47ELt7Lz5Uv4SFXjUaMygSX+MVVIWENg/v1upaaBfKZNpSCfVzSUe+Gi/iRvANE0p88Gwni8Er X-Received: by 10.98.25.10 with SMTP id 10mr1402202pfz.136.1520963427175; Tue, 13 Mar 2018 10:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520963427; cv=none; d=google.com; s=arc-20160816; b=Oqe3b6QcBkHrZ5Wna13ccwUWO0I99wT6eu9pnaYqbtCdd/wyIoJhUOk4BVkmKb4kU2 ZQjVGFBuhKQMeOdCay7xftAVsmHS/5ODIyrEYMojK1QXMpl0TdQ6zsXiJ18LIWRZX1Li t3tfl63myAOdEroLLh9ypGlMPMB+y6FiKbEoVlGKm8aI8PM001Z8CAcxGsrggrfp/5GU x3E52hX9LRLgDQFUbR7vAqLwGy/wCsKcCS9sqa/e9FnD4+/RiKDxKl0+RtJkB60pEccK zvskRr1b7rqX8ImilDnWedDLyFz4N33xWvEGX6/qkHYYZ2DUXk0r63KuBeC+EyKr1erC CtLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=9knQjwh0lQfB+TioxAu3bHffnuWBH/b8xaFVP5QOmK8=; b=oya7qFTRJwt7K9uzkt6ztuk9b29Fao6PFYjmrG8x00lXoqcQd2buDKv6DbYKBtx8et 6RIB63xuuJ19EvQNie/b3EsWURsPSmUMDsB2QtTAGQ4BuCXS1LNlCbmpSi05GQvJyUa2 4UAeQysdn6VC6MgSO/B5jAyEtfA0K6NQibNthudiy/VNoDZDsKhpmwMt2k/z2vQoP6Pj 5eaHcFBt2Qma7j6FytkNuq/3mhVKGY/PY5imOuZN28UeX/9kkM6JYH34wclMDas+LRHv IXlZj8gifNo5Qmm1qh7OmpnKMvLRlcKE9TMxaBPKwspPdKu9AtsZndPG/vCd2vnvrSwU 36DQ== 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 s12si415921pgo.252.2018.03.13.10.50.13; Tue, 13 Mar 2018 10:50:27 -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 S932619AbeCMRs4 (ORCPT + 99 others); Tue, 13 Mar 2018 13:48:56 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:49013 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932257AbeCMRsx (ORCPT ); Tue, 13 Mar 2018 13:48:53 -0400 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1evo2V-0008Ab-FL; Tue, 13 Mar 2018 18:48:43 +0100 Received: from [IPv6:2001:470:7eea:1122:b5ce:4785:94ee:c957] (unknown [IPv6:2001:470:7eea:1122:b5ce:4785:94ee:c957]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "mkl@blackshift.org", Issuer "StartCom Class 1 Client CA" (not verified)) (Authenticated sender: mkl@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 9F6D42EFB52; Tue, 13 Mar 2018 17:48:42 +0000 (UTC) Subject: Re: [PATCH v2 0/1] Open questions To: "Dr. Philipp Tomsich" , Jakob Unterwurzacher Cc: Martin Elshuber , Wolfgang Grandegger , 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: Marc Kleine-Budde Message-ID: Date: Tue, 13 Mar 2018 18:48:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; 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: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="49paDp0mhg3MWsTipV1DAfxyZPFq7FpeI" X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --49paDp0mhg3MWsTipV1DAfxyZPFq7FpeI Content-Type: multipart/mixed; boundary="bQcAFp41XHCNHrKJW2aC1AyjzBG8tsgzM"; protected-headers="v1" From: Marc Kleine-Budde To: "Dr. Philipp Tomsich" , Jakob Unterwurzacher Cc: Martin Elshuber , Wolfgang Grandegger , linux-can@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: Subject: Re: [PATCH v2 0/1] Open questions References: <20180313173520.21257-1-jakob.unterwurzacher@theobroma-systems.com> <06378497-1ACE-4333-810F-4E3E4706CCD5@theobroma-systems.com> In-Reply-To: <06378497-1ACE-4333-810F-4E3E4706CCD5@theobroma-systems.com> --bQcAFp41XHCNHrKJW2aC1AyjzBG8tsgzM Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable On 03/13/2018 06:42 PM, Dr. Philipp Tomsich wrote: >=20 >> On 13 Mar 2018, at 18:40, Jakob Unterwurzacher >> > > wrote: >> >> >> + =C2=A0=C2=A0=C2=A0/* get the urb context */ >> >> + =C2=A0=C2=A0=C2=A0if (WARN_ON(!context)) >> >> + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return; >> > >> > Can this happen? >> >> Not unless there is a bug in the code. But we want to get a message >> before dereferencing a pointer. >=20 > Why not use BUG_ON(!context)? As this will halt the whole system. Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | --bQcAFp41XHCNHrKJW2aC1AyjzBG8tsgzM-- --49paDp0mhg3MWsTipV1DAfxyZPFq7FpeI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEENrCndlB/VnAEWuH5k9IU1zQoZfEFAlqoDvgACgkQk9IU1zQo ZfGnxAf/bHqg0zD/R0v3M1dsYUGCcDfamzj4iot5GBPbKNvxaLZCC6SRVKZG87zM TP6htWEymi+Dq+ouJfXSQXk231A56JSeyNuF1Q6Ao5e+gzRHfOCKKJnC91vAqMCc YSmBYDI9Fwi33I7C8AyNl/l4jH+0sCQUcSrr4CzcSs7YrOB9RKAKa129oId/y33s bM9NEjGMIULCshYk2yDHkVInIrHq3VM1+c63GC3RgnL0j/c9oIm+9IVC+eCmKqRU sb3IW+clqFeX6cvxsXxn4iOGYc47ns5I+REqEa9FyDf14zsuadhOMHleM4TBoHX4 XXataKvoS+cktczHg4NBe9HRxssxLg== =25Mo -----END PGP SIGNATURE----- --49paDp0mhg3MWsTipV1DAfxyZPFq7FpeI--