* Re: [PATCH] media: media-request: Fix crash according to a failed memory allocation
@ 2020-06-21 12:45 Markus Elfring
2020-06-21 13:55 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-06-21 12:45 UTC (permalink / raw)
To: Tuomas Tynkkynen, linux-media
Cc: kernel-janitors, linux-kernel, stable,
syzbot+6bed2d543cf7e48b822b, Laurent Pinchart,
Mauro Carvalho Chehab, Sakari Ailus
> …, reorder media_request_alloc() such that …
Wording adjustments:
…, reorder statements in the implementation of the function “media_request_alloc” so that …
> … the last step thus
… the last step.
Thus media_request_close() …
Would you like to add the tag “Fixes” to the commit message?
…
> +++ b/drivers/media/mc/mc-request.c
> @@ -296,9 +296,18 @@ int media_request_alloc(struct media_device *mdev, int *alloc_fd)
> if (WARN_ON(!mdev->ops->req_alloc ^ !mdev->ops->req_free))
> return -ENOMEM;
>
> + if (mdev->ops->req_alloc)
> + req = mdev->ops->req_alloc(mdev);
> + else
> + req = kzalloc(sizeof(*req), GFP_KERNEL);
How do you think about to use a conditional operator?
+ req = (mdev->ops->req_alloc
? mdev->ops->req_alloc(mdev)
: kzalloc(sizeof(*req), GFP_KERNEL));
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] media: media-request: Fix crash according to a failed memory allocation
2020-06-21 12:45 [PATCH] media: media-request: Fix crash according to a failed memory allocation Markus Elfring
@ 2020-06-21 13:55 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2020-06-21 13:55 UTC (permalink / raw)
To: Markus Elfring
Cc: Tuomas Tynkkynen, linux-media, kernel-janitors, linux-kernel,
stable, syzbot+6bed2d543cf7e48b822b, Laurent Pinchart,
Mauro Carvalho Chehab, Sakari Ailus
On Sun, Jun 21, 2020 at 02:45:10PM +0200, Markus Elfring wrote:
> > …, reorder media_request_alloc() such that …
>
> Wording adjustments:
> …, reorder statements in the implementation of the function “media_request_alloc” so that …
>
>
> > … the last step thus
>
> … the last step.
> Thus media_request_close() …
>
>
> Would you like to add the tag “Fixes” to the commit message?
>
>
> …
> > +++ b/drivers/media/mc/mc-request.c
> > @@ -296,9 +296,18 @@ int media_request_alloc(struct media_device *mdev, int *alloc_fd)
> > if (WARN_ON(!mdev->ops->req_alloc ^ !mdev->ops->req_free))
> > return -ENOMEM;
> >
> > + if (mdev->ops->req_alloc)
> > + req = mdev->ops->req_alloc(mdev);
> > + else
> > + req = kzalloc(sizeof(*req), GFP_KERNEL);
>
> How do you think about to use a conditional operator?
>
> + req = (mdev->ops->req_alloc
> ? mdev->ops->req_alloc(mdev)
> : kzalloc(sizeof(*req), GFP_KERNEL));
>
>
> Regards,
> Markus
Hi,
This is the semi-friendly patch-bot of Greg Kroah-Hartman.
Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list. I strongly suggest that you not do this anymore. Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.
Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all. The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback. Please feel free to also ignore emails
from them.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-21 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-21 12:45 [PATCH] media: media-request: Fix crash according to a failed memory allocation Markus Elfring
2020-06-21 13:55 ` Greg KH
Unnamed repository; edit this file 'description' to name the repository.
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://archive.lwn.net:8080/linux-media/0 linux-media/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-media linux-media/ http://archive.lwn.net:8080/linux-media \
linux-media@vger.kernel.org lwn-linux-media@archive.lwn.net
public-inbox-index linux-media
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://archive.lwn.net/lwn.kernel.linux-media
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git