* [Drbd-dev] + drbd-potential-null-dereference.patch added to -mm tree
@ 2010-03-31 22:50 akpm
2010-04-01 16:03 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2010-03-31 22:50 UTC (permalink / raw)
To: mm-commits; +Cc: jens.axboe, error27, philipp.reisner, drbd-dev
The patch titled
drbd: fix potential null dereference
has been added to the -mm tree. Its filename is
drbd-potential-null-dereference.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: drbd: fix potential null dereference
From: Dan Carpenter <error27@gmail.com>
If "e" is NULL then "bm_ext" would be NULL too.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/block/drbd/drbd_actlog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/block/drbd/drbd_actlog.c~drbd-potential-null-dereference drivers/block/drbd/drbd_actlog.c
--- a/drivers/block/drbd/drbd_actlog.c~drbd-potential-null-dereference
+++ a/drivers/block/drbd/drbd_actlog.c
@@ -1337,7 +1337,7 @@ int drbd_rs_del_all(struct drbd_conf *md
for (i = 0; i < mdev->resync->nr_elements; i++) {
e = lc_element_by_index(mdev->resync, i);
bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL;
- if (bm_ext->lce.lc_number == LC_FREE)
+ if (!bm_ext || bm_ext->lce.lc_number == LC_FREE)
continue;
if (bm_ext->lce.lc_number == mdev->resync_wenr) {
dev_info(DEV, "dropping %u in drbd_rs_del_all, apparently"
_
Patches currently in -mm which might be from error27@gmail.com are
linux-next.patch
power_meter-acpi_device_class-power_meter_resource-too-long.patch
dpt_i20-several-use-after-free-issues.patch
sbshc-acpi_device_class-smbus_host_controller-too-long.patch
acpi_pad-processor_aggregator-name-too-long.patch
backlight-backlight_device_register-return-err_ptr.patch
scsi-remove-superfluous-null-pointer-check-from-scsi_kill_request.patch
iscsi-change-to.patch
drbd-potential-null-dereference.patch
musb-potential-use-after-free.patch
dynamic_debug-small-cleanup-in-ddebug_proc_write.patch
sis-strcpy-=-strlcpy.patch
proc-cleanup-remove-unused-assignments.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Drbd-dev] + drbd-potential-null-dereference.patch added to -mm tree
2010-03-31 22:50 [Drbd-dev] + drbd-potential-null-dereference.patch added to -mm tree akpm
@ 2010-04-01 16:03 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-04-01 16:03 UTC (permalink / raw)
To: akpm; +Cc: jens.axboe, mm-commits, philipp.reisner, drbd-dev
On Wed, Mar 31, 2010 at 03:50:58PM -0700, akpm@linux-foundation.org wrote:
>
> The patch titled
> drbd: fix potential null dereference
> has been added to the -mm tree. Its filename is
> drbd-potential-null-dereference.patch
Hi Andrew,
Could you drop this patch? It turns out that "drbd" can never be NULL
there. Philip Reisner has a patch that removes the check.
regards,
dan carpenter
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
> See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
> out what to do about this
>
> The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
>
> ------------------------------------------------------
> Subject: drbd: fix potential null dereference
> From: Dan Carpenter <error27@gmail.com>
>
> If "e" is NULL then "bm_ext" would be NULL too.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
> Cc: Jens Axboe <jens.axboe@oracle.com>
> Cc: Philipp Reisner <philipp.reisner@linbit.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/block/drbd/drbd_actlog.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN drivers/block/drbd/drbd_actlog.c~drbd-potential-null-dereference drivers/block/drbd/drbd_actlog.c
> --- a/drivers/block/drbd/drbd_actlog.c~drbd-potential-null-dereference
> +++ a/drivers/block/drbd/drbd_actlog.c
> @@ -1337,7 +1337,7 @@ int drbd_rs_del_all(struct drbd_conf *md
> for (i = 0; i < mdev->resync->nr_elements; i++) {
> e = lc_element_by_index(mdev->resync, i);
> bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL;
> - if (bm_ext->lce.lc_number == LC_FREE)
> + if (!bm_ext || bm_ext->lce.lc_number == LC_FREE)
> continue;
> if (bm_ext->lce.lc_number == mdev->resync_wenr) {
> dev_info(DEV, "dropping %u in drbd_rs_del_all, apparently"
> _
>
> Patches currently in -mm which might be from error27@gmail.com are
>
> linux-next.patch
> power_meter-acpi_device_class-power_meter_resource-too-long.patch
> dpt_i20-several-use-after-free-issues.patch
> sbshc-acpi_device_class-smbus_host_controller-too-long.patch
> acpi_pad-processor_aggregator-name-too-long.patch
> backlight-backlight_device_register-return-err_ptr.patch
> scsi-remove-superfluous-null-pointer-check-from-scsi_kill_request.patch
> iscsi-change-to.patch
> drbd-potential-null-dereference.patch
> musb-potential-use-after-free.patch
> dynamic_debug-small-cleanup-in-ddebug_proc_write.patch
> sis-strcpy-=-strlcpy.patch
> proc-cleanup-remove-unused-assignments.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-01 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 22:50 [Drbd-dev] + drbd-potential-null-dereference.patch added to -mm tree akpm
2010-04-01 16:03 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.