From: Luiz Sampaio <sampaio.ime@gmail.com>
To: ojeda@kernel.org
Cc: linux-kernel@vger.kernel.org, Luiz Sampaio <sampaio.ime@gmail.com>
Subject: [PATCH v2 0/2] Fixing bug that would segmentation fault
Date: Tue, 9 Nov 2021 19:07:30 -0300 [thread overview]
Message-ID: <20211109220732.7973-1-sampaio.ime@gmail.com> (raw)
In-Reply-To: <CANiq72kgm-5CidoN8VRLnWokiDSWsQcMFbaUd4WKOnbPsON9RQ@mail.gmail.com>
This series of patches consists of one patch fixing a simple coding style
issue and one patch fixing a bug that would cause segmentation fault.
Basically, there was a pointer that was being dereferenced without testing
if the pointer exists. This patch adds a protection, returning EFAULT in
case the pointer is NULL.
Changes in v2:
- Changed return to -EINVAL and using WARN_ON as suggested
- Note in response for Miguel's comment: for the first patch, I ran the
script './scripts/checkpatch.pl --file --terse' to see with the file
had any coding style issue. That was when I was suggested to remove
'int' from 'unsigned long' declaration
Luiz Sampaio (2):
auxdisplay: charlcd: fixing coding style issue
auxdisplay: charlcd: checking for pointer reference before
dereferencing
drivers/auxdisplay/charlcd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--
2.33.1
next prev parent reply other threads:[~2021-11-09 22:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-07 15:03 [PATCH " Luiz Sampaio
2021-11-07 15:03 ` [PATCH 1/2] auxdisplay: charlcd: fixing coding style issue Luiz Sampaio
2021-11-08 12:01 ` Miguel Ojeda
2021-11-07 15:03 ` [PATCH 2/2] auxdisplay: charlcd: checking for pointer reference before dereferencing Luiz Sampaio
2021-11-08 11:58 ` Miguel Ojeda
2021-11-09 22:07 ` Luiz Sampaio [this message]
2021-11-09 22:07 ` [PATCH v2 1/2] auxdisplay: charlcd: fixing coding style issue Luiz Sampaio
2021-11-24 11:02 ` Miguel Ojeda
2021-11-09 22:07 ` [PATCH v2 2/2] auxdisplay: charlcd: checking for pointer reference before dereferencing Luiz Sampaio
2021-11-24 11:01 ` Miguel Ojeda
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=20211109220732.7973-1-sampaio.ime@gmail.com \
--to=sampaio.ime@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®