";
492 }
493
494 if (!desc || (cmd && (desc->out_num + desc->in_num == 0)))
495 return -ENOTTY;
496
497 /*
498 * Check for a valid command. For ND_CMD_CALL, we also have to
499 * make sure that
{
786 .pgoff = pgoff,
787 .range = {
788 .start = alloc->start,
Dereferences.
789 .end = alloc->end,
790
oduced the NVDIMM_CMD_MAX (31) define and
updated nfit_dsm_revid() to use that define as well instead of magic
numbers.
Fixes: 11189c1089da ("acpi/nfit: Fix command-supported detection")
Signed-off-by: Dan Carpenter
---
drivers/acpi/nfit/core.c | 10 ++
drivers/acpi/nfit/nfit.h
2e45f4a2 ("libnvdimm: control (ioctl) messages for nvdimm_bus and
nvdimm devices")
Signed-off-by: Dan Carpenter
---
drivers/nvdimm/bus.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index a8b515968569..09087c38fabd 100
On Wed, Feb 05, 2020 at 12:04:15PM -0800, Dan Williams wrote:
> On Wed, Feb 5, 2020 at 11:28 AM Dan Carpenter
> wrote:
> >
> > On Wed, Feb 05, 2020 at 11:16:22AM -0800, Dan Williams wrote:
> > > Ugh, sorry I thought you were pointing out that there's too many
> >
device_put(>dev);
return NULL;
}
return nvdimm;
regards,
dan carpenter
___
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-le...@lists.01.org
n it decrements it twice. Now the refcount
is zero so we call nvdimm_release(). This leads to a use after free on
the next line:
put_device(dev);
if (dev->parent)
There is a trick here because depending on the debug options it
might free immediately or it might call nvdimm_re
On Wed, Feb 05, 2020 at 09:47:01AM -0800, Dan Williams wrote:
> On Wed, Feb 5, 2020 at 4:38 AM Dan Carpenter wrote:
> >
> > Hello Dan Williams,
> >
> > The patch 4d88a97aa9e8: "libnvdimm, nvdimm: dimm driver and base
> > libnvdimm device-driver in
, I guess. It seems
buggy to call put device twice on error.
regards,
dan carpenter
regards,
dan carpenter
___
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-le...@lists.01.org
((1 << func) & NVDIMM_INTEL_SECURITY_CMDMASK)
^^^^^
This is undefined if func is greater than 31.
3496 return -EOPNOTSUPP;
3497 }
3498
3499 return __acpi_nfit_clear_to_send(nd_desc, nvdimm, cmd);
3500 }
regards,
dan carpenter
___
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-le...@lists.01.org
We change the locking in this function and forgot to update this error
path so we are accidentally still holding the "dev->lockdep_mutex".
Fixes: 87a30e1f05d7 ("driver-core, libnvdimm: Let device subsystems add local
lockdep coverage")
Signed-off-by: Dan Carpenter
---
d
lear about the values it is returning.
>
> This was found via code inspection.
>
> Reported-by: Dan Carpenter
> Reviewed-by: Vishal Verma
> Signed-off-by: Ira Weiny
>
> ---
> V1->V2
> Add space after variable declaration...
>
> V2->V3
> Fix
The "ndns->claim_class" variable is an enum but in this case GCC will
treat it as an unsigned int so the error handling is never triggered.
Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7 format")
Signed-off-by: Dan Carpenter
---
drivers/nvdimm/namespac
for networking, but it's kind of a pain in the butt and I
mess up surpisingly often for how much effort I put into getting it
right.
regards,
dan carpenter
___
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
On Fri, Sep 13, 2019 at 01:09:37AM -0600, Jonathan Corbet wrote:
> On Wed, 11 Sep 2019 16:11:29 -0600
> Jens Axboe wrote:
>
> > On 9/11/19 12:43 PM, Dan Carpenter wrote:
> > >
> > > I kind of hate all this extra documentation because now everyone thinks
> &
ne who tries to tag their patches is going to do it badly anyway.
regards,
dan carpenter
___
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
nd_command;
3510 if ((1 << func) & NVDIMM_INTEL_SECURITY_CMDMASK)
^
This is undefined and it would be nice to fix, but not important for
run time.
3511 return -EOPNOTSUPP;
3512 }
3513
3514
mix them,
it means that NULL is a special kind of success. Like we try to load
a feature and we get back:
valid pointer <-- success
null <-- feature is disabled. not an error.
error pointer <-- feature is broken. fail.
regards,
dan carpenter
___
if (offset + in_buf.buffer.length < buf_len) {
572 if (i >= 1) {
573 /*
574 * status valid, return the number of bytes left
575 * unfilled in the output buffer
576
pend = nsio->res.end - end_trunc;
868
869 if ((pstart >= start) && (pend <= end))
870 return -EBUSY;
871
872 return 0;
873
874 }
regards,
dan carpenter
___
Linux-nvdimm m
pl->start > clr_end)
622 continue;
623 /* Delete completely overlapped poison entries */
624 if ((pl->start >= start) && (pl_end <= clr_end)) {
625
locate less than intended.
1019 if (!buf)
1020 return -ENOMEM;
1021
1022 if (copy_from_user(buf, p, buf_len)) {
1023 rc = -EFAULT;
1024 goto out;
1025 }
regards,
dan carpenter
___
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
If the kcalloc() fails then "devs" can be NULL and we dereference it
checking "devs[i]".
Fixes: 1b40e09a1232 ('libnvdimm: blk labels and namespace instantiation')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/nvdimm/namespa
23 matches
Mail list logo