Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Colin Ian King <colin.king@canonical.com>
Subject: Re: [PATCH v2] usb: mtu3: Fix NULL pointer dereferences
Date: Tue, 30 Jun 2020 12:47:03 +0200
Message-ID: <83ce087e-9da9-a8e1-8872-8520ccfc4108@web.de> (raw)
In-Reply-To: <1593502942-24455-1-git-send-email-chunfeng.yun@mediatek.com>

> Some pointers are dereferenced before successful checks.

I propose to reconsider and improve also this change description.

* Would a null pointer dereference be possible only with the variables “mep”
  and “mreq” in the implementation of the function “mtu3_gadget_dequeue”?
  (Can it make sense to split the patch according to this detail?)

* How do you think about to convert any more variable initialisations
  to later assignments?

* Will it become helpful to add the tag “Fixes” to the commit message?


…
> ---
> v2: nothing changed, but abandon another patch

Are there chances to take any previous patch review comments better into account
(besides the shown reduction of update steps)?


> ---
>  drivers/usb/mtu3/mtu3_gadget.c | 25 ++++++++++++++++++-------

I suggest to replace the triple dashes before this diffstat by a blank line.

Regards,
Markus

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  7:42 [V2 PATCH] usb: mtu3: fix NULL pointer dereference Chunfeng Yun
2020-06-30 10:47 ` Markus Elfring [this message]
2020-07-01 11:58 ` Greg Kroah-Hartman
2020-07-02  2:52   ` Chunfeng Yun
2020-07-09  6:42     ` Felipe Balbi
2020-07-09  6:40 ` Felipe Balbi
2020-07-09  7:05   ` Chunfeng Yun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ce087e-9da9-a8e1-8872-8520ccfc4108@web.de \
    --to=markus.elfring@web.de \
    --cc=chunfeng.yun@mediatek.com \
    --cc=colin.king@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git